* Re: [PATCH 2/2] perf_counter: powerpc: Add callchain support
From: Ingo Molnar @ 2009-06-27 16:58 UTC (permalink / raw)
To: Peter Zijlstra; +Cc: Paul Mackerras, linux-kernel, linuxppc-dev
In-Reply-To: <1246091684.31755.210.camel@twins>
* Peter Zijlstra <a.p.zijlstra@chello.nl> wrote:
> On Sat, 2009-06-27 at 15:31 +1000, Paul Mackerras wrote:
> > + if (regs) {
> > + if (current_is_64bit())
> > + perf_callchain_user_64(regs, entry);
> > + else
> > + perf_callchain_user_32(regs, entry);
> > + }
>
> Ingo do we need 32 on 64 stuff like that too?
hm, indeed.
Ingo
^ permalink raw reply
* Re: sym scsi driver problem with 2.6.26 or newer debian kernel on p610 (fwd)
From: Laszlo Fekete @ 2009-06-27 17:46 UTC (permalink / raw)
To: michael; +Cc: Olof Johansson, debian-powerpc, Guennadi Liakhovetski,
linuxppc-dev
In-Reply-To: <1245824392.9237.85.camel@concordia>
[-- Attachment #1.1: Type: text/plain, Size: 2032 bytes --]
Hello!
Thank you very much, this patch works me too.
Maybe this patch will be in the debian kernel someday?
Thank you: blackluck
Michael Ellerman wrote:
> On Wed, 2009-06-24 at 15:56 +1000, Benjamin Herrenschmidt wrote:
>
>> On Wed, 2009-06-24 at 15:53 +1000, Michael Ellerman wrote:
>>
>>> Doesn't fix my machine :/
>>>
>>>
>> That doesn't make sense ... What if you remove the bit inside the ifdef
>> CONFIG_MPIC_BROKEN_REGREAD in _mpic_read() ?
>>
>> If that makes a difference, then it would be interesting to add a printk
>> in there that prints what the original value "val" is and what we have
>> in the shadow...
>>
>
> With this patch it boots:
>
> diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
> index 2353adc..fc17289 100644
> --- a/arch/powerpc/sysdev/mpic.c
> +++ b/arch/powerpc/sysdev/mpic.c
> @@ -231,13 +231,16 @@ static inline u32 _mpic_irq_read(struct mpic *mpic, unsign
> unsigned int isu = src_no >> mpic->isu_shift;
> unsigned int idx = src_no & mpic->isu_mask;
> unsigned int val;
> + unsigned int shadow;
>
> val = _mpic_read(mpic->reg_type, &mpic->isus[isu],
> reg + (idx * MPIC_INFO(IRQ_STRIDE)));
> #ifdef CONFIG_MPIC_BROKEN_REGREAD
> - if (reg == 0)
> - val = (val & (MPIC_VECPRI_MASK | MPIC_VECPRI_ACTIVITY)) |
> + if (reg == 0) {
> + shadow = (val & (MPIC_VECPRI_MASK | MPIC_VECPRI_ACTIVITY)) |
> mpic->isu_reg0_shadow[idx];
> + printk("%s: val 0x%x shadow 0x%x\n", __func__, val, shadow);
> + }
> #endif
> return val;
> }
>
>
> And I see:
>
> sym53c8xx 0000:00:0c.0: enabling device (0140 -> 0143)
> sym0: <896> rev 0x7 at pci 0000:00:0c.0 irq 17
> sym0: No NVRAM, ID 7, Fast-40, SE, parity checking
> _mpic_irq_read: val 0x80480004 shadow 0x80080014
> _mpic_irq_read: val 0x480004 shadow 0x480004
>
>
>
> cheers
>
[-- Attachment #1.2: Type: text/html, Size: 2541 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 260 bytes --]
^ permalink raw reply
* Inline Assembly queries
From: kernel mailz @ 2009-06-27 19:46 UTC (permalink / raw)
To: gcc-help, gcc-help-help, linuxppc-dev
Hello All the gurus,
I've been fiddling my luck with gcc 4.3.2 inline assembly on powerpc
There are a few queries
1. asm volatile or simply asm produce the same assembly code.
Tried with a few examples but didnt find any difference by adding
volatile with asm
2. Use of "memory" and clobbered registers.
"memory" -
a. announce to the compiler that the memory has been modified
b. this instruction writes to some memory (other than a listed output)
and GCC shouldn=92t cache memory values in registers across this asm.
I tried with stw and stwcx instruction, adding "memory" has no effect.
Is there any example scenerio where gcc would generate different
assembly by adding / removing "memory" ?
-TZ
^ permalink raw reply
* Re: Trouble "Transferring control to Linux (at address 00000000)"
From: Frank Svendsbøe @ 2009-06-27 21:01 UTC (permalink / raw)
To: Mikhail Zaturenskiy; +Cc: Scott Wood, linuxppc-dev
In-Reply-To: <97dd5fd20906261012h34a85b33j9183eb9e41ed1181@mail.gmail.com>
On Fri, Jun 26, 2009 at 7:12 PM, Mikhail
Zaturenskiy<mzaturenskiy.st@gmail.com> wrote:
> Hi Scott,
>
>> This isn't the denx list;
> I've noticed :) but I'm still learning about this whole process so I
> though I could get some general suggestions.
>
>> what kernel version is that, and with what
>> modifications from mainline?
> Kernel is v2.6.30, I'm not yet familiar enough with it to know what's
> been modified from mainline, just following instructions.
>
>> Note that ep88xc.dts in mainline is intended for use with PlanetCore, wh=
ich
>> is what ships on that board. =A0You may need to make modifications for i=
t to
>> work with u-boot (at the least, the IMMR base is probably different).
> Hmm, this hasn't occurred to me, thank you for pointing it out.
>
I don't have access to this board, but have experience with a similar
one (Adder 875), and
I might be able to help out. Scott's right. According to U-Boots
include/configs/EP88x.h,
CONFIG_SYS_IMMR is 0xf0000000, but the Linux the ep88xc.dts is
referring to an IMMR set
to 0xfa200000. Replace every instance of 0xfa20 with 0xf000, and it may wor=
k.
>> Also, make sure u-boot is properly updating the memory size in the devic=
e
>> tree. =A0Can you dump the post-fixup device tree in u-boot?
> Not sure, but I'll try to find out if that's possible. It'd certainly
> answer a lot of questions...
>
> Thanks,
> Mikhail Zaturenskiy
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
>
^ permalink raw reply
* Re: sym scsi driver problem with 2.6.26 or newer debian kernel on p610 (fwd)
From: Benjamin Herrenschmidt @ 2009-06-27 22:54 UTC (permalink / raw)
To: blackluck
Cc: Olof Johansson, debian-powerpc, Guennadi Liakhovetski,
linuxppc-dev
In-Reply-To: <4A465AF5.9000606@ktk.bme.hu>
On Sat, 2009-06-27 at 19:46 +0200, Laszlo Fekete wrote:
> Hello!
>
> Thank you very much, this patch works me too.
>
> Maybe this patch will be in the debian kernel someday?
The patch isn't actually correct just yet :-) Michael will
be posting a proper one next week. It should be possible to
request its inclusion into debian separately, we'll probably
send it to stable@kernel.org as well.
Cheers,
Ben.
> Thank you: blackluck
>
> Michael Ellerman wrote:
> > On Wed, 2009-06-24 at 15:56 +1000, Benjamin Herrenschmidt wrote:
> >
> > > On Wed, 2009-06-24 at 15:53 +1000, Michael Ellerman wrote:
> > >
> > > > Doesn't fix my machine :/
> > > >
> > > >
> > > That doesn't make sense ... What if you remove the bit inside the ifdef
> > > CONFIG_MPIC_BROKEN_REGREAD in _mpic_read() ?
> > >
> > > If that makes a difference, then it would be interesting to add a printk
> > > in there that prints what the original value "val" is and what we have
> > > in the shadow...
> > >
> >
> > With this patch it boots:
> >
> > diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
> > index 2353adc..fc17289 100644
> > --- a/arch/powerpc/sysdev/mpic.c
> > +++ b/arch/powerpc/sysdev/mpic.c
> > @@ -231,13 +231,16 @@ static inline u32 _mpic_irq_read(struct mpic *mpic, unsign
> > unsigned int isu = src_no >> mpic->isu_shift;
> > unsigned int idx = src_no & mpic->isu_mask;
> > unsigned int val;
> > + unsigned int shadow;
> >
> > val = _mpic_read(mpic->reg_type, &mpic->isus[isu],
> > reg + (idx * MPIC_INFO(IRQ_STRIDE)));
> > #ifdef CONFIG_MPIC_BROKEN_REGREAD
> > - if (reg == 0)
> > - val = (val & (MPIC_VECPRI_MASK | MPIC_VECPRI_ACTIVITY)) |
> > + if (reg == 0) {
> > + shadow = (val & (MPIC_VECPRI_MASK | MPIC_VECPRI_ACTIVITY)) |
> > mpic->isu_reg0_shadow[idx];
> > + printk("%s: val 0x%x shadow 0x%x\n", __func__, val, shadow);
> > + }
> > #endif
> > return val;
> > }
> >
> >
> > And I see:
> >
> > sym53c8xx 0000:00:0c.0: enabling device (0140 -> 0143)
> > sym0: <896> rev 0x7 at pci 0000:00:0c.0 irq 17
> > sym0: No NVRAM, ID 7, Fast-40, SE, parity checking
> > _mpic_irq_read: val 0x80480004 shadow 0x80080014
> > _mpic_irq_read: val 0x480004 shadow 0x480004
> >
> >
> >
> > cheers
> >
^ permalink raw reply
* Re: Inline Assembly queries
From: kernel mailz @ 2009-06-28 4:57 UTC (permalink / raw)
To: Ian Lance Taylor; +Cc: gcc-help, linuxppc-dev
In-Reply-To: <m3ab3t4623.fsf@google.com>
Thanks Ian,
For the "memory" clobber
I tried with the a function in linux kernel
--
/*
* Atomic exchange
*
* Changes the memory location '*ptr' to be val and returns
* the previous value stored there.
*/
static inline unsigned long
__xchg_u32(volatile void *p, unsigned long val)
{
unsigned long prev;
__asm__ __volatile__(
"1: lwarx %0,0,%2 \n"
" stwcx. %3,0,%2 \n\
bne- 1b"
: "=3D&r" (prev), "+m" (*(volatile unsigned int *)p)
: "r" (p), "r" (val)
// :"memory","cc");
return prev;
}
#define ADDR 0x1000
int main()
{
__xchg_u32((void*)ADDR, 0x2000);
__xchg_u32((void*)ADDR, 0x3000);
return 0;
}
Got the same asm, when compiled with O1 , with / without "memory" clobber
100003fc <main>:
100003fc: 39 20 10 00 li r9,4096
10000400: 38 00 20 00 li r0,8192
10000404: 7d 60 48 28 lwarx r11,0,r9
10000408: 7c 00 49 2d stwcx. r0,0,r9
1000040c: 40 a2 ff f8 bne- 10000404 <main+0x8>
10000410: 38 00 30 00 li r0,12288
10000414: 7d 60 48 28 lwarx r11,0,r9
10000418: 7c 00 49 2d stwcx. r0,0,r9
1000041c: 40 a2 ff f8 bne- 10000414 <main+0x18>
10000420: 38 60 00 00 li r3,0
10000424: 4e 80 00 20 blr
No diff ?
am I choosing the right example ?
-TZ
On Sun, Jun 28, 2009 at 4:50 AM, Ian Lance Taylor<iant@google.com> wrote:
> kernel mailz <kernelmailz@googlemail.com> writes:
>
>> I've been fiddling my luck with gcc 4.3.2 inline assembly on powerpc
>> There are a few queries
>>
>> 1. asm volatile or simply asm produce the same assembly code.
>> Tried with a few examples but didnt find any difference by adding
>> volatile with asm
>>
>> 2. Use of "memory" and clobbered registers.
>>
>> "memory" -
>> a. announce to the compiler that the memory has been modified
>> b. this instruction writes to some memory (other than a listed output)
>> and GCC shouldn=92t cache memory values in registers across this asm.
>>
>> I tried with stw and stwcx instruction, adding "memory" has no effect.
>>
>> Is there any example scenerio where gcc would generate different
>> assembly by adding / removing "memory" ?
>
> Please never send a message to both gcc@gcc.gnu.org and
> gcc-help@gcc.gnu.org. =A0This message is appropriate for
> gcc-help@gcc.gnu.org, not for gcc@gcc.gnu.org. =A0Thanks.
>
> An asm with no outputs is always considered to be volatile. =A0To see the
> affect of volatile, just try something like
> =A0 =A0asm ("# modify %0" : "=3Dr" (i) : /* no inputs */ : /* no clobbers=
*/);
> Try it with and without optimization.
>
> As the documentation says, the effect of adding a "memory" clobber is
> that gcc does not cache values in registers across the asm. =A0So the
> effect will be shown in something like
> =A0int i =3D *p;
> =A0asm volatile ("# read %0" : : "r" (i));
> =A0return *p;
> The memory clobber will only make a different when optimizing.
>
> Ian
>
^ permalink raw reply
* [PATCH 1/2] alsa/soc: Fix typo in MPC5200 PSC AC97 driver Kconfig
From: Grant Likely @ 2009-06-28 7:41 UTC (permalink / raw)
To: jonsmirl, linuxppc-dev, alsa-devel, broonie, timur
From: Grant Likely <grant.likely@secretlab.ca>
ALSA SoC drivers should be specify SND_SOC_AC97_BUS instead, not AC97_BUS.
Without SND_SOC_AC97_BUS defined, an AC97 device will not get correctly
registered on the AC97 bus, which prevents thinks like the WM9712
touchscreen driver from getting probed.
Tested against 2.6.31-rc1.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---
sound/soc/fsl/Kconfig | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/sound/soc/fsl/Kconfig b/sound/soc/fsl/Kconfig
index 5dbebf8..5661876 100644
--- a/sound/soc/fsl/Kconfig
+++ b/sound/soc/fsl/Kconfig
@@ -33,7 +33,7 @@ config SND_SOC_MPC5200_I2S
config SND_SOC_MPC5200_AC97
tristate "Freescale MPC5200 PSC in AC97 mode driver"
depends on PPC_MPC52xx && PPC_BESTCOMM
- select AC97_BUS
+ select SND_SOC_AC97_BUS
select SND_MPC52xx_DMA
select PPC_BESTCOMM_GEN_BD
help
^ permalink raw reply related
* [PATCH 2/2] sound/soc: remove BROKEN from Efika and pcm030 fabric drivers
From: Grant Likely @ 2009-06-28 7:42 UTC (permalink / raw)
To: jonsmirl, linuxppc-dev, alsa-devel, broonie, timur
In-Reply-To: <20090628074109.26905.9927.stgit@localhost.localdomain>
From: Grant Likely <grant.likely@secretlab.ca>
The needed spin_event_timeout() macro is now merged in from the
powerpc tree, so these drivers are no longer broken. This reverts
commit 0c0e09e21a9e7bc6ca54e06ef3d497255ca26383 (ASoC: Mark MPC5200
AC97 as BROKEN until PowerPC merge issues are resolved)
Tested against 2.6.31-rc1.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---
sound/soc/fsl/Kconfig | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/fsl/Kconfig b/sound/soc/fsl/Kconfig
index 5661876..8cb65cc 100644
--- a/sound/soc/fsl/Kconfig
+++ b/sound/soc/fsl/Kconfig
@@ -41,7 +41,7 @@ config SND_SOC_MPC5200_AC97
config SND_MPC52xx_SOC_PCM030
tristate "SoC AC97 Audio support for Phytec pcm030 and WM9712"
- depends on PPC_MPC5200_SIMPLE && BROKEN
+ depends on PPC_MPC5200_SIMPLE
select SND_SOC_MPC5200_AC97
select SND_SOC_WM9712
help
@@ -50,7 +50,7 @@ config SND_MPC52xx_SOC_PCM030
config SND_MPC52xx_SOC_EFIKA
tristate "SoC AC97 Audio support for bbplan Efika and STAC9766"
- depends on PPC_EFIKA && BROKEN
+ depends on PPC_EFIKA
select SND_SOC_MPC5200_AC97
select SND_SOC_STAC9766
help
^ permalink raw reply related
* [PATCH 15/62] drivers/dma/fsldma.c: Remove unnecessary semicolons
From: Joe Perches @ 2009-06-28 16:26 UTC (permalink / raw)
To: linux-kernel
Cc: trivial, linuxppc-dev, Maciej Sosnowski, Zhang Wei, Andrew Morton,
Li Yang, Dan Williams
In-Reply-To: <cover.1246173664.git.joe@perches.com>
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/dma/fsldma.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/dma/fsldma.c b/drivers/dma/fsldma.c
index f18d1bd..71ce8ed 100644
--- a/drivers/dma/fsldma.c
+++ b/drivers/dma/fsldma.c
@@ -136,7 +136,7 @@ static int dma_is_idle(struct fsl_dma_chan *fsl_chan)
static void dma_start(struct fsl_dma_chan *fsl_chan)
{
- u32 mr_set = 0;;
+ u32 mr_set = 0;
if (fsl_chan->feature & FSL_DMA_CHAN_PAUSE_EXT) {
DMA_OUT(fsl_chan, &fsl_chan->reg_base->bcr, 0, 32);
--
1.6.3.1.10.g659a0.dirty
^ permalink raw reply related
* [PATCH 05/62] arch/powerpc: Remove unnecessary semicolons
From: Joe Perches @ 2009-06-28 16:26 UTC (permalink / raw)
To: linux-kernel
Cc: trivial, Robert Richter, linuxppc-dev, oprofile-list,
Andrew Morton, cbe-oss-dev
In-Reply-To: <cover.1246173664.git.joe@perches.com>
Signed-off-by: Joe Perches <joe@perches.com>
---
arch/powerpc/mm/tlb_hash64.c | 2 +-
arch/powerpc/oprofile/cell/vma_map.c | 2 +-
arch/powerpc/platforms/powermac/cpufreq_64.c | 2 +-
arch/powerpc/platforms/powermac/pic.c | 2 +-
arch/powerpc/platforms/ps3/system-bus.c | 1 -
arch/powerpc/sysdev/fsl_rio.c | 2 +-
arch/powerpc/sysdev/ppc4xx_pci.c | 4 ++--
7 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/arch/powerpc/mm/tlb_hash64.c b/arch/powerpc/mm/tlb_hash64.c
index 1be1b5e..937eb90 100644
--- a/arch/powerpc/mm/tlb_hash64.c
+++ b/arch/powerpc/mm/tlb_hash64.c
@@ -72,7 +72,7 @@ void hpte_need_flush(struct mm_struct *mm, unsigned long addr,
*/
if (huge) {
#ifdef CONFIG_HUGETLB_PAGE
- psize = get_slice_psize(mm, addr);;
+ psize = get_slice_psize(mm, addr);
#else
BUG();
psize = pte_pagesize_index(mm, addr, pte); /* shutup gcc */
diff --git a/arch/powerpc/oprofile/cell/vma_map.c b/arch/powerpc/oprofile/cell/vma_map.c
index 258fa44..c591339 100644
--- a/arch/powerpc/oprofile/cell/vma_map.c
+++ b/arch/powerpc/oprofile/cell/vma_map.c
@@ -185,7 +185,7 @@ struct vma_to_fileoffset_map *create_vma_map(const struct spu *aSpu,
goto fail;
if (shdr_str.sh_type != SHT_STRTAB)
- goto fail;;
+ goto fail;
for (j = 0; j < shdr.sh_size / sizeof (sym); j++) {
if (copy_from_user(&sym, spu_elf_start +
diff --git a/arch/powerpc/platforms/powermac/cpufreq_64.c b/arch/powerpc/platforms/powermac/cpufreq_64.c
index 22ecfbe..708c751 100644
--- a/arch/powerpc/platforms/powermac/cpufreq_64.c
+++ b/arch/powerpc/platforms/powermac/cpufreq_64.c
@@ -251,7 +251,7 @@ static void g5_pfunc_switch_volt(int speed_mode)
static struct pmf_function *pfunc_cpu_setfreq_high;
static struct pmf_function *pfunc_cpu_setfreq_low;
static struct pmf_function *pfunc_cpu_getfreq;
-static struct pmf_function *pfunc_slewing_done;;
+static struct pmf_function *pfunc_slewing_done;
static int g5_pfunc_switch_freq(int speed_mode)
{
diff --git a/arch/powerpc/platforms/powermac/pic.c b/arch/powerpc/platforms/powermac/pic.c
index dce7363..d212006 100644
--- a/arch/powerpc/platforms/powermac/pic.c
+++ b/arch/powerpc/platforms/powermac/pic.c
@@ -609,7 +609,7 @@ static int pmacpic_find_viaint(void)
np = of_find_node_by_name(NULL, "via-pmu");
if (np == NULL)
goto not_found;
- viaint = irq_of_parse_and_map(np, 0);;
+ viaint = irq_of_parse_and_map(np, 0);
not_found:
#endif /* CONFIG_ADB_PMU */
diff --git a/arch/powerpc/platforms/ps3/system-bus.c b/arch/powerpc/platforms/ps3/system-bus.c
index 9fead0f..3f763c5 100644
--- a/arch/powerpc/platforms/ps3/system-bus.c
+++ b/arch/powerpc/platforms/ps3/system-bus.c
@@ -284,7 +284,6 @@ static int ps3_sb_free_mmio_region(struct ps3_mmio_region *r)
int result;
dump_mmio_region(r);
-;
result = lv1_unmap_device_mmio_region(r->dev->bus_id, r->dev->dev_id,
r->lpar_addr);
diff --git a/arch/powerpc/sysdev/fsl_rio.c b/arch/powerpc/sysdev/fsl_rio.c
index 39db9d1..cbb3bed 100644
--- a/arch/powerpc/sysdev/fsl_rio.c
+++ b/arch/powerpc/sysdev/fsl_rio.c
@@ -965,7 +965,7 @@ static inline void fsl_rio_info(struct device *dev, u32 ccsr)
break;
default:
str = "Unknown";
- break;;
+ break;
}
dev_info(dev, "Hardware port width: %s\n", str);
diff --git a/arch/powerpc/sysdev/ppc4xx_pci.c b/arch/powerpc/sysdev/ppc4xx_pci.c
index daefc93..6ff9d71 100644
--- a/arch/powerpc/sysdev/ppc4xx_pci.c
+++ b/arch/powerpc/sysdev/ppc4xx_pci.c
@@ -1531,7 +1531,7 @@ static void __init ppc4xx_configure_pciex_PIMs(struct ppc4xx_pciex_port *port,
*/
/* Calculate window size */
- sa = (0xffffffffffffffffull << ilog2(ep_size));;
+ sa = (0xffffffffffffffffull << ilog2(ep_size));
/* Setup BAR0 */
out_le32(mbase + PECFG_BAR0HMPA, RES_TO_U32_HIGH(sa));
@@ -1550,7 +1550,7 @@ static void __init ppc4xx_configure_pciex_PIMs(struct ppc4xx_pciex_port *port,
out_le32(mbase + PCI_BASE_ADDRESS_1, RES_TO_U32_HIGH(ep_addr));
} else {
/* Calculate window size */
- sa = (0xffffffffffffffffull << ilog2(size));;
+ sa = (0xffffffffffffffffull << ilog2(size));
if (res->flags & IORESOURCE_PREFETCH)
sa |= 0x8;
--
1.6.3.1.10.g659a0.dirty
^ permalink raw reply related
* Re: [PATCH 1/2] alsa/soc: Fix typo in MPC5200 PSC AC97 driver Kconfig
From: Jon Smirl @ 2009-06-28 18:06 UTC (permalink / raw)
To: Grant Likely; +Cc: linuxppc-dev, alsa-devel, broonie, timur
In-Reply-To: <20090628074109.26905.9927.stgit@localhost.localdomain>
On Sun, Jun 28, 2009 at 3:41 AM, Grant Likely<grant.likely@secretlab.ca> wr=
ote:
> From: Grant Likely <grant.likely@secretlab.ca>
>
> ALSA SoC drivers should be specify SND_SOC_AC97_BUS instead, not AC97_BUS=
.
> Without SND_SOC_AC97_BUS defined, an AC97 device will not get correctly
> registered on the AC97 bus, which prevents thinks like the WM9712
> touchscreen driver from getting probed.
>
> Tested against 2.6.31-rc1.
>
> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Jon Smirl <jonsmirl@gmail.com>
> ---
>
> =A0sound/soc/fsl/Kconfig | =A0 =A02 +-
> =A01 files changed, 1 insertions(+), 1 deletions(-)
>
>
> diff --git a/sound/soc/fsl/Kconfig b/sound/soc/fsl/Kconfig
> index 5dbebf8..5661876 100644
> --- a/sound/soc/fsl/Kconfig
> +++ b/sound/soc/fsl/Kconfig
> @@ -33,7 +33,7 @@ config SND_SOC_MPC5200_I2S
> =A0config SND_SOC_MPC5200_AC97
> =A0 =A0 =A0 =A0tristate "Freescale MPC5200 PSC in AC97 mode driver"
> =A0 =A0 =A0 =A0depends on PPC_MPC52xx && PPC_BESTCOMM
> - =A0 =A0 =A0 select AC97_BUS
> + =A0 =A0 =A0 select SND_SOC_AC97_BUS
> =A0 =A0 =A0 =A0select SND_MPC52xx_DMA
> =A0 =A0 =A0 =A0select PPC_BESTCOMM_GEN_BD
> =A0 =A0 =A0 =A0help
>
>
--=20
Jon Smirl
jonsmirl@gmail.com
^ permalink raw reply
* Re: [PATCH 2/2] sound/soc: remove BROKEN from Efika and pcm030 fabric drivers
From: Jon Smirl @ 2009-06-28 18:06 UTC (permalink / raw)
To: Grant Likely; +Cc: linuxppc-dev, alsa-devel, broonie, timur
In-Reply-To: <20090628074158.26905.36950.stgit@localhost.localdomain>
On Sun, Jun 28, 2009 at 3:42 AM, Grant Likely<grant.likely@secretlab.ca> wr=
ote:
> From: Grant Likely <grant.likely@secretlab.ca>
>
> The needed spin_event_timeout() macro is now merged in from the
> powerpc tree, so these drivers are no longer broken. =A0This reverts
> commit 0c0e09e21a9e7bc6ca54e06ef3d497255ca26383 (ASoC: Mark MPC5200
> AC97 as BROKEN until PowerPC merge issues are resolved)
>
> Tested against 2.6.31-rc1.
>
> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Jon Smirl <jonsmirl@gmail.com>
> ---
>
> =A0sound/soc/fsl/Kconfig | =A0 =A04 ++--
> =A01 files changed, 2 insertions(+), 2 deletions(-)
>
>
> diff --git a/sound/soc/fsl/Kconfig b/sound/soc/fsl/Kconfig
> index 5661876..8cb65cc 100644
> --- a/sound/soc/fsl/Kconfig
> +++ b/sound/soc/fsl/Kconfig
> @@ -41,7 +41,7 @@ config SND_SOC_MPC5200_AC97
>
> =A0config SND_MPC52xx_SOC_PCM030
> =A0 =A0 =A0 =A0tristate "SoC AC97 Audio support for Phytec pcm030 and WM9=
712"
> - =A0 =A0 =A0 depends on PPC_MPC5200_SIMPLE && BROKEN
> + =A0 =A0 =A0 depends on PPC_MPC5200_SIMPLE
> =A0 =A0 =A0 =A0select SND_SOC_MPC5200_AC97
> =A0 =A0 =A0 =A0select SND_SOC_WM9712
> =A0 =A0 =A0 =A0help
> @@ -50,7 +50,7 @@ config SND_MPC52xx_SOC_PCM030
>
> =A0config SND_MPC52xx_SOC_EFIKA
> =A0 =A0 =A0 =A0tristate "SoC AC97 Audio support for bbplan Efika and STAC=
9766"
> - =A0 =A0 =A0 depends on PPC_EFIKA && BROKEN
> + =A0 =A0 =A0 depends on PPC_EFIKA
> =A0 =A0 =A0 =A0select SND_SOC_MPC5200_AC97
> =A0 =A0 =A0 =A0select SND_SOC_STAC9766
> =A0 =A0 =A0 =A0help
>
>
--=20
Jon Smirl
jonsmirl@gmail.com
^ permalink raw reply
* [PATCH] powerpc: Have Warp take advantage of GPIO LEDs default-state = keep
From: Sean MacLennan @ 2009-06-28 21:22 UTC (permalink / raw)
To: linuxppc-dev, Josh Boyer
Yes, it's me again. The GPIO LEDs default-state = keep patch was
accepted into the kernel. This patch takes advantage of that patch.
It would be nice if the patch made it into 2.6.31 since this was my last
outstanding patch. I really didn't think the "keep" patch would be
accepted in this release.
But at minimum, it would be nice if the DTS change went in. I actually
held back on a change to warp.c that made the LEDS work correctly if
AD7414 was not configured. The "keep" makes that change unnecessary...
but you need the dts fix.
The DTS fix is just two lines and is fully backwards compatible. The
warp.c patch just removes the hardcoding of the two LEDs.
Now I have to get used to the LED not glitching on startup ;)
Cheers,
Sean
The GPIO LEDS driver now has a default-state of keep. Since u-boot sets the initial
LED state on the Warp, take advantage of this new state.
Signed-off-by: Sean MacLennan <smaclennan@pikatech.com>
---
diff --git a/arch/powerpc/boot/dts/warp.dts b/arch/powerpc/boot/dts/warp.dts
index 01bfb56..31605ee 100644
--- a/arch/powerpc/boot/dts/warp.dts
+++ b/arch/powerpc/boot/dts/warp.dts
@@ -261,10 +261,11 @@
compatible = "gpio-leds";
green {
gpios = <&GPIO1 0 0>;
- default-state = "on";
+ default-state = "keep";
};
red {
gpios = <&GPIO1 1 0>;
+ default-state = "keep";
};
};
diff --git a/arch/powerpc/platforms/44x/warp.c b/arch/powerpc/platforms/44x/warp.c
index 0362c88..9916b39 100644
--- a/arch/powerpc/platforms/44x/warp.c
+++ b/arch/powerpc/platforms/44x/warp.c
@@ -64,8 +64,6 @@ define_machine(warp) {
};
-static u32 post_info;
-
static int __init warp_post_info(void)
{
struct device_node *np;
@@ -87,10 +85,9 @@ static int __init warp_post_info(void)
iounmap(fpga);
- if (post1 || post2) {
+ if (post1 || post2)
printk(KERN_INFO "Warp POST %08x %08x\n", post1, post2);
- post_info = 1;
- } else
+ else
printk(KERN_INFO "Warp POST OK\n");
return 0;
@@ -179,15 +176,10 @@ static int pika_setup_leds(void)
}
for_each_child_of_node(np, child)
- if (strcmp(child->name, "green") == 0) {
+ if (strcmp(child->name, "green") == 0)
green_led = of_get_gpio(child, 0);
- /* Turn back on the green LED */
- gpio_set_value(green_led, 1);
- } else if (strcmp(child->name, "red") == 0) {
+ else if (strcmp(child->name, "red") == 0)
red_led = of_get_gpio(child, 0);
- /* Set based on post */
- gpio_set_value(red_led, post_info);
- }
of_node_put(np);
^ permalink raw reply related
* Re: [PATCH] powerpc: Have Warp take advantage of GPIO LEDs default-state = keep
From: Josh Boyer @ 2009-06-29 0:14 UTC (permalink / raw)
To: Sean MacLennan; +Cc: linuxppc-dev
In-Reply-To: <20090628172251.7bc0c8e0@lappy.seanm.ca>
On Sun, Jun 28, 2009 at 05:22:51PM -0400, Sean MacLennan wrote:
>Yes, it's me again. The GPIO LEDs default-state = keep patch was
>accepted into the kernel. This patch takes advantage of that patch.
I haven't forgotten about your patches. Will try and get them pulled together
and send them on to Ben tomorrow.
Thanks,
josh
^ permalink raw reply
* [PATCH] powerpc/mpic: fix WARN_ON from alloc_bootmem
From: Jeremy Kerr @ 2009-06-29 6:36 UTC (permalink / raw)
To: linuxppc-dev; +Cc: cbe-oss-dev
Current powerpc/merge on a QS21 reports an oops on boot:
------------[ cut here ]------------
Badness at mm/bootmem.c:535
[snip]
Call Trace:
[c000000000763a80] [c0000000005dd068] .alloc_arch_preferred_bootmem+0x28/0x9c (unreliable)
[c000000000763b10] [c0000000005ddaac] .___alloc_bootmem_nopanic+0x5c/0x130
[c000000000763bc0] [c0000000005ddbd8] .___alloc_bootmem+0x28/0x68
[c000000000763c50] [c0000000005dddf0] .__alloc_bootmem+0x1c/0x30
[c000000000763cd0] [c0000000005d1080] .mpic_alloc+0x20c/0x9f8
[c000000000763dc0] [c0000000005d3348] .cell_init_irq+0x70/0x114
[c000000000763e60] [c0000000005c41f8] .init_IRQ+0x44/0x64
[c000000000763ee0] [c0000000005c0914] .start_kernel+0x238/0x440
[c000000000763f90] [c000000000007368] .start_here_common+0x1c/0x34
Looks like we're using alloc_bootmem after the slab is up and running,
in mpic_init.
This change uses a kzalloc instead - in fact, we've already done a
kzalloc() earlier in this function.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
---
arch/powerpc/sysdev/mpic.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
index d46de1f..a5980e6 100644
--- a/arch/powerpc/sysdev/mpic.c
+++ b/arch/powerpc/sysdev/mpic.c
@@ -1109,9 +1109,8 @@ struct mpic * __init mpic_alloc(struct device_node *node,
psize /= 4;
bits = intvec_top + 1;
mapsize = BITS_TO_LONGS(bits) * sizeof(unsigned long);
- mpic->protected = alloc_bootmem(mapsize);
+ mpic->protected = kzalloc(mapsize, GFP_KERNEL);
BUG_ON(mpic->protected == NULL);
- memset(mpic->protected, 0, mapsize);
for (i = 0; i < psize; i++) {
if (psrc[i] > intvec_top)
continue;
^ permalink raw reply related
* Re: AW: PowerPC PCI DMA issues (prefetch/coherency?)
From: Chris Pringle @ 2009-06-29 8:11 UTC (permalink / raw)
To: Sergej.Stepanov; +Cc: scottwood, linuxppc-dev, linux-kernel
In-Reply-To: <4206182445660643B9AEB8D4E55BBD0A08533B67B5@HERMES2>
[-- Attachment #1: Type: text/plain, Size: 1463 bytes --]
Hi Sergej,
I've attached the patch used to fix this issue. Both the patch to
pgtable32.h and head_32.S are required in order to make it work. The
change to pgtable32.h ensures that all pages are marked cache coherent
(results in setting the M bit). The change to head_32.S ensures that the
M bit is not unconditionally masked out - it should only be masked out
if CPU_FTR_NEED_COHERENT is not set.
Hope this helps.
Cheers,
Chris
Sergej.Stepanov@ids.de wrote:
>> The other part of the fix is in asm-powerpc/pgtable32.h. _PAGE_BASE
>> needs _PAGE_COHERENT in order to work correctly, and in fact there is
>> now a comment in there to that affect in 2.6.29. Backporting that change
>> has made it work on 2.6.26. Both this patch, and the fix to head_32.S
>> are needed for it to work correctly on older kernels.
>>
>> Chris
>>
>
> Hello Chris,
>
> sorry for dummy, but if it possible, could you, please, send a corresponding summary patch of backporting you've done for older kernels?
> or just summary of that changes once again?
>
> Many thanks
>
> Sergej.
--
______________________________
Chris Pringle
Software Engineer
Miranda Technologies Ltd.
Hithercroft Road
Wallingford
Oxfordshire OX10 9DG
UK
Tel. +44 1491 820206
Fax. +44 1491 820001
www.miranda.com
____________________________
Miranda Technologies Limited
Registered in England and Wales CN 02017053
Registered Office: James House, Mere Park, Dedmere Road, Marlow, Bucks, SL7 1FJ
[-- Attachment #2: dma-cache-coherency-fix.patch --]
[-- Type: text/x-patch, Size: 2590 bytes --]
diff -r -U3 ./arch/powerpc/kernel/head_32.S ../../kernel.WORKS/linux-2.6.26/arch/powerpc/kernel/head_32.S
--- ./arch/powerpc/kernel/head_32.S 2008-07-13 22:51:29.000000000 +0100
+++ ../../kernel.WORKS/linux-2.6.26/arch/powerpc/kernel/head_32.S 2009-06-17 18:18:04.000000000 +0100
@@ -501,8 +501,11 @@
and r1,r1,r2 /* writable if _RW and _DIRTY */
rlwimi r3,r3,32-1,30,30 /* _PAGE_USER -> PP msb */
rlwimi r3,r3,32-1,31,31 /* _PAGE_USER -> PP lsb */
- ori r1,r1,0xe14 /* clear out reserved bits and M */
+ ori r1,r1,0xe04 /* clear out reserved bits */
andc r1,r3,r1 /* PP = user? (rw&dirty? 2: 3): 0 */
+BEGIN_FTR_SECTION
+ rlwinm r1,r1,0,~_PAGE_COHERENT /* clear M (coherence not required) */
+END_FTR_SECTION_IFCLR(CPU_FTR_NEED_COHERENT)
mtspr SPRN_RPA,r1
mfspr r3,SPRN_IMISS
tlbli r3
@@ -575,8 +578,12 @@
and r1,r1,r2 /* writable if _RW and _DIRTY */
rlwimi r3,r3,32-1,30,30 /* _PAGE_USER -> PP msb */
rlwimi r3,r3,32-1,31,31 /* _PAGE_USER -> PP lsb */
- ori r1,r1,0xe14 /* clear out reserved bits and M */
+ ori r1,r1,0xe04 /* clear out reserved bits */
andc r1,r3,r1 /* PP = user? (rw&dirty? 2: 3): 0 */
+BEGIN_FTR_SECTION
+ rlwinm r1,r1,0,~_PAGE_COHERENT /* clear M (coherence not required) */
+END_FTR_SECTION_IFCLR(CPU_FTR_NEED_COHERENT)
+ /*ori r1,r1,0x10*/
mtspr SPRN_RPA,r1
mfspr r3,SPRN_DMISS
tlbld r3
@@ -643,8 +650,12 @@
stw r3,0(r2) /* update PTE (accessed/dirty bits) */
/* Convert linux-style PTE to low word of PPC-style PTE */
rlwimi r3,r3,32-1,30,30 /* _PAGE_USER -> PP msb */
- li r1,0xe15 /* clear out reserved bits and M */
+ li r1,0xe05 /* clear out reserved bits & PP lsb */
andc r1,r3,r1 /* PP = user? 2: 0 */
+BEGIN_FTR_SECTION
+ rlwinm r1,r1,0,~_PAGE_COHERENT /* clear M (coherence not required) */
+END_FTR_SECTION_IFCLR(CPU_FTR_NEED_COHERENT)
+ /*ori r1,r1,0x10*/
mtspr SPRN_RPA,r1
mfspr r3,SPRN_DMISS
tlbld r3
diff -r -U3 ./include/asm-powerpc/pgtable-ppc32.h ../../kernel.WORKS/linux-2.6.26/include/asm-powerpc/pgtable-ppc32.h
--- ./include/asm-powerpc/pgtable-ppc32.h 2008-07-13 22:51:29.000000000 +0100
+++ ../../kernel.WORKS/linux-2.6.26/include/asm-powerpc/pgtable-ppc32.h 2009-06-18 12:11:57.000000000 +0100
@@ -408,7 +408,7 @@
#ifdef CONFIG_44x
#define _PAGE_BASE (_PAGE_PRESENT | _PAGE_ACCESSED | _PAGE_GUARDED)
#else
-#define _PAGE_BASE (_PAGE_PRESENT | _PAGE_ACCESSED)
+#define _PAGE_BASE (_PAGE_PRESENT | _PAGE_ACCESSED | _PAGE_COHERENT)
#endif
#define _PAGE_WRENABLE (_PAGE_RW | _PAGE_DIRTY | _PAGE_HWWRITE)
#define _PAGE_KERNEL (_PAGE_BASE | _PAGE_SHARED | _PAGE_WRENABLE)
^ permalink raw reply
* AW: Direct MII connection between MPC8313 and VIRTEX FPGA
From: Frank Prepelica @ 2009-06-29 8:23 UTC (permalink / raw)
To: Grant Likely; +Cc: linuxppc-dev
Hi Grant
Thanks for your response!
I have searched for "current-speed" in drivers/net/fec_mpc52xx.c but I =
cannot find anything. However we are using the gianfar.c Ethernet =
driver.
Do you know whether this driver supports fixed MII links without PHY?
I've got another question regarding MII connection between and MPC and a =
Virtex FPGA. Whats about the PHY address which has to be set in the DTB =
file? Do I have to modify the DTB at all?
Thank you!
Best regards
Frank
=20
=20
=20
=09
=20
=20
Frank Prepelica
Software Design Engineer
Ubidyne GmbH
Lise-Meitner-Str.-14
89081 Ulm - Germany
Phone: +49 731 88 00 71 58
Fax: +49 731 88 00 71 99
Email: frank.prepelica@ubidyne.com
Homepage: www.ubidyne.com
=20
Registered office: Ulm
District court of Ulm: HRB 5295
Managing Directors:
Dipl. Ing. Ken Hawk
Dipl. Ing. Beat M=FCller
Dipl. Ing. Mike Levis
> -----Urspr=FCngliche Nachricht-----
> Von: Grant Likely [mailto:grant.likely@secretlab.ca]
> Gesendet: Donnerstag, 25. Juni 2009 22:06
> An: Frank Prepelica
> Cc: linuxppc-dev@ozlabs.org
> Betreff: Re: Direct MII connection between MPC8313 and VIRTEX FPGA
>=20
> On Thu, Jun 25, 2009 at 9:11 AM, Frank
> Prepelica<Frank.Prepelica@ubidyne.com> wrote:
> > Hi all,
> >
> > we removed the ethernet PHYs (MARVELL) from our customized board =
(based
> on MPC8313ERDB) and
> > connected the CPU Ethernet lines directly to a FPGA which is now
> emulating the PHY. But the ifconfig
> > command cannot find that eth device anymore. Does the emulated PHY =
needs
> to provide MDIO
> > information that the ETH device can be found again?
>=20
> No, you just need to make sure that the Ethernet driver is able to
> support fixed speed MII links without a PHY. It's trivial to do, but
> not all drivers support it. Search for "current-speed" in
> drivers/net/fec_mpc52xx.c for an example.
>=20
> g.
>=20
> --
> Grant Likely, B.Sc., P.Eng.
> Secret Lab Technologies Ltd.
^ permalink raw reply
* Re: [PATCH 1/2] alsa/soc: Fix typo in MPC5200 PSC AC97 driver Kconfig
From: Mark Brown @ 2009-06-29 9:35 UTC (permalink / raw)
To: Grant Likely; +Cc: linuxppc-dev, alsa-devel, timur
In-Reply-To: <20090628074109.26905.9927.stgit@localhost.localdomain>
On Sun, Jun 28, 2009 at 01:41:52AM -0600, Grant Likely wrote:
> From: Grant Likely <grant.likely@secretlab.ca>
>
> ALSA SoC drivers should be specify SND_SOC_AC97_BUS instead, not AC97_BUS.
Applied both.
^ permalink raw reply
* [PATCH] sata_fsl: hard and soft reset split
From: Kalra Ashish-B00888 @ 2009-06-29 12:47 UTC (permalink / raw)
To: linux-ide; +Cc: linuxppc-dev
Split sata_fsl_softreset() into hard and soft resets to make
error-handling more efficient & device and PMP detection more reliable.
Also includes fix for PMP support, driver tested with Sil3726, Sil4726 &
Exar PMP controllers.
Signed-off-by: Ashish Kalra <Ashish.Kalra@freescale.com>
---
drivers/ata/sata_fsl.c | 85
+++++++++++++++++++++++++-----------------------
1 files changed, 44 insertions(+), 41 deletions(-)
diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c
index 5751145..c8e2fad 100644
--- a/drivers/ata/sata_fsl.c
+++ b/drivers/ata/sata_fsl.c
@@ -708,34 +708,17 @@ static unsigned int sata_fsl_dev_classify(struct
ata_port *ap)
return ata_dev_classify(&tf);
}
=20
-static int sata_fsl_prereset(struct ata_link *link, unsigned long
deadline)
-{
- /* FIXME: Never skip softreset, sata_fsl_softreset() is
- * combination of soft and hard resets. sata_fsl_softreset()
- * needs to be splitted into soft and hard resets.
- */
- return 0;
-}
-
-static int sata_fsl_softreset(struct ata_link *link, unsigned int
*class,
+static int sata_fsl_hardreset(struct ata_link *link, unsigned int
*class,
unsigned long deadline)
{
struct ata_port *ap =3D link->ap;
- struct sata_fsl_port_priv *pp =3D ap->private_data;
struct sata_fsl_host_priv *host_priv =3D ap->host->private_data;
void __iomem *hcr_base =3D host_priv->hcr_base;
- int pmp =3D sata_srst_pmp(link);
u32 temp;
- struct ata_taskfile tf;
- u8 *cfis;
- u32 Serror;
int i =3D 0;
unsigned long start_jiffies;
=20
- DPRINTK("in xx_softreset\n");
-
- if (pmp !=3D SATA_PMP_CTRL_PORT)
- goto issue_srst;
+ DPRINTK("in xx_hardreset\n");
=20
try_offline_again:
/*
@@ -750,7 +733,7 @@ try_offline_again:
=20
if (temp & ONLINE) {
ata_port_printk(ap, KERN_ERR,
- "Softreset failed, not off-lined %d\n",
i);
+ "Hardreset failed, not off-lined %d\n",
i);
=20
/*
* Try to offline controller atleast twice
@@ -762,7 +745,7 @@ try_offline_again:
goto try_offline_again;
}
=20
- DPRINTK("softreset, controller off-lined\n");
+ DPRINTK("hardreset, controller off-lined\n");
VPRINTK("HStatus =3D 0x%x\n", ioread32(hcr_base + HSTATUS));
VPRINTK("HControl =3D 0x%x\n", ioread32(hcr_base + HCONTROL));
=20
@@ -787,11 +770,11 @@ try_offline_again:
=20
if (!(temp & ONLINE)) {
ata_port_printk(ap, KERN_ERR,
- "Softreset failed, not on-lined\n");
+ "Hardreset failed, not on-lined\n");
goto err;
}
=20
- DPRINTK("softreset, controller off-lined & on-lined\n");
+ DPRINTK("hardreset, controller off-lined & on-lined\n");
VPRINTK("HStatus =3D 0x%x\n", ioread32(hcr_base + HSTATUS));
VPRINTK("HControl =3D 0x%x\n", ioread32(hcr_base + HCONTROL));
=20
@@ -807,7 +790,7 @@ try_offline_again:
"No Device OR PHYRDY change,Hstatus =3D
0x%x\n",
ioread32(hcr_base + HSTATUS));
*class =3D ATA_DEV_NONE;
- goto out;
+ return 0;
}
=20
/*
@@ -820,11 +803,44 @@ try_offline_again:
if ((temp & 0xFF) !=3D 0x18) {
ata_port_printk(ap, KERN_WARNING, "No Signature
Update\n");
*class =3D ATA_DEV_NONE;
- goto out;
+ goto do_followup_srst;
} else {
ata_port_printk(ap, KERN_INFO,
"Signature Update detected @ %d
msecs\n",
jiffies_to_msecs(jiffies -
start_jiffies));
+ *class =3D sata_fsl_dev_classify(ap);
+ return 0;
+ }
+
+do_followup_srst:
+ /*
+ * request libATA to perform follow-up softreset
+ */
+ return -EAGAIN;
+
+err:
+ return -EIO;
+}
+
+static int sata_fsl_softreset(struct ata_link *link, unsigned int
*class,
+ unsigned long deadline)
+{
+ struct ata_port *ap =3D link->ap;
+ struct sata_fsl_port_priv *pp =3D ap->private_data;
+ struct sata_fsl_host_priv *host_priv =3D ap->host->private_data;
+ void __iomem *hcr_base =3D host_priv->hcr_base;
+ int pmp =3D sata_srst_pmp(link);
+ u32 temp;
+ struct ata_taskfile tf;
+ u8 *cfis;
+ u32 Serror;
+
+ DPRINTK("in xx_softreset\n");
+
+ if (ata_link_offline(link)) {
+ DPRINTK("PHY reports no device\n");
+ *class =3D ATA_DEV_NONE;
+ return 0;
}
=20
/*
@@ -835,7 +851,6 @@ try_offline_again:
* reached here, we can send a command to the target device
*/
=20
-issue_srst:
DPRINTK("Sending SRST/device reset\n");
=20
ata_tf_init(link->device, &tf);
@@ -861,6 +876,8 @@ issue_srst:
ioread32(CA + hcr_base), ioread32(CC + hcr_base));
=20
iowrite32(0xFFFF, CC + hcr_base);
+ if (pmp !=3D SATA_PMP_CTRL_PORT)
+ iowrite32(pmp, CQPMP + hcr_base);
iowrite32(1, CQ + hcr_base);
=20
temp =3D ata_wait_register(CQ + hcr_base, 0x1, 0x1, 1, 5000);
@@ -927,7 +944,6 @@ issue_srst:
VPRINTK("cereg =3D 0x%x\n", ioread32(hcr_base + CE));
}
=20
-out:
return 0;
=20
err:
@@ -988,19 +1004,6 @@ static void sata_fsl_error_intr(struct ata_port
*ap)
if (hstatus & FATAL_ERROR_DECODE) {
ehi->err_mask |=3D AC_ERR_ATA_BUS;
ehi->action |=3D ATA_EH_SOFTRESET;
-
- /*
- * Ignore serror in case of fatal errors as we always
want
- * to do a soft-reset of the FSL SATA controller.
Analyzing
- * serror may cause libata to schedule a hard-reset
action,
- * and hard-reset currently does not do controller
- * offline/online, causing command timeouts and leads to
an
- * un-recoverable state, hence make libATA ignore
- * autopsy in case of fatal errors.
- */
-
- ehi->flags |=3D ATA_EHI_NO_AUTOPSY;
-
freeze =3D 1;
}
=20
@@ -1272,8 +1275,8 @@ static struct ata_port_operations sata_fsl_ops =3D =
{
=20
.freeze =3D sata_fsl_freeze,
.thaw =3D sata_fsl_thaw,
- .prereset =3D sata_fsl_prereset,
.softreset =3D sata_fsl_softreset,
+ .hardreset =3D sata_fsl_hardreset,
.pmp_softreset =3D sata_fsl_softreset,
.error_handler =3D sata_fsl_error_handler,
.post_internal_cmd =3D sata_fsl_post_internal_cmd,
--=20
1.6.0
^ permalink raw reply related
* [PATCH] sata_fsl: Add asynchronous notification support
From: ashish kalra @ 2009-06-29 13:22 UTC (permalink / raw)
To: linux-ide; +Cc: linuxppc-dev
Signed-off-by: Ashish Kalra <Ashish.Kalra@freescale.com>
---
drivers/ata/sata_fsl.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c
index 94eaa43..5751145 100644
--- a/drivers/ata/sata_fsl.c
+++ b/drivers/ata/sata_fsl.c
@@ -34,7 +34,7 @@ enum {
SATA_FSL_HOST_FLAGS = (ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY |
ATA_FLAG_MMIO | ATA_FLAG_PIO_DMA |
- ATA_FLAG_PMP | ATA_FLAG_NCQ),
+ ATA_FLAG_PMP | ATA_FLAG_NCQ | ATA_FLAG_AN),
SATA_FSL_MAX_CMDS = SATA_FSL_QUEUE_DEPTH,
SATA_FSL_CMD_HDR_SIZE = 16, /* 4 DWORDS */
@@ -132,7 +132,7 @@ enum {
INT_ON_SINGL_DEVICE_ERR = (1 << 1),
INT_ON_CMD_COMPLETE = 1,
- INT_ON_ERROR = INT_ON_FATAL_ERR |
+ INT_ON_ERROR = INT_ON_FATAL_ERR | INT_ON_SNOTIFY_UPDATE |
INT_ON_PHYRDY_CHG | INT_ON_SINGL_DEVICE_ERR,
/*
@@ -154,6 +154,7 @@ enum {
DEFAULT_PORT_IRQ_ENABLE_MASK = IE_ON_FATAL_ERR | IE_ON_PHYRDY_CHG |
IE_ON_SIGNATURE_UPDATE |
+ IE_ON_SNOTIFY_UPDATE |
IE_ON_SINGL_DEVICE_ERR | IE_ON_CMD_COMPLETE,
EXT_INDIRECT_SEG_PRD_FLAG = (1 << 31),
@@ -1003,6 +1004,11 @@ static void sata_fsl_error_intr(struct ata_port *ap)
freeze = 1;
}
+ /* Handle SDB FIS receive & notify update */
+ if (hstatus & INT_ON_SNOTIFY_UPDATE) {
+ sata_async_notification(ap);
+ }
+
/* Handle PHYRDY change notification */
if (hstatus & INT_ON_PHYRDY_CHG) {
DPRINTK("SATA FSL: PHYRDY change indication\n");
--
1.6.0
^ permalink raw reply related
* [RESEND][PATCH] sata_fsl: hard and soft reset split
From: ashish kalra @ 2009-06-29 13:26 UTC (permalink / raw)
To: linux-ide; +Cc: linuxppc-dev
Split sata_fsl_softreset() into hard and soft resets to make
error-handling more efficient & device and PMP detection more reliable.
Also includes fix for PMP support, driver tested with Sil3726, Sil4726 &
Exar PMP controllers.
Signed-off-by: Ashish Kalra <Ashish.Kalra@freescale.com>
---
drivers/ata/sata_fsl.c | 85 +++++++++++++++++++++++++-----------------------
1 files changed, 44 insertions(+), 41 deletions(-)
diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c
index 5751145..c8e2fad 100644
--- a/drivers/ata/sata_fsl.c
+++ b/drivers/ata/sata_fsl.c
@@ -708,34 +708,17 @@ static unsigned int sata_fsl_dev_classify(struct ata_port *ap)
return ata_dev_classify(&tf);
}
-static int sata_fsl_prereset(struct ata_link *link, unsigned long deadline)
-{
- /* FIXME: Never skip softreset, sata_fsl_softreset() is
- * combination of soft and hard resets. sata_fsl_softreset()
- * needs to be splitted into soft and hard resets.
- */
- return 0;
-}
-
-static int sata_fsl_softreset(struct ata_link *link, unsigned int *class,
+static int sata_fsl_hardreset(struct ata_link *link, unsigned int *class,
unsigned long deadline)
{
struct ata_port *ap = link->ap;
- struct sata_fsl_port_priv *pp = ap->private_data;
struct sata_fsl_host_priv *host_priv = ap->host->private_data;
void __iomem *hcr_base = host_priv->hcr_base;
- int pmp = sata_srst_pmp(link);
u32 temp;
- struct ata_taskfile tf;
- u8 *cfis;
- u32 Serror;
int i = 0;
unsigned long start_jiffies;
- DPRINTK("in xx_softreset\n");
-
- if (pmp != SATA_PMP_CTRL_PORT)
- goto issue_srst;
+ DPRINTK("in xx_hardreset\n");
try_offline_again:
/*
@@ -750,7 +733,7 @@ try_offline_again:
if (temp & ONLINE) {
ata_port_printk(ap, KERN_ERR,
- "Softreset failed, not off-lined %d\n", i);
+ "Hardreset failed, not off-lined %d\n", i);
/*
* Try to offline controller atleast twice
@@ -762,7 +745,7 @@ try_offline_again:
goto try_offline_again;
}
- DPRINTK("softreset, controller off-lined\n");
+ DPRINTK("hardreset, controller off-lined\n");
VPRINTK("HStatus = 0x%x\n", ioread32(hcr_base + HSTATUS));
VPRINTK("HControl = 0x%x\n", ioread32(hcr_base + HCONTROL));
@@ -787,11 +770,11 @@ try_offline_again:
if (!(temp & ONLINE)) {
ata_port_printk(ap, KERN_ERR,
- "Softreset failed, not on-lined\n");
+ "Hardreset failed, not on-lined\n");
goto err;
}
- DPRINTK("softreset, controller off-lined & on-lined\n");
+ DPRINTK("hardreset, controller off-lined & on-lined\n");
VPRINTK("HStatus = 0x%x\n", ioread32(hcr_base + HSTATUS));
VPRINTK("HControl = 0x%x\n", ioread32(hcr_base + HCONTROL));
@@ -807,7 +790,7 @@ try_offline_again:
"No Device OR PHYRDY change,Hstatus = 0x%x\n",
ioread32(hcr_base + HSTATUS));
*class = ATA_DEV_NONE;
- goto out;
+ return 0;
}
/*
@@ -820,11 +803,44 @@ try_offline_again:
if ((temp & 0xFF) != 0x18) {
ata_port_printk(ap, KERN_WARNING, "No Signature Update\n");
*class = ATA_DEV_NONE;
- goto out;
+ goto do_followup_srst;
} else {
ata_port_printk(ap, KERN_INFO,
"Signature Update detected @ %d msecs\n",
jiffies_to_msecs(jiffies - start_jiffies));
+ *class = sata_fsl_dev_classify(ap);
+ return 0;
+ }
+
+do_followup_srst:
+ /*
+ * request libATA to perform follow-up softreset
+ */
+ return -EAGAIN;
+
+err:
+ return -EIO;
+}
+
+static int sata_fsl_softreset(struct ata_link *link, unsigned int *class,
+ unsigned long deadline)
+{
+ struct ata_port *ap = link->ap;
+ struct sata_fsl_port_priv *pp = ap->private_data;
+ struct sata_fsl_host_priv *host_priv = ap->host->private_data;
+ void __iomem *hcr_base = host_priv->hcr_base;
+ int pmp = sata_srst_pmp(link);
+ u32 temp;
+ struct ata_taskfile tf;
+ u8 *cfis;
+ u32 Serror;
+
+ DPRINTK("in xx_softreset\n");
+
+ if (ata_link_offline(link)) {
+ DPRINTK("PHY reports no device\n");
+ *class = ATA_DEV_NONE;
+ return 0;
}
/*
@@ -835,7 +851,6 @@ try_offline_again:
* reached here, we can send a command to the target device
*/
-issue_srst:
DPRINTK("Sending SRST/device reset\n");
ata_tf_init(link->device, &tf);
@@ -861,6 +876,8 @@ issue_srst:
ioread32(CA + hcr_base), ioread32(CC + hcr_base));
iowrite32(0xFFFF, CC + hcr_base);
+ if (pmp != SATA_PMP_CTRL_PORT)
+ iowrite32(pmp, CQPMP + hcr_base);
iowrite32(1, CQ + hcr_base);
temp = ata_wait_register(CQ + hcr_base, 0x1, 0x1, 1, 5000);
@@ -927,7 +944,6 @@ issue_srst:
VPRINTK("cereg = 0x%x\n", ioread32(hcr_base + CE));
}
-out:
return 0;
err:
@@ -988,19 +1004,6 @@ static void sata_fsl_error_intr(struct ata_port *ap)
if (hstatus & FATAL_ERROR_DECODE) {
ehi->err_mask |= AC_ERR_ATA_BUS;
ehi->action |= ATA_EH_SOFTRESET;
-
- /*
- * Ignore serror in case of fatal errors as we always want
- * to do a soft-reset of the FSL SATA controller. Analyzing
- * serror may cause libata to schedule a hard-reset action,
- * and hard-reset currently does not do controller
- * offline/online, causing command timeouts and leads to an
- * un-recoverable state, hence make libATA ignore
- * autopsy in case of fatal errors.
- */
-
- ehi->flags |= ATA_EHI_NO_AUTOPSY;
-
freeze = 1;
}
@@ -1272,8 +1275,8 @@ static struct ata_port_operations sata_fsl_ops = {
.freeze = sata_fsl_freeze,
.thaw = sata_fsl_thaw,
- .prereset = sata_fsl_prereset,
.softreset = sata_fsl_softreset,
+ .hardreset = sata_fsl_hardreset,
.pmp_softreset = sata_fsl_softreset,
.error_handler = sata_fsl_error_handler,
.post_internal_cmd = sata_fsl_post_internal_cmd,
--
1.6.0
^ permalink raw reply related
* How to implement kexec on e500 ?
From: wilbur.chan @ 2009-06-29 13:47 UTC (permalink / raw)
To: linuxppc-dev
kernel 2.6.21.7
As we know , kexec stores data for new kernel image , in the form
of a page list.
And kexec uses the physical address of the another page for a
"next-page" pointer.
However, PowerPC e500 does not allow users to turn off the MMU, so we
can not used physical address directly in our code.
Someone suggested that changing relocate_kernel.S to add a TLB 1-to-1
mapping of DRAM .
What does "mapping" mean ?
Any suggestion to implement kexec on e500 ?
Cheers,
wilbur
^ permalink raw reply
* Re: How to implement kexec on e500 ?
From: Kumar Gala @ 2009-06-29 14:50 UTC (permalink / raw)
To: wilbur.chan; +Cc: linuxppc-dev
In-Reply-To: <e997b7420906290647g7717e55bp210f0f57d8c531c0@mail.gmail.com>
On Jun 29, 2009, at 8:47 AM, wilbur.chan wrote:
> kernel 2.6.21.7
>
> As we know , kexec stores data for new kernel image , in the form
> of a page list.
>
> And kexec uses the physical address of the another page for a
> "next-page" pointer.
>
> However, PowerPC e500 does not allow users to turn off the MMU, so we
> can not used physical address directly in our code.
>
>
> Someone suggested that changing relocate_kernel.S to add a TLB 1-to-1
> mapping of DRAM .
>
> What does "mapping" mean ?
>
> Any suggestion to implement kexec on e500 ?
Wilbur, kexec has been implemented on e500. There are some patches on
the list for this and they just need to be respun and reviewed again.
- k
^ permalink raw reply
* Re: [PATCH] powerpc/mpic: fix WARN_ON from alloc_bootmem
From: Kumar Gala @ 2009-06-29 14:51 UTC (permalink / raw)
To: Jeremy Kerr; +Cc: linuxppc-dev, cbe-oss-dev
In-Reply-To: <1246257419.938592.49700983608.1.gpush@pingu>
On Jun 29, 2009, at 1:36 AM, Jeremy Kerr wrote:
> Current powerpc/merge on a QS21 reports an oops on boot:
>
> ------------[ cut here ]------------
> Badness at mm/bootmem.c:535
> [snip]
> Call Trace:
> [c000000000763a80] [c0000000005dd068] .alloc_arch_preferred_bootmem
> +0x28/0x9c (unreliable)
> [c000000000763b10] [c0000000005ddaac] .___alloc_bootmem_nopanic+0x5c/
> 0x130
> [c000000000763bc0] [c0000000005ddbd8] .___alloc_bootmem+0x28/0x68
> [c000000000763c50] [c0000000005dddf0] .__alloc_bootmem+0x1c/0x30
> [c000000000763cd0] [c0000000005d1080] .mpic_alloc+0x20c/0x9f8
> [c000000000763dc0] [c0000000005d3348] .cell_init_irq+0x70/0x114
> [c000000000763e60] [c0000000005c41f8] .init_IRQ+0x44/0x64
> [c000000000763ee0] [c0000000005c0914] .start_kernel+0x238/0x440
> [c000000000763f90] [c000000000007368] .start_here_common+0x1c/0x34
>
> Looks like we're using alloc_bootmem after the slab is up and running,
> in mpic_init.
>
> This change uses a kzalloc instead - in fact, we've already done a
> kzalloc() earlier in this function.
>
> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
>
> ---
> arch/powerpc/sysdev/mpic.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
> index d46de1f..a5980e6 100644
> --- a/arch/powerpc/sysdev/mpic.c
> +++ b/arch/powerpc/sysdev/mpic.c
> @@ -1109,9 +1109,8 @@ struct mpic * __init mpic_alloc(struct
> device_node *node,
> psize /= 4;
> bits = intvec_top + 1;
> mapsize = BITS_TO_LONGS(bits) * sizeof(unsigned long);
> - mpic->protected = alloc_bootmem(mapsize);
> + mpic->protected = kzalloc(mapsize, GFP_KERNEL);
> BUG_ON(mpic->protected == NULL);
> - memset(mpic->protected, 0, mapsize);
> for (i = 0; i < psize; i++) {
> if (psrc[i] > intvec_top)
> continue;
I posted a similar patch that is in linus's tree:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=85355bb272db31a3f2dd99d547eef794805e1319
- k
^ permalink raw reply
* Re: [PATCH] sata_fsl: Add asynchronous notification support
From: Kumar Gala @ 2009-06-29 14:52 UTC (permalink / raw)
To: ashish kalra; +Cc: linux-ide, linuxppc-dev
In-Reply-To: <Pine.WNT.4.64.0906291846100.2640@B00888-02.fsl.freescale.net>
On Jun 29, 2009, at 8:22 AM, ashish kalra wrote:
> Signed-off-by: Ashish Kalra <Ashish.Kalra@freescale.com>
> ---
> drivers/ata/sata_fsl.c | 10 ++++++++--
> 1 files changed, 8 insertions(+), 2 deletions(-)
Can you provide more detail in the commit message about why this patch
is needed or what 'asynchronous notification' gets us.
- k
>
>
> diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c
> index 94eaa43..5751145 100644
> --- a/drivers/ata/sata_fsl.c
> +++ b/drivers/ata/sata_fsl.c
> @@ -34,7 +34,7 @@ enum {
>
> SATA_FSL_HOST_FLAGS = (ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY |
> ATA_FLAG_MMIO | ATA_FLAG_PIO_DMA |
> - ATA_FLAG_PMP | ATA_FLAG_NCQ),
> + ATA_FLAG_PMP | ATA_FLAG_NCQ | ATA_FLAG_AN),
>
> SATA_FSL_MAX_CMDS = SATA_FSL_QUEUE_DEPTH,
> SATA_FSL_CMD_HDR_SIZE = 16, /* 4 DWORDS */
> @@ -132,7 +132,7 @@ enum {
> INT_ON_SINGL_DEVICE_ERR = (1 << 1),
> INT_ON_CMD_COMPLETE = 1,
>
> - INT_ON_ERROR = INT_ON_FATAL_ERR |
> + INT_ON_ERROR = INT_ON_FATAL_ERR | INT_ON_SNOTIFY_UPDATE |
> INT_ON_PHYRDY_CHG | INT_ON_SINGL_DEVICE_ERR,
>
> /*
> @@ -154,6 +154,7 @@ enum {
>
> DEFAULT_PORT_IRQ_ENABLE_MASK = IE_ON_FATAL_ERR | IE_ON_PHYRDY_CHG |
> IE_ON_SIGNATURE_UPDATE |
> + IE_ON_SNOTIFY_UPDATE |
> IE_ON_SINGL_DEVICE_ERR | IE_ON_CMD_COMPLETE,
>
> EXT_INDIRECT_SEG_PRD_FLAG = (1 << 31),
> @@ -1003,6 +1004,11 @@ static void sata_fsl_error_intr(struct
> ata_port *ap)
> freeze = 1;
> }
>
> + /* Handle SDB FIS receive & notify update */
> + if (hstatus & INT_ON_SNOTIFY_UPDATE) {
> + sata_async_notification(ap);
> + }
> +
> /* Handle PHYRDY change notification */
> if (hstatus & INT_ON_PHYRDY_CHG) {
> DPRINTK("SATA FSL: PHYRDY change indication\n");
> --
> 1.6.0
>
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
^ 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