* Re: [PATCH 06/21] powerpc: Add skeleton PowerNV platform
From: Michael Neuling @ 2011-09-12 1:17 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linuxppc-dev
In-Reply-To: <1315664408-16797-6-git-send-email-benh@kernel.crashing.org>
In message <1315664408-16797-6-git-send-email-benh@kernel.crashing.org> you wro
te:
> This adds a skeletton for the new Power "Non Virtualized"
> platform which will be used by machines supporting running
> without an hypervisor, for example in order to run KVM.
>
> These machines will be using a new firmware called OPAL
> for which the support will be provided by later patches.
>
> The PowerNV platform is intended to be also usable under
> the BML environment used internally for early CPU bringup
> which is why the code also supports using RTAS instead of
> OPAL in various places.
>
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Giggity-Giggity-by: Michael Neuling <mikey@neuling.org>
> ---
> arch/powerpc/boot/Makefile | 1 +
> arch/powerpc/platforms/Kconfig | 1 +
> arch/powerpc/platforms/Makefile | 1 +
> arch/powerpc/platforms/powernv/Kconfig | 12 +++
> arch/powerpc/platforms/powernv/Makefile | 2 +
> arch/powerpc/platforms/powernv/powernv.h | 10 ++
> arch/powerpc/platforms/powernv/setup.c | 153 ++++++++++++++++++++++++++++
++
> arch/powerpc/platforms/powernv/smp.c | 83 ++++++++++++++++
> 8 files changed, 263 insertions(+), 0 deletions(-)
> create mode 100644 arch/powerpc/platforms/powernv/Kconfig
> create mode 100644 arch/powerpc/platforms/powernv/Makefile
> create mode 100644 arch/powerpc/platforms/powernv/powernv.h
> create mode 100644 arch/powerpc/platforms/powernv/setup.c
> create mode 100644 arch/powerpc/platforms/powernv/smp.c
>
> diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
> index c26200b..52cde90 100644
> --- a/arch/powerpc/boot/Makefile
> +++ b/arch/powerpc/boot/Makefile
> @@ -171,6 +171,7 @@ quiet_cmd_wrap = WRAP $@
> $(if $3, -s $3)$(if $4, -d $4)$(if $5, -i $5) vmlinux
>
> image-$(CONFIG_PPC_PSERIES) += zImage.pseries
> +image-$(CONFIG_PPC_POWERNV) += zImage.pseries
> image-$(CONFIG_PPC_MAPLE) += zImage.maple
> image-$(CONFIG_PPC_IBM_CELL_BLADE) += zImage.pseries
> image-$(CONFIG_PPC_PS3) += dtbImage.ps3
> diff --git a/arch/powerpc/platforms/Kconfig b/arch/powerpc/platforms/Kconfig
> index b9ba861..6de27d2 100644
> --- a/arch/powerpc/platforms/Kconfig
> +++ b/arch/powerpc/platforms/Kconfig
> @@ -1,5 +1,6 @@
> menu "Platform support"
>
> +source "arch/powerpc/platforms/powernv/Kconfig"
> source "arch/powerpc/platforms/pseries/Kconfig"
> source "arch/powerpc/platforms/iseries/Kconfig"
> source "arch/powerpc/platforms/chrp/Kconfig"
> diff --git a/arch/powerpc/platforms/Makefile b/arch/powerpc/platforms/Makefil
e
> index 73e2116..2635a22 100644
> --- a/arch/powerpc/platforms/Makefile
> +++ b/arch/powerpc/platforms/Makefile
> @@ -14,6 +14,7 @@ obj-$(CONFIG_PPC_82xx) += 82xx/
> obj-$(CONFIG_PPC_83xx) += 83xx/
> obj-$(CONFIG_FSL_SOC_BOOKE) += 85xx/
> obj-$(CONFIG_PPC_86xx) += 86xx/
> +obj-$(CONFIG_PPC_POWERNV) += powernv/
> obj-$(CONFIG_PPC_PSERIES) += pseries/
> obj-$(CONFIG_PPC_ISERIES) += iseries/
> obj-$(CONFIG_PPC_MAPLE) += maple/
> diff --git a/arch/powerpc/platforms/powernv/Kconfig b/arch/powerpc/platforms/
powernv/Kconfig
> new file mode 100644
> index 0000000..5cd04f5
> --- /dev/null
> +++ b/arch/powerpc/platforms/powernv/Kconfig
> @@ -0,0 +1,12 @@
> +config PPC_POWERNV
> + depends on PPC64 && PPC_BOOK3S
> + bool "IBM PowerNV (Non-Virtualized) platform support"
> + select PPC_RTAS
> + select PPC_NATIVE
> + select PPC_XICS
> + select PPC_ICP_NATIVE
> + select PPC_ICS_RTAS
> + select PPC_P7_NAP
> + select PPC_PCI_CHOICE if EMBEDDED
> + default y
> +
> diff --git a/arch/powerpc/platforms/powernv/Makefile b/arch/powerpc/platforms
/powernv/Makefile
> new file mode 100644
> index 0000000..1c43250
> --- /dev/null
> +++ b/arch/powerpc/platforms/powernv/Makefile
> @@ -0,0 +1,2 @@
> +obj-y += setup.o
> +obj-$(CONFIG_SMP) += smp.o
> diff --git a/arch/powerpc/platforms/powernv/powernv.h b/arch/powerpc/platform
s/powernv/powernv.h
> new file mode 100644
> index 0000000..35b7160
> --- /dev/null
> +++ b/arch/powerpc/platforms/powernv/powernv.h
> @@ -0,0 +1,10 @@
> +#ifndef _POWERNV_H
> +#define _POWERNV_H
> +
> +#ifdef CONFIG_SMP
> +extern void pnv_smp_init(void);
> +#else
> +static inline void pnv_smp_init(void) { }
> +#endif
> +
> +#endif /* _POWERNV_H */
> diff --git a/arch/powerpc/platforms/powernv/setup.c b/arch/powerpc/platforms/
powernv/setup.c
> new file mode 100644
> index 0000000..569f9cc
> --- /dev/null
> +++ b/arch/powerpc/platforms/powernv/setup.c
> @@ -0,0 +1,153 @@
> +/*
> + * PowerNV setup code.
> + *
> + * Copyright 2011 IBM Corp.
> + *
> + * This program is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public License
> + * as published by the Free Software Foundation; either version
> + * 2 of the License, or (at your option) any later version.
> + */
> +
> +#undef DEBUG
> +
> +#include <linux/cpu.h>
> +#include <linux/errno.h>
> +#include <linux/sched.h>
> +#include <linux/kernel.h>
> +#include <linux/tty.h>
> +#include <linux/reboot.h>
> +#include <linux/init.h>
> +#include <linux/console.h>
> +#include <linux/delay.h>
> +#include <linux/irq.h>
> +#include <linux/seq_file.h>
> +#include <linux/of.h>
> +#include <linux/interrupt.h>
> +#include <linux/bug.h>
> +
> +#include <asm/machdep.h>
> +#include <asm/firmware.h>
> +#include <asm/xics.h>
> +
> +#include "powernv.h"
> +
> +static void __init pnv_setup_arch(void)
> +{
> + /* Force console to hvc for now until we have sorted out the
> + * real console situation for the platform. This will make
> + * hvc_udbg work at least.
> + */
> + add_preferred_console("hvc", 0, NULL);
> +
> + /* Initialize SMP */
> + pnv_smp_init();
> +
> + /* XXX PCI */
> +
> + /* XXX NVRAM */
> +
> + /* Enable NAP mode */
> + powersave_nap = 1;
> +
> + /* XXX PMCS */
> +}
> +
> +static void __init pnv_init_early(void)
> +{
> + /* XXX IOMMU */
> +}
> +
> +static void __init pnv_init_IRQ(void)
> +{
> + xics_init();
> +
> + WARN_ON(!ppc_md.get_irq);
> +}
> +
> +static void pnv_show_cpuinfo(struct seq_file *m)
> +{
> + struct device_node *root;
> + const char *model = "";
> +
> + root = of_find_node_by_path("/");
> + if (root)
> + model = of_get_property(root, "model", NULL);
> + seq_printf(m, "machine\t\t: PowerNV %s\n", model);
> + of_node_put(root);
> +}
> +
> +static void pnv_restart(char *cmd)
> +{
> + for (;;);
> +}
> +
> +static void pnv_power_off(void)
> +{
> + for (;;);
> +}
> +
> +static void pnv_halt(void)
> +{
> + for (;;);
> +}
> +
> +static unsigned long __init pnv_get_boot_time(void)
> +{
> + return 0;
> +}
> +
> +static void pnv_get_rtc_time(struct rtc_time *rtc_tm)
> +{
> +}
> +
> +static int pnv_set_rtc_time(struct rtc_time *tm)
> +{
> + return 0;
> +}
> +
> +static void pnv_progress(char *s, unsigned short hex)
> +{
> +}
> +
> +#ifdef CONFIG_KEXEC
> +static void pnv_kexec_cpu_down(int crash_shutdown, int secondary)
> +{
> + xics_kexec_teardown_cpu(secondary);
> +}
> +#endif /* CONFIG_KEXEC */
> +
> +static int __init pnv_probe(void)
> +{
> + unsigned long root = of_get_flat_dt_root();
> +
> + if (!of_flat_dt_is_compatible(root, "ibm,powernv"))
> + return 0;
> +
> + hpte_init_native();
> +
> + pr_debug("PowerNV detected !\n");
> +
> + return 1;
> +}
> +
> +define_machine(powernv) {
> + .name = "PowerNV",
> + .probe = pnv_probe,
> + .setup_arch = pnv_setup_arch,
> + .init_early = pnv_init_early,
> + .init_IRQ = pnv_init_IRQ,
> + .show_cpuinfo = pnv_show_cpuinfo,
> + .restart = pnv_restart,
> + .power_off = pnv_power_off,
> + .halt = pnv_halt,
> + .get_boot_time = pnv_get_boot_time,
> + .get_rtc_time = pnv_get_rtc_time,
> + .set_rtc_time = pnv_set_rtc_time,
> + .progress = pnv_progress,
> + .power_save = power7_idle,
> + .calibrate_decr = generic_calibrate_decr,
> +#ifdef CONFIG_KEXEC
> + .kexec_cpu_down = pnv_kexec_cpu_down,
> +#endif
> +};
> diff --git a/arch/powerpc/platforms/powernv/smp.c b/arch/powerpc/platforms/po
wernv/smp.c
> new file mode 100644
> index 0000000..36c7151
> --- /dev/null
> +++ b/arch/powerpc/platforms/powernv/smp.c
> @@ -0,0 +1,83 @@
> +/*
> + * SMP support for PowerNV machines.
> + *
> + * Copyright 2011 IBM Corp.
> + *
> + * This program is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public License
> + * as published by the Free Software Foundation; either version
> + * 2 of the License, or (at your option) any later version.
> + */
> +
> +#include <linux/kernel.h>
> +#include <linux/module.h>
> +#include <linux/sched.h>
> +#include <linux/smp.h>
> +#include <linux/interrupt.h>
> +#include <linux/delay.h>
> +#include <linux/init.h>
> +#include <linux/spinlock.h>
> +#include <linux/cpu.h>
> +
> +#include <asm/irq.h>
> +#include <asm/smp.h>
> +#include <asm/paca.h>
> +#include <asm/machdep.h>
> +#include <asm/cputable.h>
> +#include <asm/firmware.h>
> +#include <asm/system.h>
> +#include <asm/rtas.h>
> +#include <asm/vdso_datapage.h>
> +#include <asm/cputhreads.h>
> +#include <asm/xics.h>
> +
> +#include "powernv.h"
> +
> +static void __devinit pnv_smp_setup_cpu(int cpu)
> +{
> + if (cpu != boot_cpuid)
> + xics_setup_cpu();
> +}
> +
> +static int pnv_smp_cpu_bootable(unsigned int nr)
> +{
> + /* Special case - we inhibit secondary thread startup
> + * during boot if the user requests it.
> + */
> + if (system_state < SYSTEM_RUNNING && cpu_has_feature(CPU_FTR_SMT)) {
> + if (!smt_enabled_at_boot && cpu_thread_in_core(nr) != 0)
> + return 0;
> + if (smt_enabled_at_boot
> + && cpu_thread_in_core(nr) >= smt_enabled_at_boot)
> + return 0;
> + }
> +
> + return 1;
> +}
> +
> +static struct smp_ops_t pnv_smp_ops = {
> + .message_pass = smp_muxed_ipi_message_pass,
> + .cause_ipi = NULL, /* Filled at runtime by xics_smp_probe() */
> + .probe = xics_smp_probe,
> + .kick_cpu = smp_generic_kick_cpu,
> + .setup_cpu = pnv_smp_setup_cpu,
> + .cpu_bootable = pnv_smp_cpu_bootable,
> +};
> +
> +/* This is called very early during platform setup_arch */
> +void __init pnv_smp_init(void)
> +{
> + smp_ops = &pnv_smp_ops;
> +
> + /* XXX We don't yet have a proper entry point from HAL, for
> + * now we rely on kexec-style entry from BML
> + */
> +
> +#ifdef CONFIG_PPC_RTAS
> + /* Non-lpar has additional take/give timebase */
> + if (rtas_token("freeze-time-base") != RTAS_UNKNOWN_SERVICE) {
> + smp_ops->give_timebase = rtas_give_timebase;
> + smp_ops->take_timebase = rtas_take_timebase;
> + }
> +#endif /* CONFIG_PPC_RTAS */
> +}
> --
> 1.7.4.1
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
>
^ permalink raw reply
* Re: [PATCH 06/21] powerpc: Add skeleton PowerNV platform
From: Geert Uytterhoeven @ 2011-09-12 6:02 UTC (permalink / raw)
To: Michael Neuling; +Cc: linuxppc-dev
In-Reply-To: <9312.1315790251@neuling.org>
Hi Mikey,
On Mon, Sep 12, 2011 at 03:17, Michael Neuling <mikey@neuling.org> wrote:
>> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
>
> Giggity-Giggity-by: Michael Neuling <mikey@neuling.org>
Burps?
Gr{oetje,eeting}s,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k=
.org
In personal conversations with technical people, I call myself a hacker. Bu=
t
when I'm talking to journalists I just say "programmer" or something like t=
hat.
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0=C2=A0 =C2=A0=C2=A0 -- Linus Torvalds
^ permalink raw reply
* RE: [PATCH] eSDHC: Access Freescale eSDHC registers by 32-bit
From: Zang Roy-R61911 @ 2011-09-13 4:10 UTC (permalink / raw)
To: Wolfram Sang
Cc: Xu Lei-B33228, linux-mmc@vger.kernel.org,
akpm@linux-foundation.org, cjb@laptop.org,
linuxppc-dev@lists.ozlabs.org
In-Reply-To: <20110909130855.GR1912@pengutronix.de>
> -----Original Message-----
> From: linux-mmc-owner@vger.kernel.org [mailto:linux-mmc-owner@vger.kernel=
.org]
> On Behalf Of Wolfram Sang
> Sent: Friday, September 09, 2011 21:09 PM
> To: Zang Roy-R61911
> Cc: cjb@laptop.org; linux-mmc@vger.kernel.org; linuxppc-dev@lists.ozlabs.=
org;
> akpm@linux-foundation.org; cbouatmailru@gmail.com; Xu Lei-B33228; Kumar G=
ala
> Subject: Re: [PATCH] eSDHC: Access Freescale eSDHC registers by 32-bit
>=20
>=20
> > Previously, I sent this patch together with another one. But
> > technically they are separated patches. I got some comments from
> > Anton about the patch. I will try to address the comment. but for this
> > one, it is a stand along patch. I'd like to push it first.
>=20
> Okay.
Good.
>=20
> > I do not see any comment about byte swapping about this patch.
> > you may have mis-understanding here.
>=20
> I was misguided, yes, sorry. BE/LE issues with additional byteswapping
> are a mind twister :/ Having a second look, it looks okay to me. One
> could think about putting this into sdhci_platform as well, but this can
> be done later if needed. Sadly, I currently don't have hardware to test
> it.
I tested on 8536 and P4080/P5020/P3041 platform.
Anyone can help to pull it in?
Thanks.
Roy
^ permalink raw reply
* [PATCH] KVM: PPC: Fix build failure with HV KVM and CBE
From: Alexander Graf @ 2011-09-13 14:15 UTC (permalink / raw)
To: kvm-ppc; +Cc: linuxppc-dev, dvaleev, paulus, kvm
When running with HV KVM and CBE config options enabled, I get
build failures like the following:
arch/powerpc/kernel/head_64.o: In function `cbe_system_error_hv':
(.text+0x1228): undefined reference to `do_kvm_0x1202'
arch/powerpc/kernel/head_64.o: In function `cbe_maintenance_hv':
(.text+0x1628): undefined reference to `do_kvm_0x1602'
arch/powerpc/kernel/head_64.o: In function `cbe_thermal_hv':
(.text+0x1828): undefined reference to `do_kvm_0x1802'
This is because we jump to a KVM handler when HV is enabled, but we
only generate the handler with PR KVM mode.
Signed-off-by: Alexander Graf <agraf@suse.de>
---
arch/powerpc/kernel/exceptions-64s.S | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S
index 29ddd8b..396d080 100644
--- a/arch/powerpc/kernel/exceptions-64s.S
+++ b/arch/powerpc/kernel/exceptions-64s.S
@@ -267,7 +267,7 @@ vsx_unavailable_pSeries_1:
#ifdef CONFIG_CBE_RAS
STD_EXCEPTION_HV(0x1200, 0x1202, cbe_system_error)
- KVM_HANDLER_PR_SKIP(PACA_EXGEN, EXC_HV, 0x1202)
+ KVM_HANDLER_SKIP(PACA_EXGEN, EXC_HV, 0x1202)
#endif /* CONFIG_CBE_RAS */
STD_EXCEPTION_PSERIES(0x1300, 0x1300, instruction_breakpoint)
@@ -275,7 +275,7 @@ vsx_unavailable_pSeries_1:
#ifdef CONFIG_CBE_RAS
STD_EXCEPTION_HV(0x1600, 0x1602, cbe_maintenance)
- KVM_HANDLER_PR_SKIP(PACA_EXGEN, EXC_HV, 0x1602)
+ KVM_HANDLER_SKIP(PACA_EXGEN, EXC_HV, 0x1602)
#endif /* CONFIG_CBE_RAS */
STD_EXCEPTION_PSERIES(0x1700, 0x1700, altivec_assist)
@@ -283,7 +283,7 @@ vsx_unavailable_pSeries_1:
#ifdef CONFIG_CBE_RAS
STD_EXCEPTION_HV(0x1800, 0x1802, cbe_thermal)
- KVM_HANDLER_PR_SKIP(PACA_EXGEN, EXC_HV, 0x1802)
+ KVM_HANDLER_SKIP(PACA_EXGEN, EXC_HV, 0x1802)
#endif /* CONFIG_CBE_RAS */
. = 0x3000
--
1.6.0.2
^ permalink raw reply related
* Re: [PATCH] powerpc/fsl_msi: Handle msi-available-ranges better
From: Scott Wood @ 2011-09-13 18:33 UTC (permalink / raw)
To: Tabi Timur-B04825
Cc: Wood Scott-B07421, devicetree-discuss@lists.ozlabs.org,
linuxppc-dev@lists.ozlabs.org
In-Reply-To: <CAOZdJXVm1YL-T8i26O0BiB-uTkXUDnYQdacU8k52aG-K0pZ1Lg@mail.gmail.com>
On 09/07/2011 11:20 AM, Tabi Timur-B04825 wrote:
> The problem is that both offset and irq_index are being incremented in
> the loop, and cascade_data->index is set to the sum of the two.
>
> Perhaps you meant this:
>
> err = fsl_msi_setup_hwirq(msi, dev, offset, j);
That's not right either, it would retrieve the wrong IRQ from the
interrupts property if you have holes -- try with something like
{ 0 64, 128, 64 }. The desired behavior there is:
offset = 0 irq_index = 0
offset = 1 irq_index = 1
offset = 4 irq_index = 2
offset = 5 irq_index = 3
I think the right code (untested) might be:
err = fsl_msi_setup_hwirq(msi, dev, offset + j, irq_index);
and
cascade_data->index = offset;
-Scott
^ permalink raw reply
* [PATCH] powerpc/fsl_msi: fix support for multiple MSI ranges
From: Timur Tabi @ 2011-09-13 21:17 UTC (permalink / raw)
To: kumar.gala, scottwood, benh, linuxppc-dev
Commit 6820fead ("powerpc/fsl_msi: Handle msi-available-ranges better") added
support for multiple ranges in the msi-available-ranges property, but it
miscalculated the MSIR index when multiple ranges are used.
Signed-off-by: Timur Tabi <timur@freescale.com>
---
arch/powerpc/sysdev/fsl_msi.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/arch/powerpc/sysdev/fsl_msi.c b/arch/powerpc/sysdev/fsl_msi.c
index 419a772..1cca251 100644
--- a/arch/powerpc/sysdev/fsl_msi.c
+++ b/arch/powerpc/sysdev/fsl_msi.c
@@ -296,7 +296,7 @@ static int __devinit fsl_msi_setup_hwirq(struct fsl_msi *msi,
}
msi->msi_virqs[irq_index] = virt_msir;
- cascade_data->index = offset + irq_index;
+ cascade_data->index = offset;
cascade_data->msi_data = msi;
irq_set_handler_data(virt_msir, cascade_data);
irq_set_chained_handler(virt_msir, fsl_msi_cascade);
@@ -376,8 +376,10 @@ static int __devinit fsl_of_msi_probe(struct platform_device *dev)
goto error_out;
}
- if (!p)
+ if (!p) {
p = all_avail;
+ len = sizeof(all_avail);
+ }
for (irq_index = 0, i = 0; i < len / (2 * sizeof(u32)); i++) {
if (p[i * 2] % IRQS_PER_MSI_REG ||
@@ -393,7 +395,7 @@ static int __devinit fsl_of_msi_probe(struct platform_device *dev)
count = p[i * 2 + 1] / IRQS_PER_MSI_REG;
for (j = 0; j < count; j++, irq_index++) {
- err = fsl_msi_setup_hwirq(msi, dev, offset, irq_index);
+ err = fsl_msi_setup_hwirq(msi, dev, offset + j, irq_index);
if (err)
goto error_out;
}
--
1.7.3.4
^ permalink raw reply related
* [PATCH 1/1] hvcs: Ensure page aligned partner info buffer
From: Brian King @ 2011-09-13 21:22 UTC (permalink / raw)
To: benh; +Cc: brking, linuxppc-dev
The Power platform requires the partner info buffer to be page aligned
otherwise it will fail the partner info hcall with H_PARAMETER. Switch
from using kmalloc to allocate this buffer to __get_free_page to ensure
page alignment.
Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
---
drivers/tty/hvc/hvcs.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff -puN drivers/tty/hvc/hvcs.c~hvcs_pi_buf_alloc drivers/tty/hvc/hvcs.c
--- linux-2.6/drivers/tty/hvc/hvcs.c~hvcs_pi_buf_alloc 2011-09-09 16:00:25.000000000 -0500
+++ linux-2.6-bjking1/drivers/tty/hvc/hvcs.c 2011-09-09 16:07:08.000000000 -0500
@@ -1532,7 +1532,7 @@ static int __devinit hvcs_initialize(voi
goto register_fail;
}
- hvcs_pi_buff = kmalloc(PAGE_SIZE, GFP_KERNEL);
+ hvcs_pi_buff = (unsigned long *) __get_free_page(GFP_KERNEL);
if (!hvcs_pi_buff) {
rc = -ENOMEM;
goto buff_alloc_fail;
@@ -1548,7 +1548,7 @@ static int __devinit hvcs_initialize(voi
return 0;
kthread_fail:
- kfree(hvcs_pi_buff);
+ free_page((unsigned long)hvcs_pi_buff);
buff_alloc_fail:
tty_unregister_driver(hvcs_tty_driver);
register_fail:
@@ -1597,7 +1597,7 @@ static void __exit hvcs_module_exit(void
kthread_stop(hvcs_task);
spin_lock(&hvcs_pi_lock);
- kfree(hvcs_pi_buff);
+ free_page((unsigned long)hvcs_pi_buff);
hvcs_pi_buff = NULL;
spin_unlock(&hvcs_pi_lock);
_
^ permalink raw reply
* Re: [PATCH] powerpc: Fix build dependencies for epapr.c which needs libfdt.h
From: McClintock Matthew-B29882 @ 2011-09-13 22:43 UTC (permalink / raw)
To: David Gibson; +Cc: linuxppc-dev@lists.ozlabs.org
In-Reply-To: <20110720134907.GN6399@yookeroo.fritz.box>
On Wed, Jul 20, 2011 at 8:49 AM, David Gibson
<david@gibson.dropbear.id.au> wrote:
> 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 ha=
s
>> not been created or is in the process of being copied.
>>
>> Signed-off-by: Matthew McClintock <msm@freescale.com>
>
> Looks sane to me.
ping? I'm still seeing this issue.
-M=
^ permalink raw reply
* [PATCH] powerpc: Fix deadlock in icswx code
From: Anton Blanchard @ 2011-09-14 19:43 UTC (permalink / raw)
To: benh, paulus; +Cc: linuxppc-dev
In-Reply-To: <20110915052313.7127520d@kryten>
The icswx code introduced an A-B B-A deadlock:
CPU0 CPU1
---- ----
lock(&anon_vma->mutex);
lock(&mm->mmap_sem);
lock(&anon_vma->mutex);
lock(&mm->mmap_sem);
Instead of using the mmap_sem to keep mm_users constant, take the
page table spinlock.
Signed-off-by: Anton Blanchard <anton@samba.org>
Cc: <stable@kernel.org>
---
diff --git a/arch/powerpc/mm/mmu_context_hash64.c b/arch/powerpc/mm/mmu_context_hash64.c
index 3bafc3d..4ff587e 100644
--- a/arch/powerpc/mm/mmu_context_hash64.c
+++ b/arch/powerpc/mm/mmu_context_hash64.c
@@ -136,8 +136,8 @@ int use_cop(unsigned long acop, struct mm_struct *mm)
if (!mm || !acop)
return -EINVAL;
- /* We need to make sure mm_users doesn't change */
- down_read(&mm->mmap_sem);
+ /* The page_table_lock ensures mm_users won't change under us */
+ spin_lock(&mm->page_table_lock);
spin_lock(mm->context.cop_lockp);
if (mm->context.cop_pid == COP_PID_NONE) {
@@ -164,7 +164,7 @@ int use_cop(unsigned long acop, struct mm_struct *mm)
out:
spin_unlock(mm->context.cop_lockp);
- up_read(&mm->mmap_sem);
+ spin_unlock(&mm->page_table_lock);
return ret;
}
@@ -185,8 +185,8 @@ void drop_cop(unsigned long acop, struct mm_struct *mm)
if (WARN_ON_ONCE(!mm))
return;
- /* We need to make sure mm_users doesn't change */
- down_read(&mm->mmap_sem);
+ /* The page_table_lock ensures mm_users won't change under us */
+ spin_lock(&mm->page_table_lock);
spin_lock(mm->context.cop_lockp);
mm->context.acop &= ~acop;
@@ -213,7 +213,7 @@ void drop_cop(unsigned long acop, struct mm_struct *mm)
}
spin_unlock(mm->context.cop_lockp);
- up_read(&mm->mmap_sem);
+ spin_unlock(&mm->page_table_lock);
}
EXPORT_SYMBOL_GPL(drop_cop);
^ permalink raw reply related
* [PATCH] memory hotplug: Refuse to add unaligned memory regions
From: Anton Blanchard @ 2011-09-14 20:26 UTC (permalink / raw)
To: gregkh, nfont; +Cc: linuxppc-dev, linux-kernel
The sysfs memory probe interface allows unaligned regions
to be added:
# echo 0xffffff > /sys/devices/system/memory/probe
# cat /proc/iomem
00ffffff-01fffffe : System RAM
01ffffff-02fffffe : System RAM
02ffffff-03fffffe : System RAM
03ffffff-04fffffe : System RAM
04ffffff-05fffffe : System RAM
Return -EINVAL instead of creating these bad regions.
Signed-off-by: Anton Blanchard <anton@samba.org>
---
Index: linux-build/drivers/base/memory.c
===================================================================
--- linux-build.orig/drivers/base/memory.c 2011-08-11 08:25:55.005941391 +1000
+++ linux-build/drivers/base/memory.c 2011-08-11 08:28:27.938580440 +1000
@@ -380,9 +380,13 @@ memory_probe_store(struct class *class,
u64 phys_addr;
int nid;
int i, ret;
+ unsigned long pages_per_block = PAGES_PER_SECTION * sections_per_block;
phys_addr = simple_strtoull(buf, NULL, 0);
+ if (phys_addr & ((pages_per_block << PAGE_SHIFT) - 1))
+ return -EINVAL;
+
for (i = 0; i < sections_per_block; i++) {
nid = memory_add_physaddr_to_nid(phys_addr);
ret = add_memory(nid, phys_addr,
^ permalink raw reply
* Re: [PATCH 3/4] powerpc/p3060qds: Add support for P3060QDS board
From: Tabi Timur-B04825 @ 2011-09-14 21:17 UTC (permalink / raw)
To: Kumar Gala; +Cc: linuxppc-dev@ozlabs.org, Liu Shengzhou-B36685
In-Reply-To: <1314905180-4417-1-git-send-email-galak@kernel.crashing.org>
On Thu, Sep 1, 2011 at 2:26 PM, Kumar Gala <galak@kernel.crashing.org> wrot=
e:
> + =A0 =A0 =A0 localbus@ffe124000 {
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 reg =3D <0xf 0xfe124000 0 0x1000>;
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 ranges =3D <0 0 0xf 0xe8000000 0x08000000>;
> +
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 flash@0,0 {
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 compatible =3D "cfi-flash";
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 reg =3D <0 0 0x08000000>;
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 bank-width =3D <2>;
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 device-width =3D <2>;
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 };
> +
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 nand@2,0 {
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 #address-cells =3D <1>;
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 #size-cells =3D <1>;
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 compatible =3D "fsl,elbc-fc=
m-nand";
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 reg =3D <0x2 0x0 0x40000>;
The 'ranges' property is missing a line for the NAND device. You need
something like this:
ranges =3D <0 0 0xf 0xe8000000 0x08000000
2 0 0xf 0xffa00000 0x00040000>;
I don't know if these are the right numbers, but the "2" line is missing.
--=20
Timur Tabi
Linux kernel developer at Freescale=
^ permalink raw reply
* [PATCH] [v2] powerpc/85xx: clean up FPGA device tree nodes for Freecsale QorIQ boards
From: Timur Tabi @ 2011-09-14 21:42 UTC (permalink / raw)
To: kumar.gala, linuxppc-dev, devicetree-discuss
Standarize and document the FPGA nodes used on Freescale QorIQ reference
boards. There are different kinds of FPGAs used on the boards, but
only two are currently standard: "pixis" and "qixis". Although there are
minor differences among the boards that have one kind of FPGA, most of the
functionality is the same, so it makes sense to create common compatibility
strings.
Signed-off-by: Timur Tabi <timur@freescale.com>
---
v2: removed references to the CPLD
This patch applies on top of "[PATCH 3/4] powerpc/p3060qds: Add support for
P3060QDS board", but it also assumes that the 'ranges' property for the
localbus node on the P3060QDS device tree includes the missing line for
the NAND devices.
.../devicetree/bindings/powerpc/fsl/board.txt | 30 ++++++++++++--------
arch/powerpc/boot/dts/p1022ds.dts | 2 +-
arch/powerpc/boot/dts/p2020ds.dts | 5 +++
arch/powerpc/boot/dts/p3041ds.dts | 4 +-
arch/powerpc/boot/dts/p3060qds.dts | 8 ++++-
arch/powerpc/boot/dts/p4080ds.dts | 8 ++++-
arch/powerpc/boot/dts/p5020ds.dts | 4 +-
7 files changed, 42 insertions(+), 19 deletions(-)
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/board.txt b/Documentation/devicetree/bindings/powerpc/fsl/board.txt
index 39e9415..ba46a7a 100644
--- a/Documentation/devicetree/bindings/powerpc/fsl/board.txt
+++ b/Documentation/devicetree/bindings/powerpc/fsl/board.txt
@@ -1,3 +1,8 @@
+Freescale Reference Board Bindings
+
+This document describes device tree bindings for various devices that
+exist on some Freescale reference boards.
+
* Board Control and Status (BCSR)
Required properties:
@@ -12,25 +17,26 @@ Example:
reg = <f8000000 8000>;
};
-* Freescale on board FPGA
+* Freescale on-board FPGA
This is the memory-mapped registers for on board FPGA.
Required properities:
-- compatible : should be "fsl,fpga-pixis".
-- reg : should contain the address and the length of the FPPGA register
- set.
+- compatible: should be a board-specific string followed by a string
+ indicating the type of FPGA. Example:
+ "fsl,<board>-pixis", "fsl,fpga-pixis"
+- reg: should contain the address and the length of the FPGA register set.
- interrupt-parent: should specify phandle for the interrupt controller.
-- interrupts : should specify event (wakeup) IRQ.
+- interrupts: should specify event (wakeup) IRQ.
-Example (MPC8610HPCD):
+Example (P1022DS):
- board-control@e8000000 {
- compatible = "fsl,fpga-pixis";
- reg = <0xe8000000 32>;
- interrupt-parent = <&mpic>;
- interrupts = <8 8>;
- };
+ board-control@3,0 {
+ compatible = "fsl,p1022ds-pixis", "fsl,fpga-pixis";
+ reg = <3 0 0x30>;
+ interrupt-parent = <&mpic>;
+ interrupts = <8 8 0 0>;
+ };
* Freescale BCSR GPIO banks
diff --git a/arch/powerpc/boot/dts/p1022ds.dts b/arch/powerpc/boot/dts/p1022ds.dts
index 1be9743..97a0b87 100644
--- a/arch/powerpc/boot/dts/p1022ds.dts
+++ b/arch/powerpc/boot/dts/p1022ds.dts
@@ -150,7 +150,7 @@
};
board-control@3,0 {
- compatible = "fsl,p1022ds-pixis";
+ compatible = "fsl,p1022ds-pixis", "fsl,fpga-pixis";
reg = <3 0 0x30>;
interrupt-parent = <&mpic>;
/*
diff --git a/arch/powerpc/boot/dts/p2020ds.dts b/arch/powerpc/boot/dts/p2020ds.dts
index dae4031..d1e52f3 100644
--- a/arch/powerpc/boot/dts/p2020ds.dts
+++ b/arch/powerpc/boot/dts/p2020ds.dts
@@ -118,6 +118,11 @@
};
};
+ board-control@3,0 {
+ compatible = "fsl,p2020ds-pixis", "fsl,fpga-pixis";
+ reg = <0x3 0x0 0x30>;
+ };
+
nand@4,0 {
compatible = "fsl,elbc-fcm-nand";
reg = <0x4 0x0 0x40000>;
diff --git a/arch/powerpc/boot/dts/p3041ds.dts b/arch/powerpc/boot/dts/p3041ds.dts
index 69cae67..92937ce 100644
--- a/arch/powerpc/boot/dts/p3041ds.dts
+++ b/arch/powerpc/boot/dts/p3041ds.dts
@@ -147,8 +147,8 @@
};
board-control@3,0 {
- compatible = "fsl,p3041ds-pixis";
- reg = <3 0 0x20>;
+ compatible = "fsl,p3041ds-pixis", "fsl,fpga-pixis";
+ reg = <3 0 0x30>;
};
};
diff --git a/arch/powerpc/boot/dts/p3060qds.dts b/arch/powerpc/boot/dts/p3060qds.dts
index 55edfd0..6758852 100644
--- a/arch/powerpc/boot/dts/p3060qds.dts
+++ b/arch/powerpc/boot/dts/p3060qds.dts
@@ -109,7 +109,8 @@
localbus@ffe124000 {
reg = <0xf 0xfe124000 0 0x1000>;
ranges = <0 0 0xf 0xe8000000 0x08000000
- 2 0 0xf 0xffa00000 0x00040000>;
+ 2 0 0xf 0xffa00000 0x00040000
+ 3 0 0xf 0xffdf0000 0x00008000>;
flash@0,0 {
compatible = "cfi-flash";
@@ -155,6 +156,11 @@
reg = <0x1f000000 0x21000000>;
};
};
+
+ board-control@3,0 {
+ compatible = "fsl,p3060qds-qixis", "fsl,fpga-qixis";
+ reg = <3 0 0x100>;
+ };
};
pci0: pcie@ffe200000 {
diff --git a/arch/powerpc/boot/dts/p4080ds.dts b/arch/powerpc/boot/dts/p4080ds.dts
index eb11098..a26cf15 100644
--- a/arch/powerpc/boot/dts/p4080ds.dts
+++ b/arch/powerpc/boot/dts/p4080ds.dts
@@ -108,7 +108,8 @@
localbus@ffe124000 {
reg = <0xf 0xfe124000 0 0x1000>;
- ranges = <0 0 0xf 0xe8000000 0x08000000>;
+ ranges = <0 0 0xf 0xe8000000 0x08000000
+ 3 0 0xf 0xffdf0000 0x00008000>;
flash@0,0 {
compatible = "cfi-flash";
@@ -116,6 +117,11 @@
bank-width = <2>;
device-width = <2>;
};
+
+ board-control@3,0 {
+ compatible = "fsl,p4080ds-pixis", "fsl,fpga-pixis";
+ reg = <3 0 0x30>;
+ };
};
pci0: pcie@ffe200000 {
diff --git a/arch/powerpc/boot/dts/p5020ds.dts b/arch/powerpc/boot/dts/p5020ds.dts
index 8366e2f..b959986 100644
--- a/arch/powerpc/boot/dts/p5020ds.dts
+++ b/arch/powerpc/boot/dts/p5020ds.dts
@@ -147,8 +147,8 @@
};
board-control@3,0 {
- compatible = "fsl,p5020ds-pixis";
- reg = <3 0 0x20>;
+ compatible = "fsl,p5020ds-pixis", "fsl,fpga-pixis";
+ reg = <3 0 0x30>;
};
};
--
1.7.3.4
^ permalink raw reply related
* RE: [PATCH 3/4] powerpc/p3060qds: Add support for P3060QDS board
From: Liu Shengzhou-B36685 @ 2011-09-15 2:22 UTC (permalink / raw)
To: Tabi Timur-B04825, Kumar Gala; +Cc: linuxppc-dev@ozlabs.org
In-Reply-To: <CAOZdJXW54KiExVB3PBj31WfQxgct4Tfk3eh3F0Fw_YCoL_AUTw@mail.gmail.com>
This patch was obsolete, please see http://linux.freescale.net/patchwork/pa=
tch/12224/ posted on Sep 9.
> -----Original Message-----
> From: Tabi Timur-B04825
> Sent: Thursday, September 15, 2011 5:18 AM
> To: Kumar Gala
> Cc: linuxppc-dev@ozlabs.org; Liu Shengzhou-B36685
> Subject: Re: [PATCH 3/4] powerpc/p3060qds: Add support for P3060QDS board
>=20
> On Thu, Sep 1, 2011 at 2:26 PM, Kumar Gala <galak@kernel.crashing.org>
> wrote:
>=20
> > + =A0 =A0 =A0 localbus@ffe124000 {
> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 reg =3D <0xf 0xfe124000 0 0x1000>;
> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 ranges =3D <0 0 0xf 0xe8000000 0x08000000=
>;
> > +
> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 flash@0,0 {
> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 compatible =3D "cfi-flash=
";
> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 reg =3D <0 0 0x08000000>;
> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 bank-width =3D <2>;
> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 device-width =3D <2>;
> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 };
> > +
> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 nand@2,0 {
> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 #address-cells =3D <1>;
> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 #size-cells =3D <1>;
> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 compatible =3D "fsl,elbc-=
fcm-nand";
> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 reg =3D <0x2 0x0 0x40000>=
;
>=20
> The 'ranges' property is missing a line for the NAND device. You need
> something like this:
>=20
> ranges =3D <0 0 0xf 0xe8000000 0x08000000
> 2 0 0xf 0xffa00000 0x00040000>;
>=20
> I don't know if these are the right numbers, but the "2" line is missing.
>=20
> --
> Timur Tabi
> Linux kernel developer at Freescale
^ permalink raw reply
* Re: [PATCH] memory hotplug: Refuse to add unaligned memory regions
From: Greg KH @ 2011-09-15 6:35 UTC (permalink / raw)
To: Anton Blanchard; +Cc: linuxppc-dev, linux-kernel
In-Reply-To: <20110915062615.782bc4df@kryten>
On Thu, Sep 15, 2011 at 06:26:15AM +1000, Anton Blanchard wrote:
>
> The sysfs memory probe interface allows unaligned regions
> to be added:
>
> # echo 0xffffff > /sys/devices/system/memory/probe
>
> # cat /proc/iomem
> 00ffffff-01fffffe : System RAM
> 01ffffff-02fffffe : System RAM
> 02ffffff-03fffffe : System RAM
> 03ffffff-04fffffe : System RAM
> 04ffffff-05fffffe : System RAM
>
> Return -EINVAL instead of creating these bad regions.
>
> Signed-off-by: Anton Blanchard <anton@samba.org>
> ---
Is this something that should go into 3.1 and older kernels to properly
handle this type of error?
greg k-h
^ permalink raw reply
* Re: [PATCH] memory hotplug: Refuse to add unaligned memory regions
From: Andrew Morton @ 2011-09-15 7:58 UTC (permalink / raw)
To: Anton Blanchard; +Cc: gregkh, linuxppc-dev, linux-kernel
In-Reply-To: <20110915062615.782bc4df@kryten>
On Thu, 15 Sep 2011 06:26:15 +1000 Anton Blanchard <anton@samba.org> wrote:
>
> The sysfs memory probe interface allows unaligned regions
> to be added:
>
> # echo 0xffffff > /sys/devices/system/memory/probe
>
> # cat /proc/iomem
> 00ffffff-01fffffe : System RAM
> 01ffffff-02fffffe : System RAM
> 02ffffff-03fffffe : System RAM
> 03ffffff-04fffffe : System RAM
> 04ffffff-05fffffe : System RAM
Then don't do that?
^ permalink raw reply
* Re: [PATCH] powerpc: Fix deadlock in icswx code
From: Jimi Xenidis @ 2011-09-15 13:09 UTC (permalink / raw)
To: Anton Blanchard; +Cc: paulus, linuxppc-dev
In-Reply-To: <20110915054315.5e5ae062@kryten>
On Sep 14, 2011, at 2:43 PM, Anton Blanchard wrote:
Hi Anton,
It would really help me a lot if you could review and maybe merge this =
with my earlier patch that splits this file.
<http://patchwork.ozlabs.org/patch/109103/>
All it does is split.. I promise.
You don't have to take the other stuff.. yet :)
-JX
>=20
> The icswx code introduced an A-B B-A deadlock:
>=20
> CPU0 CPU1
> ---- ----
> lock(&anon_vma->mutex);
> lock(&mm->mmap_sem);
> lock(&anon_vma->mutex);
> lock(&mm->mmap_sem);
>=20
> Instead of using the mmap_sem to keep mm_users constant, take the
> page table spinlock.
>=20
> Signed-off-by: Anton Blanchard <anton@samba.org>
> Cc: <stable@kernel.org>
> ---
>=20
> diff --git a/arch/powerpc/mm/mmu_context_hash64.c =
b/arch/powerpc/mm/mmu_context_hash64.c
> index 3bafc3d..4ff587e 100644
> --- a/arch/powerpc/mm/mmu_context_hash64.c
> +++ b/arch/powerpc/mm/mmu_context_hash64.c
> @@ -136,8 +136,8 @@ int use_cop(unsigned long acop, struct mm_struct =
*mm)
> if (!mm || !acop)
> return -EINVAL;
>=20
> - /* We need to make sure mm_users doesn't change */
> - down_read(&mm->mmap_sem);
> + /* The page_table_lock ensures mm_users won't change under us */
> + spin_lock(&mm->page_table_lock);
> spin_lock(mm->context.cop_lockp);
>=20
> if (mm->context.cop_pid =3D=3D COP_PID_NONE) {
> @@ -164,7 +164,7 @@ int use_cop(unsigned long acop, struct mm_struct =
*mm)
>=20
> out:
> spin_unlock(mm->context.cop_lockp);
> - up_read(&mm->mmap_sem);
> + spin_unlock(&mm->page_table_lock);
>=20
> return ret;
> }
> @@ -185,8 +185,8 @@ void drop_cop(unsigned long acop, struct mm_struct =
*mm)
> if (WARN_ON_ONCE(!mm))
> return;
>=20
> - /* We need to make sure mm_users doesn't change */
> - down_read(&mm->mmap_sem);
> + /* The page_table_lock ensures mm_users won't change under us */
> + spin_lock(&mm->page_table_lock);
> spin_lock(mm->context.cop_lockp);
>=20
> mm->context.acop &=3D ~acop;
> @@ -213,7 +213,7 @@ void drop_cop(unsigned long acop, struct mm_struct =
*mm)
> }
>=20
> spin_unlock(mm->context.cop_lockp);
> - up_read(&mm->mmap_sem);
> + spin_unlock(&mm->page_table_lock);
> }
> EXPORT_SYMBOL_GPL(drop_cop);
>=20
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
^ permalink raw reply
* [PATCH] RapidIO: documentation update
From: Alexandre Bounine @ 2011-09-15 13:19 UTC (permalink / raw)
To: akpm, linux-kernel, linuxppc-dev; +Cc: Alexandre Bounine, Liu Gang
Update rapidio.txt to reflect changes from recent patch.
See http://marc.info/?l=linux-kernel&m=131285620113589&w=2 for details.
Signed-off-by: Alexandre Bounine <alexandre.bounine@idt.com>
Cc: Liu Gang <Gang.Liu@freescale.com>
---
Documentation/rapidio/rapidio.txt | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Documentation/rapidio/rapidio.txt b/Documentation/rapidio/rapidio.txt
index be70ee1..c75694b 100644
--- a/Documentation/rapidio/rapidio.txt
+++ b/Documentation/rapidio/rapidio.txt
@@ -144,7 +144,7 @@ and the default device ID in order to access the device on the active port.
After the host has completed enumeration of the entire network it releases
devices by clearing device ID locks (calls rio_clear_locks()). For each endpoint
-in the system, it sets the Master Enable bit in the Port General Control CSR
+in the system, it sets the Discovered bit in the Port General Control CSR
to indicate that enumeration is completed and agents are allowed to execute
passive discovery of the network.
--
1.7.6
^ permalink raw reply related
* Re: [PATCH] [v2] powerpc/85xx: clean up FPGA device tree nodes for Freecsale QorIQ boards
From: Kumar Gala @ 2011-09-15 16:29 UTC (permalink / raw)
To: Timur Tabi; +Cc: linuxppc-dev, devicetree-discuss
In-Reply-To: <1316036538-311-1-git-send-email-timur@freescale.com>
On Sep 14, 2011, at 4:42 PM, Timur Tabi wrote:
> Standarize and document the FPGA nodes used on Freescale QorIQ =
reference
> boards. There are different kinds of FPGAs used on the boards, but
> only two are currently standard: "pixis" and "qixis". Although there =
are
> minor differences among the boards that have one kind of FPGA, most of =
the
> functionality is the same, so it makes sense to create common =
compatibility
> strings.
>=20
> Signed-off-by: Timur Tabi <timur@freescale.com>
> ---
>=20
> v2: removed references to the CPLD
>=20
> This patch applies on top of "[PATCH 3/4] powerpc/p3060qds: Add =
support for
> P3060QDS board", but it also assumes that the 'ranges' property for =
the
> localbus node on the P3060QDS device tree includes the missing line =
for
> the NAND devices.
>=20
> .../devicetree/bindings/powerpc/fsl/board.txt | 30 =
++++++++++++--------
> arch/powerpc/boot/dts/p1022ds.dts | 2 +-
> arch/powerpc/boot/dts/p2020ds.dts | 5 +++
> arch/powerpc/boot/dts/p3041ds.dts | 4 +-
> arch/powerpc/boot/dts/p3060qds.dts | 8 ++++-
> arch/powerpc/boot/dts/p4080ds.dts | 8 ++++-
> arch/powerpc/boot/dts/p5020ds.dts | 4 +-
> 7 files changed, 42 insertions(+), 19 deletions(-)
What happened to looking at pixis vs ngpixis ?
- k=
^ permalink raw reply
* Re: [PATCH] [v2] powerpc/85xx: clean up FPGA device tree nodes for Freecsale QorIQ boards
From: Timur Tabi @ 2011-09-15 16:31 UTC (permalink / raw)
To: Kumar Gala; +Cc: linuxppc-dev, devicetree-discuss
In-Reply-To: <454A6F08-BD85-4C80-BF0D-3BC04D95EA36@freescale.com>
Kumar Gala wrote:
> What happened to looking at pixis vs ngpixis ?
Doh, I knew I was forgetting something.
--
Timur Tabi
Linux kernel developer at Freescale
^ permalink raw reply
* Re: [PATCH] [v2] powerpc/85xx: clean up FPGA device tree nodes for Freecsale QorIQ boards
From: Gala Kumar-B11780 @ 2011-09-15 17:04 UTC (permalink / raw)
To: Tabi Timur-B04825
Cc: linuxppc-dev@ozlabs.org, Gala Kumar-B11780,
devicetree-discuss@lists.ozlabs.org
In-Reply-To: <4E722860.8090605@freescale.com>
I pulling the p3060qds bit out so drop that change from next patch.
- k
On Sep 15, 2011, at 11:31 AM, "Tabi Timur-B04825" <B04825@freescale.com> wr=
ote:
> Kumar Gala wrote:
>> What happened to looking at pixis vs ngpixis ?
>=20
> Doh, I knew I was forgetting something.
>=20
> --=20
> Timur Tabi
> Linux kernel developer at Freescale
^ permalink raw reply
* Re: [PATCH] [v2] powerpc/85xx: clean up FPGA device tree nodes for Freecsale QorIQ boards
From: Timur Tabi @ 2011-09-15 17:51 UTC (permalink / raw)
To: Gala Kumar-B11780
Cc: linuxppc-dev@ozlabs.org, devicetree-discuss@lists.ozlabs.org
In-Reply-To: <95760360-FBCE-4D68-B2AB-A5270F8FBD0F@freescale.com>
Gala Kumar-B11780 wrote:
> I pulling the p3060qds bit out so drop that change from next patch.
>
Ok, I'm thinking it should look like this:
compatible = "fsl,p3060qds-fpga", "fsl,fpga-qixis";
--
Timur Tabi
Linux kernel developer at Freescale
^ permalink raw reply
* Re: [PATCH] [v2] powerpc/85xx: clean up FPGA device tree nodes for Freecsale QorIQ boards
From: Kumar Gala @ 2011-09-15 17:54 UTC (permalink / raw)
To: Timur Tabi
Cc: linuxppc-dev@ozlabs.org, Gala Kumar-B11780,
devicetree-discuss@lists.ozlabs.org
In-Reply-To: <4E723B0A.9000802@freescale.com>
On Sep 15, 2011, at 12:51 PM, Timur Tabi wrote:
> Gala Kumar-B11780 wrote:
>> I pulling the p3060qds bit out so drop that change from next patch.
>>
>
> Ok, I'm thinking it should look like this:
>
> compatible = "fsl,p3060qds-fpga", "fsl,fpga-qixis";
Right, I pulled those bits out of your patch.
- k
^ permalink raw reply
* Re: [PATCH] [v2] powerpc/85xx: clean up FPGA device tree nodes for Freecsale QorIQ boards
From: Timur Tabi @ 2011-09-15 17:55 UTC (permalink / raw)
To: Kumar Gala
Cc: linuxppc-dev@ozlabs.org, Gala Kumar-B11780,
devicetree-discuss@lists.ozlabs.org
In-Reply-To: <45584309-BA30-4C2A-AF5E-AE22506D705D@freescale.com>
Kumar Gala wrote:
>> > compatible = "fsl,p3060qds-fpga", "fsl,fpga-qixis";
> Right, I pulled those bits out of your patch.
I was hoping you'd notice that in v3 of my patch, I changed fsl,p3060qds-qixis
to fsl,p3060qds-fpga. I think
"fsl,p3060qds-qixis", "fsl,fpga-qixis";
looks kinda dumb.
--
Timur Tabi
Linux kernel developer at Freescale
^ permalink raw reply
* [PATCH] [v3] powerpc/85xx: clean up FPGA device tree nodes for Freecsale QorIQ boards
From: Timur Tabi @ 2011-09-15 18:04 UTC (permalink / raw)
To: kumar.gala, linuxppc-dev, devicetree-discuss
Standarize and document the FPGA nodes used on Freescale QorIQ reference
boards. There are different kinds of FPGAs used on the boards, but
only two are currently standard: "pixis", "ngpixis", and "qixis". Although
there are minor differences among the boards that have one kind of FPGA, most
of the functionality is the same, so it makes sense to create common
compatibility strings.
We also need to update the P1022DS platform file, because the compatible
string for its PIXIS node has changed. This means that older kernels are
not compatible with newer device trees. This is not a real problem, however,
since that particular function doesn't work anyway. When the DIU is active,
the PIXIS is in "indirect mode", and so cannot be accessed as a memory-mapped
device.
Signed-off-by: Timur Tabi <timur@freescale.com>
---
v3: added "ngpixis" to list
v2: removed references to the CPLD
This patch only adds "ngpixis" nodes, because that's the easiest. The
P3060QDS device tree already has a qixis node. Support for older boards
with the old "pixis" will be added later.
.../devicetree/bindings/powerpc/fsl/board.txt | 30 ++++++++++++--------
arch/powerpc/boot/dts/p1022ds.dts | 2 +-
arch/powerpc/boot/dts/p2020ds.dts | 5 +++
arch/powerpc/boot/dts/p3041ds.dts | 4 +-
arch/powerpc/boot/dts/p4080ds.dts | 8 ++++-
arch/powerpc/boot/dts/p5020ds.dts | 4 +-
arch/powerpc/platforms/85xx/p1022_ds.c | 11 ++++--
7 files changed, 42 insertions(+), 22 deletions(-)
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/board.txt b/Documentation/devicetree/bindings/powerpc/fsl/board.txt
index 39e9415..380914e 100644
--- a/Documentation/devicetree/bindings/powerpc/fsl/board.txt
+++ b/Documentation/devicetree/bindings/powerpc/fsl/board.txt
@@ -1,3 +1,8 @@
+Freescale Reference Board Bindings
+
+This document describes device tree bindings for various devices that
+exist on some Freescale reference boards.
+
* Board Control and Status (BCSR)
Required properties:
@@ -12,25 +17,26 @@ Example:
reg = <f8000000 8000>;
};
-* Freescale on board FPGA
+* Freescale on-board FPGA
This is the memory-mapped registers for on board FPGA.
Required properities:
-- compatible : should be "fsl,fpga-pixis".
-- reg : should contain the address and the length of the FPPGA register
- set.
+- compatible: should be a board-specific string followed by a string
+ indicating the type of FPGA. Example:
+ "fsl,<board>-fpga", "fsl,fpga-pixis"
+- reg: should contain the address and the length of the FPGA register set.
- interrupt-parent: should specify phandle for the interrupt controller.
-- interrupts : should specify event (wakeup) IRQ.
+- interrupts: should specify event (wakeup) IRQ.
-Example (MPC8610HPCD):
+Example (P1022DS):
- board-control@e8000000 {
- compatible = "fsl,fpga-pixis";
- reg = <0xe8000000 32>;
- interrupt-parent = <&mpic>;
- interrupts = <8 8>;
- };
+ board-control@3,0 {
+ compatible = "fsl,p1022ds-fpga", "fsl,fpga-ngpixis";
+ reg = <3 0 0x30>;
+ interrupt-parent = <&mpic>;
+ interrupts = <8 8 0 0>;
+ };
* Freescale BCSR GPIO banks
diff --git a/arch/powerpc/boot/dts/p1022ds.dts b/arch/powerpc/boot/dts/p1022ds.dts
index 1be9743..b9b8719 100644
--- a/arch/powerpc/boot/dts/p1022ds.dts
+++ b/arch/powerpc/boot/dts/p1022ds.dts
@@ -150,7 +150,7 @@
};
board-control@3,0 {
- compatible = "fsl,p1022ds-pixis";
+ compatible = "fsl,p1022ds-fpga", "fsl,fpga-ngpixis";
reg = <3 0 0x30>;
interrupt-parent = <&mpic>;
/*
diff --git a/arch/powerpc/boot/dts/p2020ds.dts b/arch/powerpc/boot/dts/p2020ds.dts
index dae4031..66f03d6 100644
--- a/arch/powerpc/boot/dts/p2020ds.dts
+++ b/arch/powerpc/boot/dts/p2020ds.dts
@@ -118,6 +118,11 @@
};
};
+ board-control@3,0 {
+ compatible = "fsl,p2020ds-fpga", "fsl,fpga-ngpixis";
+ reg = <0x3 0x0 0x30>;
+ };
+
nand@4,0 {
compatible = "fsl,elbc-fcm-nand";
reg = <0x4 0x0 0x40000>;
diff --git a/arch/powerpc/boot/dts/p3041ds.dts b/arch/powerpc/boot/dts/p3041ds.dts
index 69cae67..961a74c 100644
--- a/arch/powerpc/boot/dts/p3041ds.dts
+++ b/arch/powerpc/boot/dts/p3041ds.dts
@@ -147,8 +147,8 @@
};
board-control@3,0 {
- compatible = "fsl,p3041ds-pixis";
- reg = <3 0 0x20>;
+ compatible = "fsl,p3041ds-fpga", "fsl,fpga-ngpixis";
+ reg = <3 0 0x30>;
};
};
diff --git a/arch/powerpc/boot/dts/p4080ds.dts b/arch/powerpc/boot/dts/p4080ds.dts
index eb11098..ccd53af 100644
--- a/arch/powerpc/boot/dts/p4080ds.dts
+++ b/arch/powerpc/boot/dts/p4080ds.dts
@@ -108,7 +108,8 @@
localbus@ffe124000 {
reg = <0xf 0xfe124000 0 0x1000>;
- ranges = <0 0 0xf 0xe8000000 0x08000000>;
+ ranges = <0 0 0xf 0xe8000000 0x08000000
+ 3 0 0xf 0xffdf0000 0x00008000>;
flash@0,0 {
compatible = "cfi-flash";
@@ -116,6 +117,11 @@
bank-width = <2>;
device-width = <2>;
};
+
+ board-control@3,0 {
+ compatible = "fsl,p4080ds-fpga", "fsl,fpga-ngpixis";
+ reg = <3 0 0x30>;
+ };
};
pci0: pcie@ffe200000 {
diff --git a/arch/powerpc/boot/dts/p5020ds.dts b/arch/powerpc/boot/dts/p5020ds.dts
index 8366e2f..ca4d592 100644
--- a/arch/powerpc/boot/dts/p5020ds.dts
+++ b/arch/powerpc/boot/dts/p5020ds.dts
@@ -147,8 +147,8 @@
};
board-control@3,0 {
- compatible = "fsl,p5020ds-pixis";
- reg = <3 0 0x20>;
+ compatible = "fsl,p5020ds-fpga", "fsl,fpga-ngpixis";
+ reg = <3 0 0x30>;
};
};
diff --git a/arch/powerpc/platforms/85xx/p1022_ds.c b/arch/powerpc/platforms/85xx/p1022_ds.c
index 266b3aa..6a0b973 100644
--- a/arch/powerpc/platforms/85xx/p1022_ds.c
+++ b/arch/powerpc/platforms/85xx/p1022_ds.c
@@ -128,17 +128,20 @@ static void p1022ds_set_gamma_table(int monitor_port, char *gamma_table_base)
*/
static void p1022ds_set_monitor_port(int monitor_port)
{
- struct device_node *pixis_node;
+ struct device_node *np;
void __iomem *pixis;
u8 __iomem *brdcfg1;
- pixis_node = of_find_compatible_node(NULL, NULL, "fsl,p1022ds-pixis");
- if (!pixis_node) {
+ np = of_find_compatible_node(NULL, NULL, "fsl,p1022ds-fpga");
+ if (!np)
+ /* older device trees used "fsl,p1022ds-pixis" */
+ np = of_find_compatible_node(NULL, NULL, "fsl,p1022ds-pixis");
+ if (!np) {
pr_err("p1022ds: missing ngPIXIS node\n");
return;
}
- pixis = of_iomap(pixis_node, 0);
+ pixis = of_iomap(np, 0);
if (!pixis) {
pr_err("p1022ds: could not map ngPIXIS registers\n");
return;
--
1.7.3.4
^ permalink raw reply related
* Re: [PATCH] powerpc/fsl_msi: fix support for multiple MSI ranges
From: Scott Wood @ 2011-09-15 21:38 UTC (permalink / raw)
To: Timur Tabi; +Cc: kumar.gala, linuxppc-dev
In-Reply-To: <1315948620-12402-1-git-send-email-timur@freescale.com>
On 09/13/2011 04:17 PM, Timur Tabi wrote:
> Commit 6820fead ("powerpc/fsl_msi: Handle msi-available-ranges better") added
> support for multiple ranges in the msi-available-ranges property, but it
> miscalculated the MSIR index when multiple ranges are used.
>
> Signed-off-by: Timur Tabi <timur@freescale.com>
> ---
> arch/powerpc/sysdev/fsl_msi.c | 8 +++++---
> 1 files changed, 5 insertions(+), 3 deletions(-)
Acked-by: Scott Wood <scottwood@freescale.com>
-Scott
^ 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