* Re: [regression] 3.0-rc boot failure -- bisected to cd4ea6ae3982
From: Linus Torvalds @ 2011-07-20 14:40 UTC (permalink / raw)
To: Anton Blanchard; +Cc: Peter Zijlstra, mahesh, linux-kernel, mingo, linuxppc-dev
In-Reply-To: <20110720221420.153b0830@kryten>
On Wed, Jul 20, 2011 at 5:14 AM, Anton Blanchard <anton@samba.org> wrote:
>
>> So with that fix the patch makes the machine happy again?
>
> Yes, the machine looks fine with the patches applied. Thanks!
Ok, so what's the situation for 3.0 (I'm waiting for some RCU
resolution now)? Anton's patch may be small, but that's just the tiny
fixup patch to Peter's much scarier one ;)
Linus
^ permalink raw reply
* Re: [PATCH] powerpc: Fix build dependencies for epapr.c which needs libfdt.h
From: David Gibson @ 2011-07-20 13:49 UTC (permalink / raw)
To: Matthew McClintock; +Cc: linuxppc-dev
In-Reply-To: <1311092564-10102-1-git-send-email-msm@freescale.com>
On Tue, Jul 19, 2011 at 11:22:44AM -0500, Matthew McClintock wrote:
> Currently, the build can (very rarely) fail to build because libfdt.h has
> not been created or is in the process of being copied.
>
> Signed-off-by: Matthew McClintock <msm@freescale.com>
Looks sane to me.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
^ permalink raw reply
* Re: Please pull 'next' branch of 4xx tree
From: Josh Boyer @ 2011-07-20 13:18 UTC (permalink / raw)
To: benh; +Cc: linuxppc-dev
In-Reply-To: <20110712204156.GD4203@zod.rchland.ibm.com>
On Tue, Jul 12, 2011 at 4:41 PM, Josh Boyer <jwboyer@linux.vnet.ibm.com> wr=
ote:
> Hi Ben,
>
> A few fixes from Tony/Dave, a DTS update from Stefan, and a MAINTAINERS
> update.
>
> josh
>
> The following changes since commit af9719c3062dfe216a0c3de3fa52be6d22b445=
6c:
>
> =A0powerpc: Use -mtraceback=3Dno (2011-07-01 13:49:27 +1000)
>
> are available in the git repository at:
> =A0ssh://master.kernel.org/pub/scm/linux/kernel/git/jwboyer/powerpc-4xx.g=
it next
Ben, ping?
josh
^ permalink raw reply
* [v3 PATCH 1/1] powerpc/4xx: enable and fix pcie gen1/gen2 on the 460sx
From: Ayman Elkhashab @ 2011-07-20 13:02 UTC (permalink / raw)
To: Benjamin Herrenschmidt, Paul Mackerras, Tony Breeds, linuxppc-dev,
linux-kernel
Cc: Ayman El-Khashab
In-Reply-To: <1311166949-2543-1-git-send-email-aymane@elkhashab.com>
From: Ayman El-Khashab <ayman@elkhashab.com>
Adds a register to the config space for the 460sx. Changes the vc0
detect to a pll detect. maps configuration space to test the link
status. changes the setup to enable gen2 devices to operate at gen2
speeds. fixes mapping that was not correct for the 460sx. added
bit definitions for the OMRxMSKL registers. Removed reserved bit
that was set incorrectly in the OMR2MSKL register.
tested on the 460sx eiger and custom board
Signed-off-by: Ayman El-Khashab <ayman@elkhashab.com>
---
arch/powerpc/sysdev/ppc4xx_pci.c | 89 ++++++++++++++++++++++++++++++-------
arch/powerpc/sysdev/ppc4xx_pci.h | 12 +++++
2 files changed, 84 insertions(+), 17 deletions(-)
diff --git a/arch/powerpc/sysdev/ppc4xx_pci.c b/arch/powerpc/sysdev/ppc4xx_pci.c
index ad330fe..eeeeb12 100644
--- a/arch/powerpc/sysdev/ppc4xx_pci.c
+++ b/arch/powerpc/sysdev/ppc4xx_pci.c
@@ -1092,6 +1092,10 @@ static int __init ppc460sx_pciex_core_init(struct device_node *np)
mtdcri(SDR0, PESDR1_460SX_HSSSLEW, 0xFFFF0000);
mtdcri(SDR0, PESDR2_460SX_HSSSLEW, 0xFFFF0000);
+ /* Set HSS PRBS enabled */
+ mtdcri(SDR0, PESDR0_460SX_HSSCTLSET, 0x00001130);
+ mtdcri(SDR0, PESDR2_460SX_HSSCTLSET, 0x00001130);
+
udelay(100);
/* De-assert PLLRESET */
@@ -1132,9 +1136,6 @@ static int ppc460sx_pciex_init_port_hw(struct ppc4xx_pciex_port *port)
dcri_clrset(SDR0, port->sdr_base + PESDRn_UTLSET2,
0, 0x01000000);
- /*Gen-1*/
- mtdcri(SDR0, port->sdr_base + PESDRn_460SX_RCEI, 0x08000000);
-
dcri_clrset(SDR0, port->sdr_base + PESDRn_RCSSET,
(PESDRx_RCSSET_RSTGU | PESDRx_RCSSET_RSTDL),
PESDRx_RCSSET_RSTPYN);
@@ -1148,14 +1149,42 @@ static int ppc460sx_pciex_init_utl(struct ppc4xx_pciex_port *port)
{
/* Max 128 Bytes */
out_be32 (port->utl_base + PEUTL_PBBSZ, 0x00000000);
+ /* Assert VRB and TXE - per datasheet turn off addr validation */
+ out_be32(port->utl_base + PEUTL_PCTL, 0x80800000);
return 0;
}
+static void __init ppc460sx_pciex_check_link(struct ppc4xx_pciex_port *port)
+{
+ void __iomem *mbase;
+ int attempt = 50;
+
+ port->link = 0;
+
+ mbase = ioremap(port->cfg_space.start + 0x10000000, 0x1000);
+ if (mbase == NULL) {
+ printk(KERN_ERR "%s: Can't map internal config space !",
+ port->node->full_name);
+ goto done;
+ }
+
+ while (attempt && (0 == (in_le32(mbase + PECFG_460SX_DLLSTA)
+ & PECFG_460SX_DLLSTA_LINKUP))) {
+ attempt--;
+ mdelay(10);
+ }
+ if (attempt)
+ port->link = 1;
+done:
+ iounmap(mbase);
+
+}
+
static struct ppc4xx_pciex_hwops ppc460sx_pcie_hwops __initdata = {
.core_init = ppc460sx_pciex_core_init,
.port_init_hw = ppc460sx_pciex_init_port_hw,
.setup_utl = ppc460sx_pciex_init_utl,
- .check_link = ppc4xx_pciex_check_link_sdr,
+ .check_link = ppc460sx_pciex_check_link,
};
#endif /* CONFIG_44x */
@@ -1338,15 +1367,15 @@ static int __init ppc4xx_pciex_port_init(struct ppc4xx_pciex_port *port)
if (rc != 0)
return rc;
- if (ppc4xx_pciex_hwops->check_link)
- ppc4xx_pciex_hwops->check_link(port);
-
/*
* Initialize mapping: disable all regions and configure
* CFG and REG regions based on resources in the device tree
*/
ppc4xx_pciex_port_init_mapping(port);
+ if (ppc4xx_pciex_hwops->check_link)
+ ppc4xx_pciex_hwops->check_link(port);
+
/*
* Map UTL
*/
@@ -1360,13 +1389,23 @@ static int __init ppc4xx_pciex_port_init(struct ppc4xx_pciex_port *port)
ppc4xx_pciex_hwops->setup_utl(port);
/*
- * Check for VC0 active and assert RDY.
+ * Check for VC0 active or PLL Locked and assert RDY.
*/
if (port->sdr_base) {
- if (port->link &&
- ppc4xx_pciex_wait_on_sdr(port, PESDRn_RCSSTS,
- 1 << 16, 1 << 16, 5000)) {
- printk(KERN_INFO "PCIE%d: VC0 not active\n", port->index);
+ if (of_device_is_compatible(port->node,
+ "ibm,plb-pciex-460sx")){
+ if (port->link && ppc4xx_pciex_wait_on_sdr(port,
+ PESDRn_RCSSTS,
+ 1 << 12, 1 << 12, 5000)) {
+ printk(KERN_INFO "PCIE%d: PLL not locked\n",
+ port->index);
+ port->link = 0;
+ }
+ } else if (port->link &&
+ ppc4xx_pciex_wait_on_sdr(port, PESDRn_RCSSTS,
+ 1 << 16, 1 << 16, 5000)) {
+ printk(KERN_INFO "PCIE%d: VC0 not active\n",
+ port->index);
port->link = 0;
}
@@ -1573,8 +1612,15 @@ static int __init ppc4xx_setup_one_pciex_POM(struct ppc4xx_pciex_port *port,
dcr_write(port->dcrs, DCRO_PEGPL_OMR1BAH, lah);
dcr_write(port->dcrs, DCRO_PEGPL_OMR1BAL, lal);
dcr_write(port->dcrs, DCRO_PEGPL_OMR1MSKH, 0x7fffffff);
- /* Note that 3 here means enabled | single region */
- dcr_write(port->dcrs, DCRO_PEGPL_OMR1MSKL, sa | 3);
+ /*Enabled and single region */
+ if (of_device_is_compatible(port->node, "ibm,plb-pciex-460sx"))
+ dcr_write(port->dcrs, DCRO_PEGPL_OMR1MSKL,
+ sa | DCRO_PEGPL_460SX_OMR1MSKL_UOT
+ | DCRO_PEGPL_OMRxMSKL_VAL);
+ else
+ dcr_write(port->dcrs, DCRO_PEGPL_OMR1MSKL,
+ sa | DCRO_PEGPL_OMR1MSKL_UOT
+ | DCRO_PEGPL_OMRxMSKL_VAL);
break;
case 1:
out_le32(mbase + PECFG_POM1LAH, pciah);
@@ -1582,8 +1628,8 @@ static int __init ppc4xx_setup_one_pciex_POM(struct ppc4xx_pciex_port *port,
dcr_write(port->dcrs, DCRO_PEGPL_OMR2BAH, lah);
dcr_write(port->dcrs, DCRO_PEGPL_OMR2BAL, lal);
dcr_write(port->dcrs, DCRO_PEGPL_OMR2MSKH, 0x7fffffff);
- /* Note that 3 here means enabled | single region */
- dcr_write(port->dcrs, DCRO_PEGPL_OMR2MSKL, sa | 3);
+ dcr_write(port->dcrs, DCRO_PEGPL_OMR2MSKL,
+ sa | DCRO_PEGPL_OMRxMSKL_VAL);
break;
case 2:
out_le32(mbase + PECFG_POM2LAH, pciah);
@@ -1592,7 +1638,9 @@ static int __init ppc4xx_setup_one_pciex_POM(struct ppc4xx_pciex_port *port,
dcr_write(port->dcrs, DCRO_PEGPL_OMR3BAL, lal);
dcr_write(port->dcrs, DCRO_PEGPL_OMR3MSKH, 0x7fffffff);
/* Note that 3 here means enabled | IO space !!! */
- dcr_write(port->dcrs, DCRO_PEGPL_OMR3MSKL, sa | 3);
+ dcr_write(port->dcrs, DCRO_PEGPL_OMR3MSKL,
+ sa | DCRO_PEGPL_OMR3MSKL_IO
+ | DCRO_PEGPL_OMRxMSKL_VAL);
break;
}
@@ -1693,6 +1741,9 @@ static void __init ppc4xx_configure_pciex_PIMs(struct ppc4xx_pciex_port *port,
if (res->flags & IORESOURCE_PREFETCH)
sa |= 0x8;
+ if (of_device_is_compatible(port->node, "ibm,plb-pciex-460sx"))
+ sa |= PCI_BASE_ADDRESS_MEM_TYPE_64;
+
out_le32(mbase + PECFG_BAR0HMPA, RES_TO_U32_HIGH(sa));
out_le32(mbase + PECFG_BAR0LMPA, RES_TO_U32_LOW(sa));
@@ -1854,6 +1905,10 @@ static void __init ppc4xx_pciex_port_setup_hose(struct ppc4xx_pciex_port *port)
}
out_le16(mbase + 0x202, val);
+ /* Enable Bus master, memory, and io space */
+ if (of_device_is_compatible(port->node, "ibm,plb-pciex-460sx"))
+ out_le16(mbase + 0x204, 0x7);
+
if (!port->endpoint) {
/* Set Class Code to PCI-PCI bridge and Revision Id to 1 */
out_le32(mbase + 0x208, 0x06040001);
diff --git a/arch/powerpc/sysdev/ppc4xx_pci.h b/arch/powerpc/sysdev/ppc4xx_pci.h
index 56d9e5d..61b3659 100644
--- a/arch/powerpc/sysdev/ppc4xx_pci.h
+++ b/arch/powerpc/sysdev/ppc4xx_pci.h
@@ -464,6 +464,18 @@
#define PECFG_POM2LAL 0x390
#define PECFG_POM2LAH 0x394
+/* 460sx only */
+#define PECFG_460SX_DLLSTA 0x3f8
+
+/* 460sx Bit Mappings */
+#define PECFG_460SX_DLLSTA_LINKUP 0x00000010
+#define DCRO_PEGPL_460SX_OMR1MSKL_UOT 0x00000004
+
+/* PEGPL Bit Mappings */
+#define DCRO_PEGPL_OMRxMSKL_VAL 0x00000001
+#define DCRO_PEGPL_OMR1MSKL_UOT 0x00000002
+#define DCRO_PEGPL_OMR3MSKL_IO 0x00000002
+
/* SDR Bit Mappings */
#define PESDRx_RCSSET_HLDPLB 0x10000000
#define PESDRx_RCSSET_RSTGU 0x01000000
--
1.7.4.3
^ permalink raw reply related
* [v3 PATCH 0/1] powerpc/4xx: enable and fix pcie gen1/gen2 on the 460sx
From: Ayman Elkhashab @ 2011-07-20 13:02 UTC (permalink / raw)
To: Benjamin Herrenschmidt, Paul Mackerras, Tony Breeds, linuxppc-dev,
linux-kernel
Cc: Ayman El-Khashab
In-Reply-To: <1310603611-8960-2-git-send-email-ayman@elkhashab.com>
From: Ayman El-Khashab <ayman@elkhashab.com>
Changes from v1->v2
Added definitions for the bits in the OMRxMSKL registers
Refactored the setting of the OMRxMSKL registers for the 460SX
Added bit defines for the PECFG_460SX_DLLSTA register
Changes from v2->v3
Fixed commit message to be more clear as to what was done
Ayman El-Khashab (1):
powerpc/4xx: enable and fix pcie gen1/gen2 on the 460sx
arch/powerpc/sysdev/ppc4xx_pci.c | 89 ++++++++++++++++++++++++++++++-------
arch/powerpc/sysdev/ppc4xx_pci.h | 12 +++++
2 files changed, 84 insertions(+), 17 deletions(-)
--
1.7.4.3
^ permalink raw reply
* Re: [regression] 3.0-rc boot failure -- bisected to cd4ea6ae3982
From: Anton Blanchard @ 2011-07-20 12:14 UTC (permalink / raw)
To: Peter Zijlstra; +Cc: mahesh, linuxppc-dev, linux-kernel, mingo, torvalds
In-Reply-To: <1311158708.5345.12.camel@twins>
Hi Peter,
> So with that fix the patch makes the machine happy again?
Yes, the machine looks fine with the patches applied. Thanks!
Anton
^ permalink raw reply
* Re: [regression] 3.0-rc boot failure -- bisected to cd4ea6ae3982
From: Peter Zijlstra @ 2011-07-20 10:45 UTC (permalink / raw)
To: Anton Blanchard; +Cc: mahesh, linuxppc-dev, linux-kernel, mingo, torvalds
In-Reply-To: <20110720201436.19e9689a@kryten>
On Wed, 2011-07-20 at 20:14 +1000, Anton Blanchard wrote:
> > That looks very strange indeed.. up to node 23 there is the normal
> > symmetric matrix with all the trace elements on 10 (as we would expect
> > for local access), and some 4x4 sub-matrix stacked around the trace
> > with 20, suggesting a single hop distance, and the rest on 40 being
> > out-there.
>=20
> I retested with the latest version of numactl, and get correct results.
One less thing to worry about ;-)
> I worked out why the patches don't boot, we weren't allocating any
> space for the cpumask and ran off the end of the allocation.
Gah! that's not the first time I made that particular mistake :/
> Should we also use cpumask_copy instead of open coding it? I added that
> too.
Probably, I looked for cpumask_assign() and on failing to find that used
the direct assignment.
So with that fix the patch makes the machine happy again?
Thanks!
^ permalink raw reply
* Re: [regression] 3.0-rc boot failure -- bisected to cd4ea6ae3982
From: Anton Blanchard @ 2011-07-20 10:14 UTC (permalink / raw)
To: Peter Zijlstra; +Cc: mahesh, linuxppc-dev, linux-kernel, mingo, torvalds
In-Reply-To: <1311070894.13765.180.camel@twins>
Hi Peter,
> That looks very strange indeed.. up to node 23 there is the normal
> symmetric matrix with all the trace elements on 10 (as we would expect
> for local access), and some 4x4 sub-matrix stacked around the trace
> with 20, suggesting a single hop distance, and the rest on 40 being
> out-there.
I retested with the latest version of numactl, and get correct results.
I worked out why the patches don't boot, we weren't allocating any
space for the cpumask and ran off the end of the allocation.
Should we also use cpumask_copy instead of open coding it? I added that
too.
Anton
Index: linux-2.6/kernel/sched.c
===================================================================
--- linux-2.6.orig/kernel/sched.c 2011-07-20 01:54:08.191668781 -0500
+++ linux-2.6/kernel/sched.c 2011-07-20 04:45:36.203750525 -0500
@@ -7020,8 +7020,8 @@
if (cpumask_test_cpu(i, covered))
continue;
- sg = kzalloc_node(sizeof(struct sched_group), GFP_KERNEL,
- cpu_to_node(i));
+ sg = kzalloc_node(sizeof(struct sched_group) + cpumask_size(),
+ GFP_KERNEL, cpu_to_node(i));
if (!sg)
goto fail;
@@ -7031,7 +7031,7 @@
child = *per_cpu_ptr(sdd->sd, i);
if (child->child) {
child = child->child;
- *sg_span = *sched_domain_span(child);
+ cpumask_copy(sg_span, sched_domain_span(child));
} else
cpumask_set_cpu(i, sg_span);
^ permalink raw reply
* RE: [PATCH 2/3] eSDHC: Fix errors when booting kernel with fsl esdhc
From: Zang Roy-R61911 @ 2011-07-20 9:29 UTC (permalink / raw)
To: S, Venkatraman; +Cc: Xu Lei-B33228, linux-mmc, akpm, linuxppc-dev
In-Reply-To: <CANfBPZ-V3+NFDVuftXfpTwUGwmXC-sFiUhG8LKCLROse6xT3=Q@mail.gmail.com>
> -----Original Message-----
> From: S, Venkatraman [mailto:svenkatr@ti.com]
> Sent: Tuesday, July 19, 2011 23:58 PM
> To: Zang Roy-R61911
> Cc: linux-mmc; linuxppc-dev; cbouatmailru; akpm; Xu Lei-B33228; Kumar Gal=
a
> Subject: Re: [PATCH 2/3] eSDHC: Fix errors when booting kernel with fsl e=
sdhc
>=20
> On Mon, Jul 18, 2011 at 11:31 AM, Zang Roy-R61911 <r61911@freescale.com> =
wrote:
> >
> >
> >> -----Original Message-----
> >> From: S, Venkatraman [mailto:svenkatr@ti.com]
> >> Sent: Tuesday, July 05, 2011 14:17 PM
> >> To: Zang Roy-R61911
> >> Cc: linux-mmc; linuxppc-dev; cbouatmailru; akpm; Xu Lei-B33228; Kumar =
Gala
> >> Subject: Re: [PATCH 2/3] eSDHC: Fix errors when booting kernel with fs=
l esdhc
> >>
> >> On Tue, Jul 5, 2011 at 9:49 AM, Roy Zang <tie-fei.zang@freescale.com> =
wrote:
> >> > From: Xu lei <B33228@freescale.com>
> >> >
> >> > When esdhc module was enabled in p5020, there were following errors:
> >> >
> >> > mmc0: Timeout waiting for hardware interrupt.
> >> > mmc0: error -110 whilst initialising SD card
> >> > mmc0: Unexpected interrupt 0x02000000.
> >> > mmc0: Timeout waiting for hardware interrupt.
> >> > mmc0: error -110 whilst initialising SD card
> >> > mmc0: Unexpected interrupt 0x02000000.
> >> >
> >> > It is because ESDHC controller has different bit setting for PROCTL
> >> > register, when kernel sets Power Control Register by method for stan=
dard
> >> > SD Host Specification, it would overwritten FSL ESDHC PROCTL[DMAS];
> >> > when it set Host Control Registers[DMAS], it sets PROCTL[EMODE] and
> >> > PROCTL[D3CD]. These operations will set bad bits for PROCTL Register
> >> > on FSL ESDHC Controller and cause errors, so this patch will make es=
dhc
> >> > driver access FSL PROCTL Register according to block guide instead o=
f
> >> > standard SD Host Specification.
> >> >
> >> > For some FSL chips, such as MPC8536/P2020, PROCTL[VOLT_SEL] and PROC=
TL[DMAS]
> >> > bits are reserved and even if they are set to wrong bits there is no=
error.
> >> > But considering that all FSL ESDHC Controller register map is not fu=
lly
> >> > compliant to standard SD Host Specification, we put the patch to all=
of
> >> > FSL ESDHC Controllers.
> >> >
> >> > Signed-off-by: Lei Xu <B33228@freescale.com>
> >> > Signed-off-by: Roy Zang <tie-fei.zang@freescale.com>
> >> > Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
> >> > ---
> >> > =A0drivers/mmc/host/sdhci-of-core.c | =A0 =A03 ++
> >> > =A0drivers/mmc/host/sdhci.c =A0 =A0 =A0 =A0 | =A0 62 +++++++++++++++=
+++++++++++++++----
> -
> >> --
> >> > =A0include/linux/mmc/sdhci.h =A0 =A0 =A0 =A0| =A0 =A06 ++-
> >> > =A03 files changed, 57 insertions(+), 14 deletions(-)
> > [snip]
> >
> >> > diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
> >> > index 58d5436..77174e5 100644
> >> > --- a/drivers/mmc/host/sdhci.c
> >> > +++ b/drivers/mmc/host/sdhci.c
> >> > @@ -674,7 +674,7 @@ static void sdhci_set_transfer_irqs(struct sdhci=
_host
> >> *host)
> >> > =A0static void sdhci_prepare_data(struct sdhci_host *host, struct mm=
c_command
> >> *cmd)
> >> > =A0{
> >> > =A0 =A0 =A0 =A0u8 count;
> >> > - =A0 =A0 =A0 u8 ctrl;
> >> > + =A0 =A0 =A0 u32 ctrl;
> >> > =A0 =A0 =A0 =A0struct mmc_data *data =3D cmd->data;
> >> > =A0 =A0 =A0 =A0int ret;
> >> >
> >> > @@ -807,14 +807,28 @@ static void sdhci_prepare_data(struct sdhci_ho=
st
> *host,
> >> struct mmc_command *cmd)
> >> > =A0 =A0 =A0 =A0 * is ADMA.
> >> > =A0 =A0 =A0 =A0 */
> >> > =A0 =A0 =A0 =A0if (host->version >=3D SDHCI_SPEC_200) {
> >> > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 ctrl =3D sdhci_readb(host, SDHCI_HOST_=
CONTROL);
> >> > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 ctrl &=3D ~SDHCI_CTRL_DMA_MASK;
> >> > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 if ((host->flags & SDHCI_REQ_USE_DMA) =
&&
> >> > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (host->flags & SDHCI_U=
SE_ADMA))
> >> > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ctrl |=3D SDHCI_CTRL_A=
DMA32;
> >> > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 else
> >> > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ctrl |=3D SDHCI_CTRL_S=
DMA;
> >> > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 sdhci_writeb(host, ctrl, SDHCI_HOST_CO=
NTROL);
> >> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (host->quirks & SDHCI_QUIRK_QORIQ_P=
ROCTL_WEIRD) {
> >> > +#define ESDHCI_PROCTL_DMAS_MASK =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A00x00=
000300
> >> > +#define ESDHCI_PROCTL_ADMA32 =A0 =A0 =A0 =A0 =A0 0x00000200
> >> > +#define ESDHCI_PROCTL_SDMA =A0 =A0 =A0 =A0 =A0 =A0 0x00000000
> >>
> >> Breaks the code flow / readability. Can be moved to top of the file ?
> > The defines are only used in the following section. Why it will break
> > the readability?
> > I can also see this kind of define in the file
> > ...
> > #define SAMPLE_COUNT =A0 =A05
> >
> > static int sdhci_get_ro(struct mmc_host *mmc)
> > ...
> >
> > Any rule should follow?
> >
> >
> > [snip]
> >> > @@ -1162,6 +1189,17 @@ static void sdhci_set_power(struct sdhci_host=
*host,
> >> unsigned short power)
> >> >
> >> > =A0 =A0 =A0 =A0host->pwr =3D pwr;
> >> >
> >> > + =A0 =A0 =A0 /* Now FSL ESDHC Controller has no Bus Power bit,
> >> > + =A0 =A0 =A0 =A0* and PROCTL[21] bit is for voltage selection */
> >>
> >> Multiline comment style needed..
> > Will update.
> > please help to explain your previous comment.
> > Thanks.
> > Roy
>=20
> There aren't very hard rules on this. Simple #defines are good, as a
> one off usage.
> These bit mask fields are very verbose, and they tend to grow more
> than a screenful.
> The remaining bits will never be defined ?
The mask fields and bits are only for some WERID defines. I do not think
they will grow more than a screen.
The remain bits will have little chance to be defined.
Thanks for the suggestion. I will update the comment style and post again.
Roy
^ permalink raw reply
* Re: [PATCH] net: ibm_newemac: Don't start autonegotiation when disabled in BMCR (genmii)
From: Stefan Roese @ 2011-07-20 7:18 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linuxppc-dev, netdev
In-Reply-To: <1311078570.25044.421.camel@pasglop>
On Tuesday 19 July 2011 14:29:30 Benjamin Herrenschmidt wrote:
> > I feel that this BMCR_ANENABLE bit should be evaluated, but I have no
> > strong preference here. If you prefer that this should be handled via a
> > new dt property (phy-aneg = "disabled" ?), I can implement it this way.
> > Just let me know.
>
> Don't we already have some bindings for PHY with a fixed setting ? I
> don't remember off hand, we need to dbl check.
The only related PHY property I found is "fixed-link" used in fs_enet-main.c.
None in the emac driver. Here the description for "fixed-link":
Documentation/devicetree/bindings/net/fsl-tsec-phy.txt:
- fixed-link : <a b c d e> where a is emulated phy id - choose any,
but unique to the all specified fixed-links, b is duplex - 0 half,
1 full, c is link speed - d#10/d#100/d#1000, d is pause - 0 no
pause, 1 pause, e is asym_pause - 0 no asym_pause, 1 asym_pause.
But what I really want to achieve, is to skip auto-negotiation (use the
strapped configuration). And not to define this fixed configuration (again) in
the device-tree. So I would prefer something like phy-aneg = "disabled".
What do you think?
Thanks,
Stefan
^ permalink raw reply
* Re: [regression] 3.0-rc boot failure -- bisected to cd4ea6ae3982
From: Anton Blanchard @ 2011-07-20 2:03 UTC (permalink / raw)
To: Peter Zijlstra; +Cc: mahesh, linuxppc-dev, linux-kernel, mingo, torvalds
In-Reply-To: <1311070894.13765.180.camel@twins>
Hi,
> That looks very strange indeed.. up to node 23 there is the normal
> symmetric matrix with all the trace elements on 10 (as we would expect
> for local access), and some 4x4 sub-matrix stacked around the trace
> with 20, suggesting a single hop distance, and the rest on 40 being
> out-there.
>
> But row 24-27 and column 28-31 are way weird, how can that ever be?
> Aren't the inter-connects symmetric and thus mandating a fully
> symmetric matrix? That is, how can traffic from node 23 (row) to node
> 28 (column) have inf bandwidth (0) yet traffic from node 28 (row) to
> node 23 (column) have a multi-hop distance of 40.
Good point, it definitely makes no sense. It looks like a bug in
numactl, the raw data looks reasonable:
# cat /sys/devices/system/node/node?/distance node??/distance
10 20 20 20 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
20 10 20 20 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
20 20 10 20 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
20 20 20 10 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 10 20 20 20 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 20 10 20 20 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 20 20 10 20 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 20 20 20 10 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 10 20 20 20 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 20 10 20 20 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 20 20 10 20 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 20 20 20 10 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 10 20 20 20 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 20 10 20 20 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 20 20 10 20 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 20 20 20 10 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 10 20 20 20 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 20 10 20 20 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 20 20 10 20 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 20 20 20 10 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 10 20 20 20 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 20 10 20 20 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 20 20 10 20 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 20 20 20 10 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 10 20 20 20
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 20 10 20 20
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 20 20 10 20
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 20 20 20 10
Yet another bug to track down :(
> So the idea I had to generate numa sched domains from the node
> distance ( http://marc.info/?l=linux-kernel&m=130218515520540 ),
> would that still work for you? [it does assume a symmetric matrix ]
It should work for us and it makes our NUMA memory and scheduler
domains more consistent. Nice!
Anton
^ permalink raw reply
* Re: [PATCH 4/4] powerpc: Enable lockup and hung task detectors in pseriesand ppc64 defeconfigs
From: Anton Blanchard @ 2011-07-19 23:46 UTC (permalink / raw)
To: David Laight; +Cc: linuxppc-dev
In-Reply-To: <AE90C24D6B3A694183C094C60CF0A2F6D8ADE3@saturn3.aculab.com>
Hi David,
> > As a result of changes to Kconfig files, we no longer enable
> > the lockup and hung task detectors. Both are very light weight
> > and provide useful information in the event of a hang, so
> > reenable them.
> ...
> > +CONFIG_LOCKUP_DETECTOR=y
> > +CONFIG_DETECT_HUNG_TASK=y
>
> Is one of thise responsible for generating a kernel stack traceback
> when a process has been sleeping uninterruptably for a 'long' time?
>
> We have a kernel subsystem that has several 'worker' threads,
> these always sleep uninterruptable (they are shut down by explicit
> request) and, at times, can be idle for long periods.
>
> Perhaps it should be possible to disable the check either on
> a per-process of per sleep basis?
I don't see any runtime options other than disabling it completely via:
/proc/sys/kernel/hung_task_timeout_secs
Anton
^ permalink raw reply
* Re: setbat() in udbg_init_cpm() required to avoid driver lockup
From: Scott Wood @ 2011-07-19 18:24 UTC (permalink / raw)
To: Daniel Ng2; +Cc: linuxppc-dev
In-Reply-To: <32088424.post@talk.nabble.com>
On Mon, 18 Jul 2011 22:39:01 -0700
Daniel Ng2 <daniel.ng1234@gmail.com> wrote:
>
> Our USB Device Controller (UDC) driver seems to get stuck in a loop waiting
> for the CPM Command Register to indicate that the CPM has finished executing
> a command. (It should do this by setting the cpmcr 'Command Done' bit).
>
> This only happens if I disable the 'Early Debug' Kernel Hacking .config
> parameter. If Early Debug is enabled, then the problem goes away.
>
> I've narrowed it down to this line in udbg_init_cpm(void):
>
> setbat(1, 0xf0000000, 0xf0000000, 0x40000, PAGE_KERNEL_NCG);
>
> -without this line, the driver gets stuck in the loop.
>
> Can anyone suggest why?
Is your USB driver accessing effective addresses from 0xf0000000 to
0xf0040000? It should be using ioremap().
> Also, what undesireable effects might there be of keeping the above call to
> setbat()?
It's squatting on a chunk of virtual address space without properly
reserving it. This is bad enough for a debug hack (and should be fixed).
Don't extend it to normal operation -- especially not as a substitute for
understanding the root cause of your problem.
-Scott
^ permalink raw reply
* Re: [PATCH 13/14] 85xx: consolidate of_platform_bus_probe calls
From: Scott Wood @ 2011-07-19 17:54 UTC (permalink / raw)
To: Dmitry Eremin-Solenikov; +Cc: Paul Mackerras, Linux PPC Development
In-Reply-To: <1311065631-3429-14-git-send-email-dbaryshkov@gmail.com>
On Tue, 19 Jul 2011 12:53:50 +0400
Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> wrote:
> +static struct of_device_id __initdata mpc85xx_common_ids[] = {
> + { .type = "soc", },
> + { .compatible = "soc", },
> + { .compatible = "simple-bus", },
> + { .compatible = "gianfar", },
> + { .compatible = "fsl,qe", },
> + { .compatible = "fsl,cpm2", },
> + {},
> +};
Same comment as for 83xx regarding localbus and compatibility with old
device trees.
-Scott
^ permalink raw reply
* Re: [PATCH 04/14] 83xx/mpc834x_itx: drop pq2pro-localbus-specific code
From: Scott Wood @ 2011-07-19 16:55 UTC (permalink / raw)
To: Dmitry Eremin-Solenikov; +Cc: Paul Mackerras, Linux PPC Development
In-Reply-To: <1311065631-3429-5-git-send-email-dbaryshkov@gmail.com>
On Tue, 19 Jul 2011 12:53:41 +0400
Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> wrote:
> As localbus on mpc8349e-mitx now provides simple-bus compatibility, we
> can drop code asking for pq2pro-localbus devices on mpc834x_itx boards.
Do we have a good reason for breaking compatibility with older device trees?
-Scott
^ permalink raw reply
* [PATCH] powerpc: Fix build dependencies for epapr.c which needs libfdt.h
From: Matthew McClintock @ 2011-07-19 16:22 UTC (permalink / raw)
To: linuxppc-dev; +Cc: Matthew McClintock
Currently, the build can (very rarely) fail to build because libfdt.h has
not been created or is in the process of being copied.
Signed-off-by: Matthew McClintock <msm@freescale.com>
---
I think this fixes this build error. Please comment as it's really hard to
reproduce this build error. I've seen this happen a few times now on our
automated build server.
BOOTCC arch/powerpc/boot/ep8248e.o
BOOTCC arch/powerpc/boot/cuboot-warp.o
BOOTCC arch/powerpc/boot/cuboot-85xx-cpm2.o
In file included from arch/powerpc/boot/epapr.c:20:0:
arch/powerpc/boot/libfdt.h:382:1: error: unterminated comment
arch/powerpc/boot/libfdt.h:1:0: error: unterminated #ifndef
BOOTCC arch/powerpc/boot/cuboot-yosemite.o
make[1]: *** [arch/powerpc/boot/epapr.o] Error 1
make[1]: *** Waiting for unfinished jobs....
BOOTCC arch/powerpc/boot/simpleboot.o
make: *** [uImage] Error 2
Build step 'Execute shell' marked build as failure
arch/powerpc/boot/Makefile | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
index c26200b..ac6705e 100644
--- a/arch/powerpc/boot/Makefile
+++ b/arch/powerpc/boot/Makefile
@@ -58,7 +58,7 @@ $(addprefix $(obj)/,$(zlib) cuboot-c2k.o gunzip_util.o main.o prpmc2800.o): \
libfdt := fdt.c fdt_ro.c fdt_wip.c fdt_sw.c fdt_rw.c fdt_strerror.c
libfdtheader := fdt.h libfdt.h libfdt_internal.h
-$(addprefix $(obj)/,$(libfdt) libfdt-wrapper.o simpleboot.o): \
+$(addprefix $(obj)/,$(libfdt) libfdt-wrapper.o simpleboot.o epapr.o): \
$(addprefix $(obj)/,$(libfdtheader))
src-wlib := string.S crt0.S crtsavres.S stdio.c main.c \
--
1.7.5
^ permalink raw reply related
* Re: [PATCH 00/14] Consolidation of 83xx/85xx board files
From: Kumar Gala @ 2011-07-19 14:29 UTC (permalink / raw)
To: Dmitry Eremin-Solenikov; +Cc: Linux PPC Development, Paul Mackerras
In-Reply-To: <1311065631-3429-1-git-send-email-dbaryshkov@gmail.com>
On Jul 19, 2011, at 3:53 AM, Dmitry Eremin-Solenikov wrote:
> I think it's already too late for this merge window, so this should =
stay
> for 3.2 merge window. Board files for mpc83xx platforms show lots of =
common
> code. Same goes for mpc85xx boards. This patchset is an initial =
attempt
> to merge some (most) of the common code. Based on the tree by Kumar =
Gala.
>=20
> The following changes since commit =
6471fc6630a507fd54fdaceceee1ddaf3c917cde:
>=20
> powerpc: Dont require a dma_ops struct to set dma mask (2011-07-08 =
00:21:36 -0500)
>=20
> Dmitry Eremin-Solenikov (14):
> 83xx: consolidate init_IRQ functions
> 83xx: consolidate of_platform_bus_probe calls
> mpc8349emitx: mark localbus as compatible with simple-bus
> 83xx/mpc834x_itx: drop pq2pro-localbus-specific code
> 83xx: headers cleanup
> 85xx/sbc8560: correct compilation if CONFIG_PHYS_ADDR_T_64BIT is =
set
> 85xx/ksi8560: declare that localbus is compatbile with simple-bus
> 85xx/sbc8560: declare that localbus is compatbile with simple-bus
> 85xx/sbc8548: read hardware revision when it's required for first =
time
> 85xx/mpc85xx_rdb: merge p1020_rdb and p2020_rdb machine entries
> 85xx: merge 32-bit QorIQ with DPA boards support
> 85xx/mpc85xx_ds,ads,cds: move .pci_exclude_device setting to =
machine definitions
> 85xx: consolidate of_platform_bus_probe calls
> 85xx: separate cpm2 pic init
So for next round can you split this into two groups. One for 83xx and =
one for 85xx.
- k=
^ permalink raw reply
* Re: [PATCH 03/14] mpc8349emitx: mark localbus as compatible with simple-bus
From: Kumar Gala @ 2011-07-19 14:23 UTC (permalink / raw)
To: Dmitry Eremin-Solenikov; +Cc: Linux PPC Development, Paul Mackerras
In-Reply-To: <1311065631-3429-4-git-send-email-dbaryshkov@gmail.com>
On Jul 19, 2011, at 3:53 AM, Dmitry Eremin-Solenikov wrote:
> Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
> ---
> arch/powerpc/boot/dts/mpc8349emitx.dts | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
applied to next-3.2
- k
^ permalink raw reply
* Re: [PATCH 01/14] 83xx: consolidate init_IRQ functions
From: Kumar Gala @ 2011-07-19 14:21 UTC (permalink / raw)
To: Dmitry Eremin-Solenikov; +Cc: Linux PPC Development, Paul Mackerras
In-Reply-To: <1311065631-3429-2-git-send-email-dbaryshkov@gmail.com>
On Jul 19, 2011, at 3:53 AM, Dmitry Eremin-Solenikov wrote:
> On mpc83xx platform nearly all _init_IRQ functions look alike. They =
either
> just setup ipic, or setup ipic and QE PIC. Separate this to special =
functions
> to be either referenced from ppc_md, or called from board file.
>=20
> Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
> ---
> arch/powerpc/platforms/83xx/asp834x.c | 20 +------------
> arch/powerpc/platforms/83xx/km83xx.c | 33 +--------------------
> arch/powerpc/platforms/83xx/misc.c | 46 =
+++++++++++++++++++++++++++++
> arch/powerpc/platforms/83xx/mpc830x_rdb.c | 18 +----------
> arch/powerpc/platforms/83xx/mpc831x_rdb.c | 18 +----------
> arch/powerpc/platforms/83xx/mpc832x_mds.c | 30 +------------------
> arch/powerpc/platforms/83xx/mpc832x_rdb.c | 31 +-------------------
> arch/powerpc/platforms/83xx/mpc834x_itx.c | 18 +----------
> arch/powerpc/platforms/83xx/mpc834x_mds.c | 18 +----------
> arch/powerpc/platforms/83xx/mpc836x_mds.c | 30 +------------------
> arch/powerpc/platforms/83xx/mpc836x_rdk.c | 28 +-----------------
> arch/powerpc/platforms/83xx/mpc837x_mds.c | 18 +----------
> arch/powerpc/platforms/83xx/mpc837x_rdb.c | 18 +----------
> arch/powerpc/platforms/83xx/mpc83xx.h | 9 +++++
> arch/powerpc/platforms/83xx/sbc834x.c | 20 +------------
> 15 files changed, 68 insertions(+), 287 deletions(-)
>=20
> diff --git a/arch/powerpc/platforms/83xx/asp834x.c =
b/arch/powerpc/platforms/83xx/asp834x.c
> index aa0d84d..90b6c06 100644
> --- a/arch/powerpc/platforms/83xx/asp834x.c
> +++ b/arch/powerpc/platforms/83xx/asp834x.c
> @@ -36,24 +36,6 @@ static void __init asp834x_setup_arch(void)
> mpc834x_usb_cfg();
> }
>=20
> -static void __init asp834x_init_IRQ(void)
> -{
> - struct device_node *np;
> -
> - np =3D of_find_node_by_type(NULL, "ipic");
> - if (!np)
> - return;
> -
> - ipic_init(np, 0);
> -
> - of_node_put(np);
> -
> - /* Initialize the default interrupt mapping priorities,
> - * in case the boot rom changed something on us.
> - */
> - ipic_set_default_priority();
> -}
> -
> static struct __initdata of_device_id asp8347_ids[] =3D {
> { .type =3D "soc", },
> { .compatible =3D "soc", },
> @@ -82,7 +64,7 @@ define_machine(asp834x) {
> .name =3D "ASP8347E",
> .probe =3D asp834x_probe,
> .setup_arch =3D asp834x_setup_arch,
> - .init_IRQ =3D asp834x_init_IRQ,
> + .init_IRQ =3D mpc83xx_ipic_init_IRQ,
> .get_irq =3D ipic_get_irq,
> .restart =3D mpc83xx_restart,
> .time_init =3D mpc83xx_time_init,
> diff --git a/arch/powerpc/platforms/83xx/km83xx.c =
b/arch/powerpc/platforms/83xx/km83xx.c
> index a2b9b9e..71ba863 100644
> --- a/arch/powerpc/platforms/83xx/km83xx.c
> +++ b/arch/powerpc/platforms/83xx/km83xx.c
> @@ -140,37 +140,6 @@ static int __init =
kmeter_declare_of_platform_devices(void)
> }
> machine_device_initcall(mpc83xx_km, =
kmeter_declare_of_platform_devices);
>=20
> -static void __init mpc83xx_km_init_IRQ(void)
> -{
> - struct device_node *np;
> -
> - np =3D of_find_compatible_node(NULL, NULL, "fsl,pq2pro-pic");
> - if (!np) {
> - np =3D of_find_node_by_type(NULL, "ipic");
> - if (!np)
> - return;
> - }
> -
> - ipic_init(np, 0);
> -
> - /* Initialize the default interrupt mapping priorities,
> - * in case the boot rom changed something on us.
> - */
> - ipic_set_default_priority();
> - of_node_put(np);
> -
> -#ifdef CONFIG_QUICC_ENGINE
> - np =3D of_find_compatible_node(NULL, NULL, "fsl,qe-ic");
> - if (!np) {
> - np =3D of_find_node_by_type(NULL, "qeic");
> - if (!np)
> - return;
> - }
> - qe_ic_init(np, 0, qe_ic_cascade_low_ipic, =
qe_ic_cascade_high_ipic);
> - of_node_put(np);
> -#endif /* CONFIG_QUICC_ENGINE */
> -}
> -
> /* list of the supported boards */
> static char *board[] __initdata =3D {
> "Keymile,KMETER1",
> @@ -198,7 +167,7 @@ define_machine(mpc83xx_km) {
> .name =3D "mpc83xx-km-platform",
> .probe =3D mpc83xx_km_probe,
> .setup_arch =3D mpc83xx_km_setup_arch,
> - .init_IRQ =3D mpc83xx_km_init_IRQ,
> + .init_IRQ =3D mpc83xx_both_init_IRQ,
make this mpc83xx_ipic_and_qe_init_IRQ
> .get_irq =3D ipic_get_irq,
> .restart =3D mpc83xx_restart,
> .time_init =3D mpc83xx_time_init,
> diff --git a/arch/powerpc/platforms/83xx/misc.c =
b/arch/powerpc/platforms/83xx/misc.c
> index f01806c..95f2274 100644
> --- a/arch/powerpc/platforms/83xx/misc.c
> +++ b/arch/powerpc/platforms/83xx/misc.c
> @@ -11,9 +11,12 @@
>=20
> #include <linux/stddef.h>
> #include <linux/kernel.h>
> +#include <linux/of_platform.h>
>=20
> #include <asm/io.h>
> #include <asm/hw_irq.h>
> +#include <asm/ipic.h>
> +#include <asm/qe_ic.h>
> #include <sysdev/fsl_soc.h>
>=20
> #include "mpc83xx.h"
> @@ -65,3 +68,46 @@ long __init mpc83xx_time_init(void)
>=20
> return 0;
> }
> +
> +void __init mpc83xx_ipic_init_IRQ(void)
> +{
> + struct device_node *np;
> +
> + /* looking for fsl,pq2pro-pic which is asl compatible with =
fsl,ipic */
> + np =3D of_find_compatible_node(NULL, NULL, "fsl,ipic");
> + if (!np)
> + np =3D of_find_node_by_type(NULL, "ipic");
> + if (!np)
> + return;
> +
> + ipic_init(np, 0);
> +
> + of_node_put(np);
> +
> + /* Initialize the default interrupt mapping priorities,
> + * in case the boot rom changed something on us.
> + */
> + ipic_set_default_priority();
> +}
> +
> +#ifdef CONFIG_QUICC_ENGINE
> +void __init mpc83xx_qe_init_IRQ(void)
> +{
> + struct device_node *np;
> +
> + np =3D of_find_compatible_node(NULL, NULL, "fsl,qe-ic");
> + if (!np) {
> + np =3D of_find_node_by_type(NULL, "qeic");
> + if (!np)
> + return;
> + }
> + qe_ic_init(np, 0, qe_ic_cascade_low_ipic, =
qe_ic_cascade_high_ipic);
> + of_node_put(np);
> +}
> +
> +void __init mpc83xx_both_init_IRQ(void)
make this mpc83xx_ipic_and_qe_init_IRQ
> +{
> + mpc83xx_ipic_init_IRQ();
> + mpc83xx_qe_init_IRQ();
> +}
> +#endif /* CONFIG_QUICC_ENGINE */
- k
^ permalink raw reply
* Re: [PATCH 00/14] Consolidation of 83xx/85xx board files
From: Kumar Gala @ 2011-07-19 14:20 UTC (permalink / raw)
To: Dmitry Eremin-Solenikov; +Cc: Linux PPC Development, Paul Mackerras
In-Reply-To: <1311065631-3429-1-git-send-email-dbaryshkov@gmail.com>
On Jul 19, 2011, at 3:53 AM, Dmitry Eremin-Solenikov wrote:
> I think it's already too late for this merge window, so this should =
stay
> for 3.2 merge window. Board files for mpc83xx platforms show lots of =
common
> code. Same goes for mpc85xx boards. This patchset is an initial =
attempt
> to merge some (most) of the common code. Based on the tree by Kumar =
Gala.
>=20
> The following changes since commit =
6471fc6630a507fd54fdaceceee1ddaf3c917cde:
>=20
> powerpc: Dont require a dma_ops struct to set dma mask (2011-07-08 =
00:21:36 -0500)
>=20
> Dmitry Eremin-Solenikov (14):
> 83xx: consolidate init_IRQ functions
> 83xx: consolidate of_platform_bus_probe calls
> mpc8349emitx: mark localbus as compatible with simple-bus
> 83xx/mpc834x_itx: drop pq2pro-localbus-specific code
> 83xx: headers cleanup
> 85xx/sbc8560: correct compilation if CONFIG_PHYS_ADDR_T_64BIT is =
set
> 85xx/ksi8560: declare that localbus is compatbile with simple-bus
> 85xx/sbc8560: declare that localbus is compatbile with simple-bus
> 85xx/sbc8548: read hardware revision when it's required for first =
time
> 85xx/mpc85xx_rdb: merge p1020_rdb and p2020_rdb machine entries
> 85xx: merge 32-bit QorIQ with DPA boards support
> 85xx/mpc85xx_ds,ads,cds: move .pci_exclude_device setting to =
machine definitions
> 85xx: consolidate of_platform_bus_probe calls
> 85xx: separate cpm2 pic init
Also patches subject should be of the form:
powerpc/85xx: ....
Please fix on next patch posting.
- k=
^ permalink raw reply
* Re: [PATCH 08/14] 85xx/sbc8560: declare that localbus is compatbile with simple-bus
From: Kumar Gala @ 2011-07-19 14:19 UTC (permalink / raw)
To: Dmitry Eremin-Solenikov; +Cc: Linux PPC Development, Paul Mackerras
In-Reply-To: <1311065631-3429-9-git-send-email-dbaryshkov@gmail.com>
On Jul 19, 2011, at 3:53 AM, Dmitry Eremin-Solenikov wrote:
> Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
> ---
> arch/powerpc/boot/dts/sbc8560.dts | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
applied to next-3.2
- k
^ permalink raw reply
* Re: [PATCH 07/14] 85xx/ksi8560: declare that localbus is compatbile with simple-bus
From: Kumar Gala @ 2011-07-19 14:19 UTC (permalink / raw)
To: Dmitry Eremin-Solenikov; +Cc: Linux PPC Development, Paul Mackerras
In-Reply-To: <1311065631-3429-8-git-send-email-dbaryshkov@gmail.com>
On Jul 19, 2011, at 3:53 AM, Dmitry Eremin-Solenikov wrote:
> Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
> ---
> arch/powerpc/boot/dts/ksi8560.dts | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
applied to next-3.2
- k
^ permalink raw reply
* Re: [PATCH 06/14] 85xx/sbc8560: correct compilation if CONFIG_PHYS_ADDR_T_64BIT is set
From: Kumar Gala @ 2011-07-19 14:18 UTC (permalink / raw)
To: Dmitry Eremin-Solenikov; +Cc: Linux PPC Development, Paul Mackerras
In-Reply-To: <1311065631-3429-7-git-send-email-dbaryshkov@gmail.com>
On Jul 19, 2011, at 3:53 AM, Dmitry Eremin-Solenikov wrote:
> If CONFIG_PHYS_ADDR_T_64BIT is set, compilation of sbc8560 fails with
> the following error:
>=20
> arch/powerpc/platforms/85xx/sbc8560.c: In function =
=91sbc8560_bdrstcr_init=92:
> arch/powerpc/platforms/85xx/sbc8560.c:286: error: format =91%x=92 =
expects type =91unsigned int=92, but argument 2 has type =
=91resource_size_t=92
>=20
> Fix that by using %pR format instead of just printing the start of
> resource.
>=20
> Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
> ---
> arch/powerpc/platforms/85xx/sbc8560.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
applied to next-3.2
- k=
^ permalink raw reply
* Re: [PATCH 14/14] 85xx: separate cpm2 pic init
From: Kumar Gala @ 2011-07-19 14:18 UTC (permalink / raw)
To: Dmitry Eremin-Solenikov; +Cc: Linux PPC Development, Paul Mackerras
In-Reply-To: <1311065631-3429-15-git-send-email-dbaryshkov@gmail.com>
On Jul 19, 2011, at 3:53 AM, Dmitry Eremin-Solenikov wrote:
> Separate handling of CPM2 PIC initialization to =
mpc85xx_cpm2_pic_init()
> function.
>=20
> Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
> ---
> arch/powerpc/platforms/85xx/ksi8560.c | 28 =
+------------------
> arch/powerpc/platforms/85xx/mpc85xx.h | 7 ++++
> arch/powerpc/platforms/85xx/mpc85xx_ads.c | 32 =
+--------------------
> arch/powerpc/platforms/85xx/mpc85xx_common.c | 39 =
++++++++++++++++++++++++++
> arch/powerpc/platforms/85xx/sbc8560.c | 32 =
+--------------------
> arch/powerpc/platforms/85xx/tqm85xx.c | 35 =
+----------------------
> 6 files changed, 50 insertions(+), 123 deletions(-)
looks fine, move earlier in the sequence.
- k=
^ permalink raw reply
* Re: [PATCH 13/14] 85xx: consolidate of_platform_bus_probe calls
From: Kumar Gala @ 2011-07-19 14:15 UTC (permalink / raw)
To: Dmitry Eremin-Solenikov; +Cc: Linux PPC Development, Paul Mackerras
In-Reply-To: <1311065631-3429-14-git-send-email-dbaryshkov@gmail.com>
On Jul 19, 2011, at 3:53 AM, Dmitry Eremin-Solenikov wrote:
> 85xx board files have a lot of duplication in *_publish_devices()/
> *_declare_of_platform_devices() functions. Merge that into a single
> function common to most of the boards.
>=20
> Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
> ---
> arch/powerpc/platforms/85xx/Makefile | 2 +
> arch/powerpc/platforms/85xx/ksi8560.c | 18 +---------
> arch/powerpc/platforms/85xx/mpc8536_ds.c | 16 ++-------
> arch/powerpc/platforms/85xx/mpc85xx.h | 4 ++
> arch/powerpc/platforms/85xx/mpc85xx_ads.c | 20 ++---------
> arch/powerpc/platforms/85xx/mpc85xx_cds.c | 16 ++-------
> arch/powerpc/platforms/85xx/mpc85xx_common.c | 26 ++++++++++++++
> arch/powerpc/platforms/85xx/mpc85xx_ds.c | 20 +++--------
> arch/powerpc/platforms/85xx/mpc85xx_mds.c | 46 =
++-----------------------
> arch/powerpc/platforms/85xx/mpc85xx_rdb.c | 16 ++-------
> arch/powerpc/platforms/85xx/p1022_ds.c | 7 ++--
> arch/powerpc/platforms/85xx/sbc8548.c | 18 ++--------
> arch/powerpc/platforms/85xx/sbc8560.c | 20 ++---------
> arch/powerpc/platforms/85xx/socrates.c | 13 +------
> arch/powerpc/platforms/85xx/stx_gp3.c | 16 ++-------
> arch/powerpc/platforms/85xx/tqm85xx.c | 16 ++-------
> arch/powerpc/platforms/85xx/xes_mpc85xx.c | 20 +++--------
> 17 files changed, 77 insertions(+), 217 deletions(-)
> create mode 100644 arch/powerpc/platforms/85xx/mpc85xx.h
> create mode 100644 arch/powerpc/platforms/85xx/mpc85xx_common.c
In general this looks ok, can you refactor so its earlier in the patch =
sequence
- k
>=20
> diff --git a/arch/powerpc/platforms/85xx/Makefile =
b/arch/powerpc/platforms/85xx/Makefile
> index 43b2162..ca4b1b9 100644
> --- a/arch/powerpc/platforms/85xx/Makefile
> +++ b/arch/powerpc/platforms/85xx/Makefile
> @@ -3,6 +3,8 @@
> #
> obj-$(CONFIG_SMP) +=3D smp.o
>=20
> +obj-y +=3D mpc85xx_common.o
> +
> obj-$(CONFIG_MPC8540_ADS) +=3D mpc85xx_ads.o
> obj-$(CONFIG_MPC8560_ADS) +=3D mpc85xx_ads.o
> obj-$(CONFIG_MPC85xx_CDS) +=3D mpc85xx_cds.o
> diff --git a/arch/powerpc/platforms/85xx/ksi8560.c =
b/arch/powerpc/platforms/85xx/ksi8560.c
> index c46f935..7657e1a 100644
> --- a/arch/powerpc/platforms/85xx/ksi8560.c
> +++ b/arch/powerpc/platforms/85xx/ksi8560.c
> @@ -35,6 +35,7 @@
> #include <asm/cpm2.h>
> #include <sysdev/cpm2_pic.h>
>=20
> +#include "mpc85xx.h"
>=20
> #define KSI8560_CPLD_HVR 0x04 /* Hardware Version =
Register */
> #define KSI8560_CPLD_PVR 0x08 /* PLD Version Register */
> @@ -215,22 +216,7 @@ static void ksi8560_show_cpuinfo(struct seq_file =
*m)
> seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f));
> }
>=20
> -static struct of_device_id __initdata of_bus_ids[] =3D {
> - { .type =3D "soc", },
> - { .type =3D "simple-bus", },
> - { .name =3D "cpm", },
> - { .name =3D "localbus", },
> - { .compatible =3D "gianfar", },
> - {},
> -};
> -
> -static int __init declare_of_platform_devices(void)
> -{
> - of_platform_bus_probe(NULL, of_bus_ids, NULL);
> -
> - return 0;
> -}
> -machine_device_initcall(ksi8560, declare_of_platform_devices);
> +machine_device_initcall(ksi8560, mpc85xx_common_publish_devices);
>=20
> /*
> * Called very early, device-tree isn't unflattened
> diff --git a/arch/powerpc/platforms/85xx/mpc8536_ds.c =
b/arch/powerpc/platforms/85xx/mpc8536_ds.c
> index f79f2f1..9ee6455 100644
> --- a/arch/powerpc/platforms/85xx/mpc8536_ds.c
> +++ b/arch/powerpc/platforms/85xx/mpc8536_ds.c
> @@ -32,6 +32,8 @@
> #include <sysdev/fsl_soc.h>
> #include <sysdev/fsl_pci.h>
>=20
> +#include "mpc85xx.h"
> +
> void __init mpc8536_ds_pic_init(void)
> {
> struct mpic *mpic;
> @@ -104,19 +106,7 @@ static void __init mpc8536_ds_setup_arch(void)
> printk("MPC8536 DS board from Freescale Semiconductor\n");
> }
>=20
> -static struct of_device_id __initdata mpc8536_ds_ids[] =3D {
> - { .type =3D "soc", },
> - { .compatible =3D "soc", },
> - { .compatible =3D "simple-bus", },
> - { .compatible =3D "gianfar", },
> - {},
> -};
> -
> -static int __init mpc8536_ds_publish_devices(void)
> -{
> - return of_platform_bus_probe(NULL, mpc8536_ds_ids, NULL);
> -}
> -machine_device_initcall(mpc8536_ds, mpc8536_ds_publish_devices);
> +machine_device_initcall(mpc8536_ds, mpc85xx_common_publish_devices);
>=20
> machine_arch_initcall(mpc8536_ds, swiotlb_setup_bus_notifier);
>=20
> diff --git a/arch/powerpc/platforms/85xx/mpc85xx.h =
b/arch/powerpc/platforms/85xx/mpc85xx.h
> new file mode 100644
> index 0000000..1a1b4eb
> --- /dev/null
> +++ b/arch/powerpc/platforms/85xx/mpc85xx.h
> @@ -0,0 +1,4 @@
> +#ifndef MPC85xx_H
> +#define MPC85xx_H
> +extern int mpc85xx_common_publish_devices(void);
> +#endif
> diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ads.c =
b/arch/powerpc/platforms/85xx/mpc85xx_ads.c
> index 2483929..3bc2acc 100644
> --- a/arch/powerpc/platforms/85xx/mpc85xx_ads.c
> +++ b/arch/powerpc/platforms/85xx/mpc85xx_ads.c
> @@ -35,6 +35,8 @@
> #include <sysdev/cpm2_pic.h>
> #endif
>=20
> +#include "mpc85xx.h"
> +
> #ifdef CONFIG_PCI
> static int mpc85xx_exclude_device(struct pci_controller *hose,
> u_char bus, u_char devfn)
> @@ -219,23 +221,7 @@ static void mpc85xx_ads_show_cpuinfo(struct =
seq_file *m)
> seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f));
> }
>=20
> -static struct of_device_id __initdata of_bus_ids[] =3D {
> - { .name =3D "soc", },
> - { .type =3D "soc", },
> - { .name =3D "cpm", },
> - { .name =3D "localbus", },
> - { .compatible =3D "simple-bus", },
> - { .compatible =3D "gianfar", },
> - {},
> -};
> -
> -static int __init declare_of_platform_devices(void)
> -{
> - of_platform_bus_probe(NULL, of_bus_ids, NULL);
> -
> - return 0;
> -}
> -machine_device_initcall(mpc85xx_ads, declare_of_platform_devices);
> +machine_device_initcall(mpc85xx_ads, mpc85xx_common_publish_devices);
>=20
> /*
> * Called very early, device-tree isn't unflattened
> diff --git a/arch/powerpc/platforms/85xx/mpc85xx_cds.c =
b/arch/powerpc/platforms/85xx/mpc85xx_cds.c
> index e209c23..281ecc5 100644
> --- a/arch/powerpc/platforms/85xx/mpc85xx_cds.c
> +++ b/arch/powerpc/platforms/85xx/mpc85xx_cds.c
> @@ -47,6 +47,8 @@
> #include <sysdev/fsl_soc.h>
> #include <sysdev/fsl_pci.h>
>=20
> +#include "mpc85xx.h"
> +
> /* CADMUS info */
> /* xxx - galak, move into device tree */
> #define CADMUS_BASE (0xf8004000)
> @@ -328,19 +330,7 @@ static int __init mpc85xx_cds_probe(void)
> return of_flat_dt_is_compatible(root, "MPC85xxCDS");
> }
>=20
> -static struct of_device_id __initdata of_bus_ids[] =3D {
> - { .type =3D "soc", },
> - { .compatible =3D "soc", },
> - { .compatible =3D "simple-bus", },
> - { .compatible =3D "gianfar", },
> - {},
> -};
> -
> -static int __init declare_of_platform_devices(void)
> -{
> - return of_platform_bus_probe(NULL, of_bus_ids, NULL);
> -}
> -machine_device_initcall(mpc85xx_cds, declare_of_platform_devices);
> +machine_device_initcall(mpc85xx_cds, mpc85xx_common_publish_devices);
>=20
> define_machine(mpc85xx_cds) {
> .name =3D "MPC85xx CDS",
> diff --git a/arch/powerpc/platforms/85xx/mpc85xx_common.c =
b/arch/powerpc/platforms/85xx/mpc85xx_common.c
> new file mode 100644
> index 0000000..999567a
> --- /dev/null
> +++ b/arch/powerpc/platforms/85xx/mpc85xx_common.c
> @@ -0,0 +1,26 @@
> +/*
> + * Routines common to most mpc85xx-based boards.
> + *
> + * This 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.
> + */
> +#include <linux/kernel.h>
> +#include <linux/of_platform.h>
> +
> +#include "mpc85xx.h"
> +
> +static struct of_device_id __initdata mpc85xx_common_ids[] =3D {
> + { .type =3D "soc", },
> + { .compatible =3D "soc", },
> + { .compatible =3D "simple-bus", },
> + { .compatible =3D "gianfar", },
> + { .compatible =3D "fsl,qe", },
> + { .compatible =3D "fsl,cpm2", },
> + {},
> +};
> +
> +int __init mpc85xx_common_publish_devices(void)
> +{
> + return of_platform_bus_probe(NULL, mpc85xx_common_ids, NULL);
> +}
> diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ds.c =
b/arch/powerpc/platforms/85xx/mpc85xx_ds.c
> index 53bf07d..7a0b728 100644
> --- a/arch/powerpc/platforms/85xx/mpc85xx_ds.c
> +++ b/arch/powerpc/platforms/85xx/mpc85xx_ds.c
> @@ -36,6 +36,8 @@
> #include <sysdev/fsl_soc.h>
> #include <sysdev/fsl_pci.h>
>=20
> +#include "mpc85xx.h"
> +
> #undef DEBUG
>=20
> #ifdef DEBUG
> @@ -216,21 +218,9 @@ static int __init mpc8544_ds_probe(void)
> return 0;
> }
>=20
> -static struct of_device_id __initdata mpc85xxds_ids[] =3D {
> - { .type =3D "soc", },
> - { .compatible =3D "soc", },
> - { .compatible =3D "simple-bus", },
> - { .compatible =3D "gianfar", },
> - {},
> -};
> -
> -static int __init mpc85xxds_publish_devices(void)
> -{
> - return of_platform_bus_probe(NULL, mpc85xxds_ids, NULL);
> -}
> -machine_device_initcall(mpc8544_ds, mpc85xxds_publish_devices);
> -machine_device_initcall(mpc8572_ds, mpc85xxds_publish_devices);
> -machine_device_initcall(p2020_ds, mpc85xxds_publish_devices);
> +machine_device_initcall(mpc8544_ds, mpc85xx_common_publish_devices);
> +machine_device_initcall(mpc8572_ds, mpc85xx_common_publish_devices);
> +machine_device_initcall(p2020_ds, mpc85xx_common_publish_devices);
>=20
> machine_arch_initcall(mpc8544_ds, swiotlb_setup_bus_notifier);
> machine_arch_initcall(mpc8572_ds, swiotlb_setup_bus_notifier);
> diff --git a/arch/powerpc/platforms/85xx/mpc85xx_mds.c =
b/arch/powerpc/platforms/85xx/mpc85xx_mds.c
> index 747d1ee..fde37e5 100644
> --- a/arch/powerpc/platforms/85xx/mpc85xx_mds.c
> +++ b/arch/powerpc/platforms/85xx/mpc85xx_mds.c
> @@ -53,6 +53,8 @@
> #include <asm/mpic.h>
> #include <asm/swiotlb.h>
>=20
> +#include "mpc85xx.h"
> +
> #undef DEBUG
> #ifdef DEBUG
> #define DBG(fmt...) udbg_printf(fmt)
> @@ -159,25 +161,6 @@ extern void __init mpc85xx_smp_init(void);
> #endif
>=20
> #ifdef CONFIG_QUICC_ENGINE
> -static struct of_device_id mpc85xx_qe_ids[] __initdata =3D {
> - { .type =3D "qe", },
> - { .compatible =3D "fsl,qe", },
> - { },
> -};
> -
> -static void __init mpc85xx_publish_qe_devices(void)
> -{
> - struct device_node *np;
> -
> - np =3D of_find_compatible_node(NULL, NULL, "fsl,qe");
> - if (!of_device_is_available(np)) {
> - of_node_put(np);
> - return;
> - }
> -
> - of_platform_bus_probe(NULL, mpc85xx_qe_ids, NULL);
> -}
> -
> static void __init mpc85xx_mds_reset_ucc_phys(void)
> {
> struct device_node *np;
> @@ -348,7 +331,6 @@ static void __init mpc85xx_mds_qeic_init(void)
> of_node_put(np);
> }
> #else
> -static void __init mpc85xx_publish_qe_devices(void) { }
> static void __init mpc85xx_mds_qe_init(void) { }
> static void __init mpc85xx_mds_qeic_init(void) { }
> #endif /* CONFIG_QUICC_ENGINE */
> @@ -430,24 +412,12 @@ machine_arch_initcall(mpc8568_mds, =
board_fixups);
> machine_arch_initcall(mpc8569_mds, board_fixups);
>=20
> static struct of_device_id mpc85xx_ids[] =3D {
> - { .type =3D "soc", },
> - { .compatible =3D "soc", },
> - { .compatible =3D "simple-bus", },
> - { .compatible =3D "gianfar", },
> { .compatible =3D "fsl,rapidio-delta", },
> { .compatible =3D "fsl,mpc8548-guts", },
> { .compatible =3D "gpio-leds", },
> {},
> };
>=20
> -static struct of_device_id p1021_ids[] =3D {
> - { .type =3D "soc", },
> - { .compatible =3D "soc", },
> - { .compatible =3D "simple-bus", },
> - { .compatible =3D "gianfar", },
> - {},
> -};
> -
> static int __init mpc85xx_publish_devices(void)
> {
> if (machine_is(mpc8568_mds))
> @@ -455,23 +425,15 @@ static int __init mpc85xx_publish_devices(void)
> if (machine_is(mpc8569_mds))
> simple_gpiochip_init("fsl,mpc8569mds-bcsr-gpio");
>=20
> + mpc85xx_common_publish_devices();
> of_platform_bus_probe(NULL, mpc85xx_ids, NULL);
> - mpc85xx_publish_qe_devices();
> -
> - return 0;
> -}
> -
> -static int __init p1021_publish_devices(void)
> -{
> - of_platform_bus_probe(NULL, p1021_ids, NULL);
> - mpc85xx_publish_qe_devices();
>=20
> return 0;
> }
>=20
> machine_device_initcall(mpc8568_mds, mpc85xx_publish_devices);
> machine_device_initcall(mpc8569_mds, mpc85xx_publish_devices);
> -machine_device_initcall(p1021_mds, p1021_publish_devices);
> +machine_device_initcall(p1021_mds, mpc85xx_common_publish_devices);
>=20
> machine_arch_initcall(mpc8568_mds, swiotlb_setup_bus_notifier);
> machine_arch_initcall(mpc8569_mds, swiotlb_setup_bus_notifier);
> diff --git a/arch/powerpc/platforms/85xx/mpc85xx_rdb.c =
b/arch/powerpc/platforms/85xx/mpc85xx_rdb.c
> index 7a3a37b..5846025 100644
> --- a/arch/powerpc/platforms/85xx/mpc85xx_rdb.c
> +++ b/arch/powerpc/platforms/85xx/mpc85xx_rdb.c
> @@ -30,6 +30,8 @@
> #include <sysdev/fsl_soc.h>
> #include <sysdev/fsl_pci.h>
>=20
> +#include "mpc85xx.h"
> +
> #undef DEBUG
>=20
> #ifdef DEBUG
> @@ -108,19 +110,7 @@ static void __init mpc85xx_rdb_setup_arch(void)
> printk(KERN_INFO "MPC85xx RDB board from Freescale =
Semiconductor\n");
> }
>=20
> -static struct of_device_id __initdata mpc85xxrdb_ids[] =3D {
> - { .type =3D "soc", },
> - { .compatible =3D "soc", },
> - { .compatible =3D "simple-bus", },
> - { .compatible =3D "gianfar", },
> - {},
> -};
> -
> -static int __init mpc85xxrdb_publish_devices(void)
> -{
> - return of_platform_bus_probe(NULL, mpc85xxrdb_ids, NULL);
> -}
> -machine_device_initcall(mpc85xx_rdb, mpc85xxrdb_publish_devices);
> +machine_device_initcall(mpc85xx_rdb, mpc85xx_common_publish_devices);
>=20
> /*
> * Called very early, device-tree isn't unflattened
> diff --git a/arch/powerpc/platforms/85xx/p1022_ds.c =
b/arch/powerpc/platforms/85xx/p1022_ds.c
> index 266b3aa..26e6f75 100644
> --- a/arch/powerpc/platforms/85xx/p1022_ds.c
> +++ b/arch/powerpc/platforms/85xx/p1022_ds.c
> @@ -27,6 +27,8 @@
> #include <sysdev/fsl_pci.h>
> #include <asm/fsl_guts.h>
>=20
> +#include "mpc85xx.h"
> +
> #if defined(CONFIG_FB_FSL_DIU) || defined(CONFIG_FB_FSL_DIU_MODULE)
>=20
> /*
> @@ -325,10 +327,6 @@ static void __init p1022_ds_setup_arch(void)
> }
>=20
> static struct of_device_id __initdata p1022_ds_ids[] =3D {
> - { .type =3D "soc", },
> - { .compatible =3D "soc", },
> - { .compatible =3D "simple-bus", },
> - { .compatible =3D "gianfar", },
> /* So that the DMA channel nodes can be probed individually: */
> { .compatible =3D "fsl,eloplus-dma", },
> {},
> @@ -338,6 +336,7 @@ static int __init p1022_ds_publish_devices(void)
> {
> return of_platform_bus_probe(NULL, p1022_ds_ids, NULL);
> }
> +machine_device_initcall(p1022_ds, mpc85xx_common_publish_devices);
> machine_device_initcall(p1022_ds, p1022_ds_publish_devices);
>=20
> machine_arch_initcall(p1022_ds, swiotlb_setup_bus_notifier);
> diff --git a/arch/powerpc/platforms/85xx/sbc8548.c =
b/arch/powerpc/platforms/85xx/sbc8548.c
> index 2eeb376..42343ac 100644
> --- a/arch/powerpc/platforms/85xx/sbc8548.c
> +++ b/arch/powerpc/platforms/85xx/sbc8548.c
> @@ -49,6 +49,8 @@
> #include <sysdev/fsl_soc.h>
> #include <sysdev/fsl_pci.h>
>=20
> +#include "mpc85xx.h"
> +
> static int sbc_rev =3D -EINVAL;
>=20
> static void __init sbc8548_pic_init(void)
> @@ -152,21 +154,7 @@ static void sbc8548_show_cpuinfo(struct seq_file =
*m)
> seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f));
> }
>=20
> -static struct of_device_id __initdata of_bus_ids[] =3D {
> - { .name =3D "soc", },
> - { .type =3D "soc", },
> - { .compatible =3D "simple-bus", },
> - { .compatible =3D "gianfar", },
> - {},
> -};
> -
> -static int __init declare_of_platform_devices(void)
> -{
> - of_platform_bus_probe(NULL, of_bus_ids, NULL);
> -
> - return 0;
> -}
> -machine_device_initcall(sbc8548, declare_of_platform_devices);
> +machine_device_initcall(sbc8548, mpc85xx_common_publish_devices);
>=20
> /*
> * Called very early, device-tree isn't unflattened
> diff --git a/arch/powerpc/platforms/85xx/sbc8560.c =
b/arch/powerpc/platforms/85xx/sbc8560.c
> index 678f5a8..bbb656f 100644
> --- a/arch/powerpc/platforms/85xx/sbc8560.c
> +++ b/arch/powerpc/platforms/85xx/sbc8560.c
> @@ -37,6 +37,8 @@
> #include <sysdev/cpm2_pic.h>
> #endif
>=20
> +#include "mpc85xx.h"
> +
> #ifdef CONFIG_CPM2
>=20
> static void cpm2_cascade(unsigned int irq, struct irq_desc *desc)
> @@ -208,23 +210,7 @@ static void sbc8560_show_cpuinfo(struct seq_file =
*m)
> seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f));
> }
>=20
> -static struct of_device_id __initdata of_bus_ids[] =3D {
> - { .name =3D "soc", },
> - { .type =3D "soc", },
> - { .name =3D "cpm", },
> - { .name =3D "localbus", },
> - { .compatible =3D "simple-bus", },
> - { .compatible =3D "gianfar", },
> - {},
> -};
> -
> -static int __init declare_of_platform_devices(void)
> -{
> - of_platform_bus_probe(NULL, of_bus_ids, NULL);
> -
> - return 0;
> -}
> -machine_device_initcall(sbc8560, declare_of_platform_devices);
> +machine_device_initcall(sbc8560, mpc85xx_common_publish_devices);
>=20
> /*
> * Called very early, device-tree isn't unflattened
> diff --git a/arch/powerpc/platforms/85xx/socrates.c =
b/arch/powerpc/platforms/85xx/socrates.c
> index 747d8fb..fec496a 100644
> --- a/arch/powerpc/platforms/85xx/socrates.c
> +++ b/arch/powerpc/platforms/85xx/socrates.c
> @@ -41,6 +41,7 @@
> #include <sysdev/fsl_soc.h>
> #include <sysdev/fsl_pci.h>
>=20
> +#include "mpc85xx.h"
> #include "socrates_fpga_pic.h"
>=20
> static void __init socrates_pic_init(void)
> @@ -96,17 +97,7 @@ static void __init socrates_setup_arch(void)
> #endif
> }
>=20
> -static struct of_device_id __initdata socrates_of_bus_ids[] =3D {
> - { .compatible =3D "simple-bus", },
> - { .compatible =3D "gianfar", },
> - {},
> -};
> -
> -static int __init socrates_publish_devices(void)
> -{
> - return of_platform_bus_probe(NULL, socrates_of_bus_ids, NULL);
> -}
> -machine_device_initcall(socrates, socrates_publish_devices);
> +machine_device_initcall(socrates, mpc85xx_common_publish_devices);
>=20
> /*
> * Called very early, device-tree isn't unflattened
> diff --git a/arch/powerpc/platforms/85xx/stx_gp3.c =
b/arch/powerpc/platforms/85xx/stx_gp3.c
> index 5387e9f..ab80044 100644
> --- a/arch/powerpc/platforms/85xx/stx_gp3.c
> +++ b/arch/powerpc/platforms/85xx/stx_gp3.c
> @@ -40,6 +40,8 @@
> #include <sysdev/fsl_soc.h>
> #include <sysdev/fsl_pci.h>
>=20
> +#include "mpc85xx.h"
> +
> #ifdef CONFIG_CPM2
> #include <asm/cpm2.h>
> #include <sysdev/cpm2_pic.h>
> @@ -144,19 +146,7 @@ static void stx_gp3_show_cpuinfo(struct seq_file =
*m)
> seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f));
> }
>=20
> -static struct of_device_id __initdata of_bus_ids[] =3D {
> - { .compatible =3D "simple-bus", },
> - { .compatible =3D "gianfar", },
> - {},
> -};
> -
> -static int __init declare_of_platform_devices(void)
> -{
> - of_platform_bus_probe(NULL, of_bus_ids, NULL);
> -
> - return 0;
> -}
> -machine_device_initcall(stx_gp3, declare_of_platform_devices);
> +machine_device_initcall(stx_gp3, mpc85xx_common_publish_devices);
>=20
> /*
> * Called very early, device-tree isn't unflattened
> diff --git a/arch/powerpc/platforms/85xx/tqm85xx.c =
b/arch/powerpc/platforms/85xx/tqm85xx.c
> index 325de77..19e711f 100644
> --- a/arch/powerpc/platforms/85xx/tqm85xx.c
> +++ b/arch/powerpc/platforms/85xx/tqm85xx.c
> @@ -38,6 +38,8 @@
> #include <sysdev/fsl_soc.h>
> #include <sysdev/fsl_pci.h>
>=20
> +#include "mpc85xx.h"
> +
> #ifdef CONFIG_CPM2
> #include <asm/cpm2.h>
> #include <sysdev/cpm2_pic.h>
> @@ -173,19 +175,7 @@ static void __init tqm85xx_ti1520_fixup(struct =
pci_dev *pdev)
> DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_1520,
> tqm85xx_ti1520_fixup);
>=20
> -static struct of_device_id __initdata of_bus_ids[] =3D {
> - { .compatible =3D "simple-bus", },
> - { .compatible =3D "gianfar", },
> - {},
> -};
> -
> -static int __init declare_of_platform_devices(void)
> -{
> - of_platform_bus_probe(NULL, of_bus_ids, NULL);
> -
> - return 0;
> -}
> -machine_device_initcall(tqm85xx, declare_of_platform_devices);
> +machine_device_initcall(tqm85xx, mpc85xx_common_publish_devices);
>=20
> static const char *board[] __initdata =3D {
> "tqc,tqm8540",
> diff --git a/arch/powerpc/platforms/85xx/xes_mpc85xx.c =
b/arch/powerpc/platforms/85xx/xes_mpc85xx.c
> index 0125604..0ee3721 100644
> --- a/arch/powerpc/platforms/85xx/xes_mpc85xx.c
> +++ b/arch/powerpc/platforms/85xx/xes_mpc85xx.c
> @@ -33,6 +33,8 @@
> #include <sysdev/fsl_soc.h>
> #include <sysdev/fsl_pci.h>
>=20
> +#include "mpc85xx.h"
> +
> /* A few bit definitions needed for fixups on some boards */
> #define MPC85xx_L2CTL_L2E 0x80000000 /* L2 enable */
> #define MPC85xx_L2CTL_L2I 0x40000000 /* L2 flash =
invalidate */
> @@ -177,21 +179,9 @@ static void __init xes_mpc85xx_setup_arch(void)
> #endif
> }
>=20
> -static struct of_device_id __initdata xes_mpc85xx_ids[] =3D {
> - { .type =3D "soc", },
> - { .compatible =3D "soc", },
> - { .compatible =3D "simple-bus", },
> - { .compatible =3D "gianfar", },
> - {},
> -};
> -
> -static int __init xes_mpc85xx_publish_devices(void)
> -{
> - return of_platform_bus_probe(NULL, xes_mpc85xx_ids, NULL);
> -}
> -machine_device_initcall(xes_mpc8572, xes_mpc85xx_publish_devices);
> -machine_device_initcall(xes_mpc8548, xes_mpc85xx_publish_devices);
> -machine_device_initcall(xes_mpc8540, xes_mpc85xx_publish_devices);
> +machine_device_initcall(xes_mpc8572, mpc85xx_common_publish_devices);
> +machine_device_initcall(xes_mpc8548, mpc85xx_common_publish_devices);
> +machine_device_initcall(xes_mpc8540, mpc85xx_common_publish_devices);
>=20
> /*
> * Called very early, device-tree isn't unflattened
> --=20
> 1.7.2.5
^ 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