* Re: Connecting SGMII PHY to eTSEC1 on P1022
From: Timur Tabi @ 2011-06-22 16:18 UTC (permalink / raw)
To: Felix Radensky; +Cc: linuxppc-dev@ozlabs.org
In-Reply-To: <4E021113.10909@embedded-sol.com>
Felix Radensky wrote:
> What am I doing wrong ?
Can you debug the PHY driver to see if it's getting called and trying to talk to
the PHY itself?
--
Timur Tabi
Linux kernel developer at Freescale
^ permalink raw reply
* Connecting SGMII PHY to eTSEC1 on P1022
From: Felix Radensky @ 2011-06-22 15:58 UTC (permalink / raw)
To: linuxppc-dev@ozlabs.org, Tabi Timur-B04825
Hi,
On a custom P1022-based board I have SGMII PHY connected to eTSEC1.
PHY address is 0x1. Ethernet works fine in u-boot, but in linux
there's no link.
I have the following in my device tree:
mdio@24000 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "fsl,etsec2-mdio";
reg = <0x24000 0x1000 0xb0030 0x4>;
phy0: ethernet-phy@1 {
interrupt-parent = <&mpic>;
interrupts = <3 1>;
reg = <0x1>;
};
tbi0: tbi-phy@11 {
reg = <0x11>;
device_type = "tbi-phy";
};
};
enet0: ethernet@B0000 {
#address-cells = <1>;
#size-cells = <1>;
cell-index = <0>;
device_type = "network";
model = "eTSEC";
compatible = "fsl,etsec2";
fsl,num_rx_queues = <0x8>;
fsl,num_tx_queues = <0x8>;
fsl,magic-packet;
fsl,wake-on-filer;
clk-handle = <&etsec1_clk>;
local-mac-address = [ 00 00 00 00 00 00 ];
interrupt-parent = <&mpic>;
phy-handle = <&phy0>;
tbi-handle = <&tbi0>;
phy-connection-type = "sgmii";
...
};
What am I doing wrong ?
Thanks a lot in advance.
Felix.
^ permalink raw reply
* Re: [PATCH] powerpc, ppc4xx: Update canyonlands and glacier boards DTS to add HW RNG support
From: Josh Boyer @ 2011-06-22 16:14 UTC (permalink / raw)
To: Mike Williams; +Cc: linuxppc-dev
In-Reply-To: <1308758983-15687-1-git-send-email-mike@mikebwilliams.com>
On Wed, Jun 22, 2011 at 12:09:43PM -0400, Mike Williams wrote:
>
>Signed-off-by: Mike Williams <mike@mikebwilliams.com>
>---
> arch/powerpc/boot/dts/canyonlands.dts | 5 +++++
> arch/powerpc/boot/dts/glacier.dts | 5 +++++
> 2 files changed, 10 insertions(+), 0 deletions(-)
Thanks, you beat me to it! I'll get these into my -next branch soon. I
have a similar change for the Sequoia DTS.
josh
^ permalink raw reply
* [PATCH] powerpc, ppc4xx: Update canyonlands and glacier boards DTS to add HW RNG support
From: Mike Williams @ 2011-06-22 16:09 UTC (permalink / raw)
To: linuxppc-dev; +Cc: Mike Williams
Signed-off-by: Mike Williams <mike@mikebwilliams.com>
---
arch/powerpc/boot/dts/canyonlands.dts | 5 +++++
arch/powerpc/boot/dts/glacier.dts | 5 +++++
2 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/arch/powerpc/boot/dts/canyonlands.dts b/arch/powerpc/boot/dts/canyonlands.dts
index 22dd6ae..3dc75de 100644
--- a/arch/powerpc/boot/dts/canyonlands.dts
+++ b/arch/powerpc/boot/dts/canyonlands.dts
@@ -143,6 +143,11 @@
interrupts = <0x1d 0x4>;
};
+ HWRNG: hwrng@110000 {
+ compatible = "amcc,ppc460ex-rng", "ppc4xx-rng";
+ reg = <4 0x00110000 0x50>;
+ };
+
MAL0: mcmal {
compatible = "ibm,mcmal-460ex", "ibm,mcmal2";
dcr-reg = <0x180 0x062>;
diff --git a/arch/powerpc/boot/dts/glacier.dts b/arch/powerpc/boot/dts/glacier.dts
index e618fc4..b153a73 100644
--- a/arch/powerpc/boot/dts/glacier.dts
+++ b/arch/powerpc/boot/dts/glacier.dts
@@ -136,6 +136,11 @@
interrupts = <0x1d 0x4>;
};
+ HWRNG: hwrng@110000 {
+ compatible = "amcc,ppc460ex-rng", "ppc4xx-rng";
+ reg = <4 0x00110000 0x50>;
+ };
+
MAL0: mcmal {
compatible = "ibm,mcmal-460gt", "ibm,mcmal2";
dcr-reg = <0x180 0x062>;
--
1.7.3.4
^ permalink raw reply related
* Re: [PATCH 6/7] [v2] tty/powerpc: introduce the ePAPR embedded hypervisor byte channel driver
From: Timur Tabi @ 2011-06-22 15:23 UTC (permalink / raw)
To: kumar.gala, benh, greg, akpm, linuxppc-dev, linux-kernel,
linux-console, alan, arnd
In-Reply-To: <1305830092-20104-1-git-send-email-timur@freescale.com>
Timur Tabi wrote:
> The ePAPR embedded hypervisor specification provides an API for "byte
> channels", which are serial-like virtual devices for sending and receiving
> streams of bytes. This driver provides Linux kernel support for byte
> channels via three distinct interfaces:
>
> 1) An early-console (udbg) driver. This provides early console output
> through a byte channel. The byte channel handle must be specified in a
> Kconfig option.
>
> 2) A normal console driver. Output is sent to the byte channel designated
> for stdout in the device tree. The console driver is for handling kernel
> printk calls.
>
> 3) A tty driver, which is used to handle user-space input and output. The
> byte channel used for the console is designated as the default tty.
>
> Signed-off-by: Timur Tabi <timur@freescale.com>
I know you guys are busy, but can I get an ACK or two on this patch, if there
are no issues with it? It's the only one of the seven that doesn't have one. I
think v2 has addressed all of the concerns raised on version 1.
--
Timur Tabi
Linux kernel developer at Freescale
^ permalink raw reply
* RE: [PATCH] hwrng: ppc4xx - add support for ppc4xx TRNG
From: Williams, Michael (mwilli60) @ 2011-06-22 14:49 UTC (permalink / raw)
To: linuxppc-dev@lists.ozlabs.org
In-Reply-To: <20110621121955.GB2414@zod.rchland.ibm.com>
> Various PowerPC 4xx SoCs contain a TRNG embedded in the Security
> function.
> This adds a device driver for that TRNG.
>=20
> Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Works for me on a 460GT glacier board.
Tested-by: Mike Williams <mike@mikebwilliams.com>
>=20
> ---
> drivers/char/hw_random/Kconfig | 12 +++
> drivers/char/hw_random/Makefile | 1 +
> drivers/char/hw_random/ppc4xx-rng.c | 156
> +++++++++++++++++++++++++++++++++++
> 3 files changed, 169 insertions(+), 0 deletions(-)
> create mode 100644 drivers/char/hw_random/ppc4xx-rng.c
>=20
> diff --git a/drivers/char/hw_random/Kconfig
> b/drivers/char/hw_random/Kconfig
> index a60043b..1d2ebc7 100644
> --- a/drivers/char/hw_random/Kconfig
> +++ b/drivers/char/hw_random/Kconfig
> @@ -210,3 +210,15 @@ config HW_RANDOM_PICOXCELL
> module will be called picoxcell-rng.
>=20
> If unsure, say Y.
> +
> +config HW_RANDOM_PPC4XX
> + tristate "PowerPC 4xx generic true random number generator
> support"
> + depends on HW_RANDOM && PPC && 4xx
> + ---help---
> + This driver provides the kernel-side support for the TRNG
> hardware
> + found in the security function of some PowerPC 4xx SoCs.
> +
> + To compile this driver as a module, choose M here: the
> + module will be called ppc4xx-rng.
> +
> + If unsure, say N.
> diff --git a/drivers/char/hw_random/Makefile
> b/drivers/char/hw_random/Makefile
> index 3db4eb8..c88f244 100644
> --- a/drivers/char/hw_random/Makefile
> +++ b/drivers/char/hw_random/Makefile
> @@ -20,3 +20,4 @@ obj-$(CONFIG_HW_RANDOM_MXC_RNGA) +=3D mxc-rnga.o
> obj-$(CONFIG_HW_RANDOM_OCTEON) +=3D octeon-rng.o
> obj-$(CONFIG_HW_RANDOM_NOMADIK) +=3D nomadik-rng.o
> obj-$(CONFIG_HW_RANDOM_PICOXCELL) +=3D picoxcell-rng.o
> +obj-$(CONFIG_HW_RANDOM_PPC4XX) +=3D ppc4xx-rng.o
> diff --git a/drivers/char/hw_random/ppc4xx-rng.c
> b/drivers/char/hw_random/ppc4xx-rng.c
> new file mode 100644
> index 0000000..b8afa6a
> --- /dev/null
> +++ b/drivers/char/hw_random/ppc4xx-rng.c
> @@ -0,0 +1,156 @@
> +/*
> + * Generic PowerPC 44x RNG driver
> + *
> + * Copyright 2011 IBM Corporation
> + *
> + * 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; version 2 of the License.
> + */
> +
> +#include <linux/module.h>
> +#include <linux/kernel.h>
> +#include <linux/platform_device.h>
> +#include <linux/hw_random.h>
> +#include <linux/delay.h>
> +#include <linux/of_platform.h>
> +#include <asm/io.h>
> +
> +#define PPC4XX_TRNG_DEV_CTRL 0x60080
> +
> +#define PPC4XX_TRNGE 0x00020000
> +#define PPC4XX_TRNG_CTRL 0x0008
> +#define PPC4XX_TRNG_CTRL_DALM 0x20
> +#define PPC4XX_TRNG_STAT 0x0004
> +#define PPC4XX_TRNG_STAT_B 0x1
> +#define PPC4XX_TRNG_DATA 0x0000
> +
> +#define MODULE_NAME "ppc4xx_rng"
> +
> +static int ppc4xx_rng_data_present(struct hwrng *rng, int wait)
> +{
> + void __iomem *rng_regs =3D (void __iomem *) rng->priv;
> + int busy, i, present =3D 0;
> +
> + for (i =3D 0; i < 20; i++) {
> + busy =3D (in_le32(rng_regs + PPC4XX_TRNG_STAT) &
> PPC4XX_TRNG_STAT_B);
> + if (!busy || !wait) {
> + present =3D 1;
> + break;
> + }
> + udelay(10);
> + }
> + return present;
> +}
> +
> +static int ppc4xx_rng_data_read(struct hwrng *rng, u32 *data)
> +{
> + void __iomem *rng_regs =3D (void __iomem *) rng->priv;
> + *data =3D in_le32(rng_regs + PPC4XX_TRNG_DATA);
> + return 4;
> +}
> +
> +static int ppc4xx_rng_enable(int enable)
> +{
> + struct device_node *ctrl;
> + void __iomem *ctrl_reg;
> + int err =3D 0;
> + u32 val;
> +
> + /* Find the main crypto device node and map it to turn the TRNG
> on */
> + ctrl =3D of_find_compatible_node(NULL, NULL, "amcc,ppc4xx-crypto");
> + if (!ctrl)
> + return -ENODEV;
> +
> + ctrl_reg =3D of_iomap(ctrl, 0);
> + if (!ctrl_reg) {
> + err =3D -ENODEV;
> + goto out;
> + }
> +
> + val =3D in_le32(ctrl_reg + PPC4XX_TRNG_DEV_CTRL);
> +
> + if (enable)
> + val |=3D PPC4XX_TRNGE;
> + else
> + val =3D val & ~PPC4XX_TRNGE;
> +
> + out_le32(ctrl_reg + PPC4XX_TRNG_DEV_CTRL, val);
> + iounmap(ctrl_reg);
> +
> +out:
> + of_node_put(ctrl);
> +
> + return err;
> +}
> +
> +static struct hwrng ppc4xx_rng =3D {
> + .name =3D MODULE_NAME,
> + .data_present =3D ppc4xx_rng_data_present,
> + .data_read =3D ppc4xx_rng_data_read,
> +};
> +
> +static int __devinit ppc4xx_rng_probe(struct platform_device *dev)
> +{
> + void __iomem *rng_regs;
> + int err =3D 0;
> +
> + rng_regs =3D of_iomap(dev->dev.of_node, 0);
> + if (!rng_regs)
> + return -ENODEV;
> +
> + err =3D ppc4xx_rng_enable(1);
> + if (err)
> + return err;
> +
> + out_le32(rng_regs + PPC4XX_TRNG_CTRL, PPC4XX_TRNG_CTRL_DALM);
> + ppc4xx_rng.priv =3D (unsigned long) rng_regs;
> +
> + err =3D hwrng_register(&ppc4xx_rng);
> +
> + return err;
> +}
> +
> +static int __devexit ppc4xx_rng_remove(struct platform_device *dev)
> +{
> + void __iomem *rng_regs =3D (void __iomem *) ppc4xx_rng.priv;
> +
> + hwrng_unregister(&ppc4xx_rng);
> + ppc4xx_rng_enable(0);
> + iounmap(rng_regs);
> +
> + return 0;
> +}
> +
> +static struct of_device_id ppc4xx_rng_match[] =3D {
> + { .compatible =3D "ppc4xx-rng", },
> + { .compatible =3D "amcc,ppc460ex-rng", },
> + { .compatible =3D "amcc,ppc440epx-rng", },
> + {},
> +};
> +
> +static struct platform_driver ppc4xx_rng_driver =3D {
> + .driver =3D {
> + .name =3D MODULE_NAME,
> + .owner =3D THIS_MODULE,
> + .of_match_table =3D ppc4xx_rng_match,
> + },
> + .probe =3D ppc4xx_rng_probe,
> + .remove =3D ppc4xx_rng_remove,
> +};
> +
> +static int __init ppc4xx_rng_init(void)
> +{
> + return platform_driver_register(&ppc4xx_rng_driver);
> +}
> +module_init(ppc4xx_rng_init);
> +
> +static void __exit ppc4xx_rng_exit(void)
> +{
> + platform_driver_unregister(&ppc4xx_rng_driver);
> +}
> +module_exit(ppc4xx_rng_exit);
> +
> +MODULE_LICENSE("GPL");
> +MODULE_AUTHOR("Josh Boyer <jwboyer@linux.vnet.ibm.com>");
> +MODULE_DESCRIPTION("HW RNG driver for PPC 4xx processors");
> --
> 1.7.4.4
>=20
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
^ permalink raw reply
* [PATCH v2 1/3] driver core: Add ability for arch code to setup pdev_archdata
From: Kumar Gala @ 2011-06-22 15:09 UTC (permalink / raw)
To: Greg KH; +Cc: linuxppc-dev, linux-kernel
In-Reply-To: <1308744176-24491-1-git-send-email-galak@kernel.crashing.org>
On some architectures we need to setup pdev_archdata before we add the
device. Waiting til a bus_notifier is too late since we might need the
pdev_archdata in the bus notifier. One example is setting up of dma_mask
pointers such that it can be used in a bus_notifier.
We add noop version of arch_setup_pdev_archdata() in
<asm-generic/platform_device.h> and allow the arch code to override with
access the full definitions of struct device, struct platform_device, and
struct pdev_archdata.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---
* Added license, and comments about arch_setup_pdev_archdata()
per Mike's comments
arch/alpha/include/asm/platform_device.h | 1 +
arch/arm/include/asm/platform_device.h | 1 +
arch/avr32/include/asm/platform_device.h | 1 +
arch/blackfin/include/asm/platform_device.h | 1 +
arch/cris/include/asm/platform_device.h | 1 +
arch/frv/include/asm/platform_device.h | 1 +
arch/h8300/include/asm/platform_device.h | 1 +
arch/ia64/include/asm/platform_device.h | 1 +
arch/m32r/include/asm/platform_device.h | 1 +
arch/m68k/include/asm/platform_device.h | 1 +
arch/microblaze/include/asm/platform_device.h | 1 +
arch/mips/include/asm/platform_device.h | 1 +
arch/mn10300/include/asm/platform_device.h | 1 +
arch/parisc/include/asm/platform_device.h | 1 +
arch/powerpc/include/asm/platform_device.h | 1 +
arch/s390/include/asm/platform_device.h | 1 +
arch/score/include/asm/platform_device.h | 1 +
arch/sh/include/asm/platform_device.h | 1 +
arch/sparc/include/asm/platform_device.h | 1 +
arch/tile/include/asm/platform_device.h | 1 +
arch/unicore32/include/asm/platform_device.h | 1 +
arch/x86/include/asm/platform_device.h | 1 +
arch/xtensa/include/asm/platform_device.h | 1 +
drivers/base/platform.c | 2 +
include/asm-generic/platform_device.h | 30 +++++++++++++++++++++++++
25 files changed, 55 insertions(+), 0 deletions(-)
create mode 100644 arch/alpha/include/asm/platform_device.h
create mode 100644 arch/arm/include/asm/platform_device.h
create mode 100644 arch/avr32/include/asm/platform_device.h
create mode 100644 arch/blackfin/include/asm/platform_device.h
create mode 100644 arch/cris/include/asm/platform_device.h
create mode 100644 arch/frv/include/asm/platform_device.h
create mode 100644 arch/h8300/include/asm/platform_device.h
create mode 100644 arch/ia64/include/asm/platform_device.h
create mode 100644 arch/m32r/include/asm/platform_device.h
create mode 100644 arch/m68k/include/asm/platform_device.h
create mode 100644 arch/microblaze/include/asm/platform_device.h
create mode 100644 arch/mips/include/asm/platform_device.h
create mode 100644 arch/mn10300/include/asm/platform_device.h
create mode 100644 arch/parisc/include/asm/platform_device.h
create mode 100644 arch/powerpc/include/asm/platform_device.h
create mode 100644 arch/s390/include/asm/platform_device.h
create mode 100644 arch/score/include/asm/platform_device.h
create mode 100644 arch/sh/include/asm/platform_device.h
create mode 100644 arch/sparc/include/asm/platform_device.h
create mode 100644 arch/tile/include/asm/platform_device.h
create mode 100644 arch/unicore32/include/asm/platform_device.h
create mode 100644 arch/x86/include/asm/platform_device.h
create mode 100644 arch/xtensa/include/asm/platform_device.h
create mode 100644 include/asm-generic/platform_device.h
diff --git a/arch/alpha/include/asm/platform_device.h b/arch/alpha/include/asm/platform_device.h
new file mode 100644
index 0000000..01452c3
--- /dev/null
+++ b/arch/alpha/include/asm/platform_device.h
@@ -0,0 +1 @@
+#include <asm-generic/platform_device.h>
diff --git a/arch/arm/include/asm/platform_device.h b/arch/arm/include/asm/platform_device.h
new file mode 100644
index 0000000..01452c3
--- /dev/null
+++ b/arch/arm/include/asm/platform_device.h
@@ -0,0 +1 @@
+#include <asm-generic/platform_device.h>
diff --git a/arch/avr32/include/asm/platform_device.h b/arch/avr32/include/asm/platform_device.h
new file mode 100644
index 0000000..01452c3
--- /dev/null
+++ b/arch/avr32/include/asm/platform_device.h
@@ -0,0 +1 @@
+#include <asm-generic/platform_device.h>
diff --git a/arch/blackfin/include/asm/platform_device.h b/arch/blackfin/include/asm/platform_device.h
new file mode 100644
index 0000000..01452c3
--- /dev/null
+++ b/arch/blackfin/include/asm/platform_device.h
@@ -0,0 +1 @@
+#include <asm-generic/platform_device.h>
diff --git a/arch/cris/include/asm/platform_device.h b/arch/cris/include/asm/platform_device.h
new file mode 100644
index 0000000..01452c3
--- /dev/null
+++ b/arch/cris/include/asm/platform_device.h
@@ -0,0 +1 @@
+#include <asm-generic/platform_device.h>
diff --git a/arch/frv/include/asm/platform_device.h b/arch/frv/include/asm/platform_device.h
new file mode 100644
index 0000000..01452c3
--- /dev/null
+++ b/arch/frv/include/asm/platform_device.h
@@ -0,0 +1 @@
+#include <asm-generic/platform_device.h>
diff --git a/arch/h8300/include/asm/platform_device.h b/arch/h8300/include/asm/platform_device.h
new file mode 100644
index 0000000..01452c3
--- /dev/null
+++ b/arch/h8300/include/asm/platform_device.h
@@ -0,0 +1 @@
+#include <asm-generic/platform_device.h>
diff --git a/arch/ia64/include/asm/platform_device.h b/arch/ia64/include/asm/platform_device.h
new file mode 100644
index 0000000..01452c3
--- /dev/null
+++ b/arch/ia64/include/asm/platform_device.h
@@ -0,0 +1 @@
+#include <asm-generic/platform_device.h>
diff --git a/arch/m32r/include/asm/platform_device.h b/arch/m32r/include/asm/platform_device.h
new file mode 100644
index 0000000..01452c3
--- /dev/null
+++ b/arch/m32r/include/asm/platform_device.h
@@ -0,0 +1 @@
+#include <asm-generic/platform_device.h>
diff --git a/arch/m68k/include/asm/platform_device.h b/arch/m68k/include/asm/platform_device.h
new file mode 100644
index 0000000..01452c3
--- /dev/null
+++ b/arch/m68k/include/asm/platform_device.h
@@ -0,0 +1 @@
+#include <asm-generic/platform_device.h>
diff --git a/arch/microblaze/include/asm/platform_device.h b/arch/microblaze/include/asm/platform_device.h
new file mode 100644
index 0000000..01452c3
--- /dev/null
+++ b/arch/microblaze/include/asm/platform_device.h
@@ -0,0 +1 @@
+#include <asm-generic/platform_device.h>
diff --git a/arch/mips/include/asm/platform_device.h b/arch/mips/include/asm/platform_device.h
new file mode 100644
index 0000000..01452c3
--- /dev/null
+++ b/arch/mips/include/asm/platform_device.h
@@ -0,0 +1 @@
+#include <asm-generic/platform_device.h>
diff --git a/arch/mn10300/include/asm/platform_device.h b/arch/mn10300/include/asm/platform_device.h
new file mode 100644
index 0000000..01452c3
--- /dev/null
+++ b/arch/mn10300/include/asm/platform_device.h
@@ -0,0 +1 @@
+#include <asm-generic/platform_device.h>
diff --git a/arch/parisc/include/asm/platform_device.h b/arch/parisc/include/asm/platform_device.h
new file mode 100644
index 0000000..01452c3
--- /dev/null
+++ b/arch/parisc/include/asm/platform_device.h
@@ -0,0 +1 @@
+#include <asm-generic/platform_device.h>
diff --git a/arch/powerpc/include/asm/platform_device.h b/arch/powerpc/include/asm/platform_device.h
new file mode 100644
index 0000000..01452c3
--- /dev/null
+++ b/arch/powerpc/include/asm/platform_device.h
@@ -0,0 +1 @@
+#include <asm-generic/platform_device.h>
diff --git a/arch/s390/include/asm/platform_device.h b/arch/s390/include/asm/platform_device.h
new file mode 100644
index 0000000..01452c3
--- /dev/null
+++ b/arch/s390/include/asm/platform_device.h
@@ -0,0 +1 @@
+#include <asm-generic/platform_device.h>
diff --git a/arch/score/include/asm/platform_device.h b/arch/score/include/asm/platform_device.h
new file mode 100644
index 0000000..01452c3
--- /dev/null
+++ b/arch/score/include/asm/platform_device.h
@@ -0,0 +1 @@
+#include <asm-generic/platform_device.h>
diff --git a/arch/sh/include/asm/platform_device.h b/arch/sh/include/asm/platform_device.h
new file mode 100644
index 0000000..01452c3
--- /dev/null
+++ b/arch/sh/include/asm/platform_device.h
@@ -0,0 +1 @@
+#include <asm-generic/platform_device.h>
diff --git a/arch/sparc/include/asm/platform_device.h b/arch/sparc/include/asm/platform_device.h
new file mode 100644
index 0000000..01452c3
--- /dev/null
+++ b/arch/sparc/include/asm/platform_device.h
@@ -0,0 +1 @@
+#include <asm-generic/platform_device.h>
diff --git a/arch/tile/include/asm/platform_device.h b/arch/tile/include/asm/platform_device.h
new file mode 100644
index 0000000..01452c3
--- /dev/null
+++ b/arch/tile/include/asm/platform_device.h
@@ -0,0 +1 @@
+#include <asm-generic/platform_device.h>
diff --git a/arch/unicore32/include/asm/platform_device.h b/arch/unicore32/include/asm/platform_device.h
new file mode 100644
index 0000000..01452c3
--- /dev/null
+++ b/arch/unicore32/include/asm/platform_device.h
@@ -0,0 +1 @@
+#include <asm-generic/platform_device.h>
diff --git a/arch/x86/include/asm/platform_device.h b/arch/x86/include/asm/platform_device.h
new file mode 100644
index 0000000..01452c3
--- /dev/null
+++ b/arch/x86/include/asm/platform_device.h
@@ -0,0 +1 @@
+#include <asm-generic/platform_device.h>
diff --git a/arch/xtensa/include/asm/platform_device.h b/arch/xtensa/include/asm/platform_device.h
new file mode 100644
index 0000000..01452c3
--- /dev/null
+++ b/arch/xtensa/include/asm/platform_device.h
@@ -0,0 +1 @@
+#include <asm-generic/platform_device.h>
diff --git a/drivers/base/platform.c b/drivers/base/platform.c
index 1c291af..c25e0c0 100644
--- a/drivers/base/platform.c
+++ b/drivers/base/platform.c
@@ -20,6 +20,7 @@
#include <linux/err.h>
#include <linux/slab.h>
#include <linux/pm_runtime.h>
+#include <asm/platform_device.h>
#include "base.h"
@@ -173,6 +174,7 @@ struct platform_device *platform_device_alloc(const char *name, int id)
pa->pdev.id = id;
device_initialize(&pa->pdev.dev);
pa->pdev.dev.release = platform_device_release;
+ arch_setup_pdev_archdata(&pa->pdev);
}
return pa ? &pa->pdev : NULL;
diff --git a/include/asm-generic/platform_device.h b/include/asm-generic/platform_device.h
new file mode 100644
index 0000000..c543add
--- /dev/null
+++ b/include/asm-generic/platform_device.h
@@ -0,0 +1,30 @@
+/*
+ * include/asm-generic/platform_device.h
+ *
+ * Provides a callout when we allocate a platform device to architecture code
+ * to update archdata.
+ *
+ * Copyright 2011 Freescale Semiconductor, Inc.
+ *
+ * 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, or (at your option)
+ * any later version.
+ *
+ * You should have received a copy of the GNU General Public License
+ * (for example /usr/src/linux/COPYING); if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#ifndef __ASM_GENERIC_PLATFORM_DEVICE_H_
+#define __ASM_GENERIC_PLATFORM_DEVICE_H_
+
+struct platform_device;
+
+/*
+ * an architecture can override to define arch_setup_pdev_archdata
+ */
+#ifndef arch_setup_pdev_archdata
+static inline void arch_setup_pdev_archdata(struct platform_device *pdev) { }
+#endif
+
+#endif /* __ASM_GENERIC_PLATFORM_DEVICE_H_ */
--
1.7.3.4
^ permalink raw reply related
* Re: putting aliases in .dtsi?
From: Grant Likely @ 2011-06-22 14:57 UTC (permalink / raw)
To: Kumar Gala; +Cc: devicetree-discuss, linuxppc-dev@lists.ozlabs.org Development
In-Reply-To: <34DB38F9-5BF7-4BDD-B571-7D27B2E3FFB7@kernel.crashing.org>
On Wed, Jun 22, 2011 at 5:56 AM, Kumar Gala <galak@kernel.crashing.org> wrote:
> Grant
>
> Any reason you haven't put in aliases into the .dtsi as well?
No. Either just haven't needed it, or I didn't think about it.
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
^ permalink raw reply
* Re: [PATCH] powerpc/85xx: disable timebase synchronization under the hypervisor
From: Timur Tabi @ 2011-06-22 14:55 UTC (permalink / raw)
To: Kumar Gala
Cc: Wood Scott-B07421, linuxppc-dev@ozlabs.org, paulus@samba.org,
McClintock Matthew-B29882, Gala Kumar-B11780
In-Reply-To: <083792FF-81CD-407C-B6B8-6D0481A0D65D@kernel.crashing.org>
Kumar Gala wrote:
>> >
>> > Well, not exactly. Paul wants to break that up since we're adding some
>> > primitive support for 201 HV mode too (for 970's). Last we discussed,
>> > the plan was to go for a generic HV mode bit and a separate bit for the
>> > version.
>> >
>> > Cheers,
>> > Ben.
> Any ETA on Paul's intro of the FTR bit? If not I'll pull this into my 'next' tree and we can clean up later.
Just FYI, this particular patch is because of a limitation in the Freescale
hypervisor. It's not because we're running in guest mode. If the hypervisor
provided full emulation of the timebase register, then we wouldn't need this
patch. The same can be said of KVM or any other hypervisor.
So a generic HV mode bit is not going to help me, unless there's also a bit
that's specific to our hypervisor. And even then, we would need some way to
differentiate among different versions of our hypervisor, in case some future
version adds timebase support. We currently use the device tree for all this,
so I'm not sure what a FTR bit will gain us.
--
Timur Tabi
Linux kernel developer at Freescale
^ permalink raw reply
* Re: [PATCH 1/3] driver core: Add ability for arch code to setup pdev_archdata
From: Mike Frysinger @ 2011-06-22 14:37 UTC (permalink / raw)
To: Kumar Gala; +Cc: Greg KH, linux-kernel, linuxppc-dev
In-Reply-To: <1308744176-24491-1-git-send-email-galak@kernel.crashing.org>
On Wed, Jun 22, 2011 at 08:02, Kumar Gala wrote:
> --- /dev/null
> +++ b/include/asm-generic/platform_device.h
> @@ -0,0 +1,11 @@
missing header blob with explanation/copyright/license
> +/*
> + * an architecture can override to define arch_setup_pdev_archdata
> + */
> +#ifndef arch_setup_pdev_archdata
> +static inline void arch_setup_pdev_archdata(struct platform_device *pdev) { }
> +#endif
missing explanation of what the func actually does, and this header
lacks a forward struct decl for platform_device
-mike
^ permalink raw reply
* Re: Mapping an executable page
From: Thomas De Schampheleire @ 2011-06-22 12:53 UTC (permalink / raw)
To: Tabi Timur-B04825; +Cc: linuxppc-dev
In-Reply-To: <4E01D4AB.3010505@freescale.com>
On Wed, Jun 22, 2011 at 1:40 PM, Tabi Timur-B04825 <B04825@freescale.com> wrote:
> Thomas De Schampheleire wrote:
>> I think I can make it more reliable by dummy reading the pages*after*
>> I disabled interrupts on that processor, immediately before jumping to
>> the boot code. Is that correct?
>
> That sounds logical to me.
>
> BTW, since you're already doing something non-standard with your module, why
> don't you just make settlbcam exported?
It's not because I need to do something non-standard that I like to
disregard any rule, convention, or good practice :-)
I prefer to follow the kernel 'rules' and practices as closely as
possible, primarily by not messing with the kernel at all.
Unfortunately, in this case, there does not seem to be another way.
Exporting settlbcam causes me to make kernel changes (not module
changes). Then, if I want to update to a newer kernel version, I have
to re-apply the change.
By using a kernel module in a 'standard' way, I limit the number of
upgrade issues.
Best regards,
Thomas
^ permalink raw reply
* Re: [PATCH] hwrng: ppc4xx - add support for ppc4xx TRNG
From: Herbert Xu @ 2011-06-22 11:58 UTC (permalink / raw)
To: Josh Boyer; +Cc: linuxppc-dev, Matt Mackall
In-Reply-To: <20110622111439.GC2414@zod.rchland.ibm.com>
On Wed, Jun 22, 2011 at 07:14:39AM -0400, Josh Boyer wrote:
> On Tue, Jun 21, 2011 at 10:56:02AM -0500, Matt Mackall wrote:
> >On Tue, 2011-06-21 at 08:19 -0400, Josh Boyer wrote:
> >> Various PowerPC 4xx SoCs contain a TRNG embedded in the Security function.
> >> This adds a device driver for that TRNG.
> >>
> >> Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
> >
> >Looks good.
> >
> >Acked-by: Matt Mackall <mpm@selenic.com>
>
> Thanks! Whose tree should this go through? If it doesn't matter, I can
> put it in mine for the next merge window. If they go through the crypto
> tree, that's fine too.
I'll take it. Thanks.
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply
* [PATCH 3/3] powerpc: Dont require a dma_ops struct to set dma mask
From: Kumar Gala @ 2011-06-22 12:02 UTC (permalink / raw)
To: Greg KH; +Cc: linuxppc-dev, linux-kernel
In-Reply-To: <1308744176-24491-2-git-send-email-galak@kernel.crashing.org>
The only reason to require a dma_ops struct is to see if it has
implemented set_dma_mask. If not we can fall back to setting the mask
directly.
This resolves an issue with how to sequence the setting of a DMA mask
for platform devices. Before we had an issue in that we have no way of
setting the DMA mask before the various low level bus notifiers get
called that might check it (swiotlb).
So now we can do:
pdev = platform_device_alloc("foobar", 0);
dma_set_mask(&pdev->dev, DMA_BIT_MASK(37));
platform_device_register(pdev);
And expect the right thing to happen with the bus notifiers get called
via platform_device_register.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---
arch/powerpc/kernel/dma.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/arch/powerpc/kernel/dma.c b/arch/powerpc/kernel/dma.c
index d238c08..4f0959f 100644
--- a/arch/powerpc/kernel/dma.c
+++ b/arch/powerpc/kernel/dma.c
@@ -161,9 +161,7 @@ int dma_set_mask(struct device *dev, u64 dma_mask)
if (ppc_md.dma_set_mask)
return ppc_md.dma_set_mask(dev, dma_mask);
- if (unlikely(dma_ops == NULL))
- return -EIO;
- if (dma_ops->set_dma_mask != NULL)
+ if ((dma_ops != NULL) && (dma_ops->set_dma_mask != NULL))
return dma_ops->set_dma_mask(dev, dma_mask);
if (!dev->dma_mask || !dma_supported(dev, dma_mask))
return -EIO;
--
1.7.3.4
^ permalink raw reply related
* [PATCH 2/3] powerpc: implement arch_setup_pdev_archdata
From: Kumar Gala @ 2011-06-22 12:02 UTC (permalink / raw)
To: Greg KH; +Cc: linuxppc-dev, linux-kernel
In-Reply-To: <1308744176-24491-1-git-send-email-galak@kernel.crashing.org>
We have a long standing issues with platform devices not have a valid
dma_mask pointer. This hasn't been an issue to date as no platform
device has tried to set its dma_mask value to a non-default value.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---
arch/powerpc/include/asm/platform_device.h | 17 ++++++++++++++++-
arch/powerpc/kernel/setup-common.c | 27 ---------------------------
drivers/of/platform.c | 5 +++--
3 files changed, 19 insertions(+), 30 deletions(-)
diff --git a/arch/powerpc/include/asm/platform_device.h b/arch/powerpc/include/asm/platform_device.h
index 01452c3..137b183 100644
--- a/arch/powerpc/include/asm/platform_device.h
+++ b/arch/powerpc/include/asm/platform_device.h
@@ -1 +1,16 @@
-#include <asm-generic/platform_device.h>
+#ifndef __ASM_PLATFORM_DEVICE_H_
+#define __ASM_PLATFORM_DEVICE_H_
+
+#include <linux/platform_device.h>
+#include <asm/dma-mapping.h>
+
+#define ARCH_HAS_PDEV_ARCHDATA_SETUP
+
+static inline void arch_setup_pdev_archdata(struct platform_device *pdev)
+{
+ pdev->archdata.dma_mask = DMA_BIT_MASK(32);
+ pdev->dev.dma_mask = &pdev->archdata.dma_mask;
+ set_dma_ops(&pdev->dev, &dma_direct_ops);
+}
+
+#endif /* __ASM_GENERIC_PLATFORM_DEVICE_H_ */
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
index 79fca26..eb5229e 100644
--- a/arch/powerpc/kernel/setup-common.c
+++ b/arch/powerpc/kernel/setup-common.c
@@ -703,30 +703,3 @@ static int powerpc_debugfs_init(void)
}
arch_initcall(powerpc_debugfs_init);
#endif
-
-static int ppc_dflt_bus_notify(struct notifier_block *nb,
- unsigned long action, void *data)
-{
- struct device *dev = data;
-
- /* We are only intereted in device addition */
- if (action != BUS_NOTIFY_ADD_DEVICE)
- return 0;
-
- set_dma_ops(dev, &dma_direct_ops);
-
- return NOTIFY_DONE;
-}
-
-static struct notifier_block ppc_dflt_plat_bus_notifier = {
- .notifier_call = ppc_dflt_bus_notify,
- .priority = INT_MAX,
-};
-
-static int __init setup_bus_notifier(void)
-{
- bus_register_notifier(&platform_bus_type, &ppc_dflt_plat_bus_notifier);
- return 0;
-}
-
-arch_initcall(setup_bus_notifier);
diff --git a/drivers/of/platform.c b/drivers/of/platform.c
index 63d3cb7..5ba8f48 100644
--- a/drivers/of/platform.c
+++ b/drivers/of/platform.c
@@ -21,6 +21,7 @@
#include <linux/of_irq.h>
#include <linux/of_platform.h>
#include <linux/platform_device.h>
+#include <asm/platform_device.h>
static int of_dev_node_match(struct device *dev, void *data)
{
@@ -153,7 +154,7 @@ struct platform_device *of_device_alloc(struct device_node *np,
}
dev->dev.of_node = of_node_get(np);
-#if defined(CONFIG_PPC) || defined(CONFIG_MICROBLAZE)
+#if defined(CONFIG_MICROBLAZE)
dev->dev.dma_mask = &dev->archdata.dma_mask;
#endif
dev->dev.parent = parent;
@@ -189,7 +190,7 @@ struct platform_device *of_platform_device_create(struct device_node *np,
if (!dev)
return NULL;
-#if defined(CONFIG_PPC) || defined(CONFIG_MICROBLAZE)
+#if defined(CONFIG_MICROBLAZE)
dev->archdata.dma_mask = 0xffffffffUL;
#endif
dev->dev.coherent_dma_mask = DMA_BIT_MASK(32);
--
1.7.3.4
^ permalink raw reply related
* [PATCH 1/3] driver core: Add ability for arch code to setup pdev_archdata
From: Kumar Gala @ 2011-06-22 12:02 UTC (permalink / raw)
To: Greg KH; +Cc: linuxppc-dev, linux-kernel
On some architectures we need to setup pdev_archdata before we add the
device. Waiting til a bus_notifier is too late since we might need the
pdev_archdata in the bus notifier. One example is setting up of dma_mask
pointers such that it can be used in a bus_notifier.
We add noop version of arch_setup_pdev_archdata() in
<asm-generic/platform_device.h> and allow the arch code to override with
access the full definitions of struct device, struct platform_device, and
struct pdev_archdata.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---
arch/alpha/include/asm/platform_device.h | 1 +
arch/arm/include/asm/platform_device.h | 1 +
arch/avr32/include/asm/platform_device.h | 1 +
arch/blackfin/include/asm/platform_device.h | 1 +
arch/cris/include/asm/platform_device.h | 1 +
arch/frv/include/asm/platform_device.h | 1 +
arch/h8300/include/asm/platform_device.h | 1 +
arch/ia64/include/asm/platform_device.h | 1 +
arch/m32r/include/asm/platform_device.h | 1 +
arch/m68k/include/asm/platform_device.h | 1 +
arch/microblaze/include/asm/platform_device.h | 1 +
arch/mips/include/asm/platform_device.h | 1 +
arch/mn10300/include/asm/platform_device.h | 1 +
arch/parisc/include/asm/platform_device.h | 1 +
arch/powerpc/include/asm/platform_device.h | 1 +
arch/s390/include/asm/platform_device.h | 1 +
arch/score/include/asm/platform_device.h | 1 +
arch/sh/include/asm/platform_device.h | 1 +
arch/sparc/include/asm/platform_device.h | 1 +
arch/tile/include/asm/platform_device.h | 1 +
arch/unicore32/include/asm/platform_device.h | 1 +
arch/x86/include/asm/platform_device.h | 1 +
arch/xtensa/include/asm/platform_device.h | 1 +
drivers/base/platform.c | 2 ++
include/asm-generic/platform_device.h | 11 +++++++++++
25 files changed, 36 insertions(+), 0 deletions(-)
create mode 100644 arch/alpha/include/asm/platform_device.h
create mode 100644 arch/arm/include/asm/platform_device.h
create mode 100644 arch/avr32/include/asm/platform_device.h
create mode 100644 arch/blackfin/include/asm/platform_device.h
create mode 100644 arch/cris/include/asm/platform_device.h
create mode 100644 arch/frv/include/asm/platform_device.h
create mode 100644 arch/h8300/include/asm/platform_device.h
create mode 100644 arch/ia64/include/asm/platform_device.h
create mode 100644 arch/m32r/include/asm/platform_device.h
create mode 100644 arch/m68k/include/asm/platform_device.h
create mode 100644 arch/microblaze/include/asm/platform_device.h
create mode 100644 arch/mips/include/asm/platform_device.h
create mode 100644 arch/mn10300/include/asm/platform_device.h
create mode 100644 arch/parisc/include/asm/platform_device.h
create mode 100644 arch/powerpc/include/asm/platform_device.h
create mode 100644 arch/s390/include/asm/platform_device.h
create mode 100644 arch/score/include/asm/platform_device.h
create mode 100644 arch/sh/include/asm/platform_device.h
create mode 100644 arch/sparc/include/asm/platform_device.h
create mode 100644 arch/tile/include/asm/platform_device.h
create mode 100644 arch/unicore32/include/asm/platform_device.h
create mode 100644 arch/x86/include/asm/platform_device.h
create mode 100644 arch/xtensa/include/asm/platform_device.h
create mode 100644 include/asm-generic/platform_device.h
diff --git a/arch/alpha/include/asm/platform_device.h b/arch/alpha/include/asm/platform_device.h
new file mode 100644
index 0000000..01452c3
--- /dev/null
+++ b/arch/alpha/include/asm/platform_device.h
@@ -0,0 +1 @@
+#include <asm-generic/platform_device.h>
diff --git a/arch/arm/include/asm/platform_device.h b/arch/arm/include/asm/platform_device.h
new file mode 100644
index 0000000..01452c3
--- /dev/null
+++ b/arch/arm/include/asm/platform_device.h
@@ -0,0 +1 @@
+#include <asm-generic/platform_device.h>
diff --git a/arch/avr32/include/asm/platform_device.h b/arch/avr32/include/asm/platform_device.h
new file mode 100644
index 0000000..01452c3
--- /dev/null
+++ b/arch/avr32/include/asm/platform_device.h
@@ -0,0 +1 @@
+#include <asm-generic/platform_device.h>
diff --git a/arch/blackfin/include/asm/platform_device.h b/arch/blackfin/include/asm/platform_device.h
new file mode 100644
index 0000000..01452c3
--- /dev/null
+++ b/arch/blackfin/include/asm/platform_device.h
@@ -0,0 +1 @@
+#include <asm-generic/platform_device.h>
diff --git a/arch/cris/include/asm/platform_device.h b/arch/cris/include/asm/platform_device.h
new file mode 100644
index 0000000..01452c3
--- /dev/null
+++ b/arch/cris/include/asm/platform_device.h
@@ -0,0 +1 @@
+#include <asm-generic/platform_device.h>
diff --git a/arch/frv/include/asm/platform_device.h b/arch/frv/include/asm/platform_device.h
new file mode 100644
index 0000000..01452c3
--- /dev/null
+++ b/arch/frv/include/asm/platform_device.h
@@ -0,0 +1 @@
+#include <asm-generic/platform_device.h>
diff --git a/arch/h8300/include/asm/platform_device.h b/arch/h8300/include/asm/platform_device.h
new file mode 100644
index 0000000..01452c3
--- /dev/null
+++ b/arch/h8300/include/asm/platform_device.h
@@ -0,0 +1 @@
+#include <asm-generic/platform_device.h>
diff --git a/arch/ia64/include/asm/platform_device.h b/arch/ia64/include/asm/platform_device.h
new file mode 100644
index 0000000..01452c3
--- /dev/null
+++ b/arch/ia64/include/asm/platform_device.h
@@ -0,0 +1 @@
+#include <asm-generic/platform_device.h>
diff --git a/arch/m32r/include/asm/platform_device.h b/arch/m32r/include/asm/platform_device.h
new file mode 100644
index 0000000..01452c3
--- /dev/null
+++ b/arch/m32r/include/asm/platform_device.h
@@ -0,0 +1 @@
+#include <asm-generic/platform_device.h>
diff --git a/arch/m68k/include/asm/platform_device.h b/arch/m68k/include/asm/platform_device.h
new file mode 100644
index 0000000..01452c3
--- /dev/null
+++ b/arch/m68k/include/asm/platform_device.h
@@ -0,0 +1 @@
+#include <asm-generic/platform_device.h>
diff --git a/arch/microblaze/include/asm/platform_device.h b/arch/microblaze/include/asm/platform_device.h
new file mode 100644
index 0000000..01452c3
--- /dev/null
+++ b/arch/microblaze/include/asm/platform_device.h
@@ -0,0 +1 @@
+#include <asm-generic/platform_device.h>
diff --git a/arch/mips/include/asm/platform_device.h b/arch/mips/include/asm/platform_device.h
new file mode 100644
index 0000000..01452c3
--- /dev/null
+++ b/arch/mips/include/asm/platform_device.h
@@ -0,0 +1 @@
+#include <asm-generic/platform_device.h>
diff --git a/arch/mn10300/include/asm/platform_device.h b/arch/mn10300/include/asm/platform_device.h
new file mode 100644
index 0000000..01452c3
--- /dev/null
+++ b/arch/mn10300/include/asm/platform_device.h
@@ -0,0 +1 @@
+#include <asm-generic/platform_device.h>
diff --git a/arch/parisc/include/asm/platform_device.h b/arch/parisc/include/asm/platform_device.h
new file mode 100644
index 0000000..01452c3
--- /dev/null
+++ b/arch/parisc/include/asm/platform_device.h
@@ -0,0 +1 @@
+#include <asm-generic/platform_device.h>
diff --git a/arch/powerpc/include/asm/platform_device.h b/arch/powerpc/include/asm/platform_device.h
new file mode 100644
index 0000000..01452c3
--- /dev/null
+++ b/arch/powerpc/include/asm/platform_device.h
@@ -0,0 +1 @@
+#include <asm-generic/platform_device.h>
diff --git a/arch/s390/include/asm/platform_device.h b/arch/s390/include/asm/platform_device.h
new file mode 100644
index 0000000..01452c3
--- /dev/null
+++ b/arch/s390/include/asm/platform_device.h
@@ -0,0 +1 @@
+#include <asm-generic/platform_device.h>
diff --git a/arch/score/include/asm/platform_device.h b/arch/score/include/asm/platform_device.h
new file mode 100644
index 0000000..01452c3
--- /dev/null
+++ b/arch/score/include/asm/platform_device.h
@@ -0,0 +1 @@
+#include <asm-generic/platform_device.h>
diff --git a/arch/sh/include/asm/platform_device.h b/arch/sh/include/asm/platform_device.h
new file mode 100644
index 0000000..01452c3
--- /dev/null
+++ b/arch/sh/include/asm/platform_device.h
@@ -0,0 +1 @@
+#include <asm-generic/platform_device.h>
diff --git a/arch/sparc/include/asm/platform_device.h b/arch/sparc/include/asm/platform_device.h
new file mode 100644
index 0000000..01452c3
--- /dev/null
+++ b/arch/sparc/include/asm/platform_device.h
@@ -0,0 +1 @@
+#include <asm-generic/platform_device.h>
diff --git a/arch/tile/include/asm/platform_device.h b/arch/tile/include/asm/platform_device.h
new file mode 100644
index 0000000..01452c3
--- /dev/null
+++ b/arch/tile/include/asm/platform_device.h
@@ -0,0 +1 @@
+#include <asm-generic/platform_device.h>
diff --git a/arch/unicore32/include/asm/platform_device.h b/arch/unicore32/include/asm/platform_device.h
new file mode 100644
index 0000000..01452c3
--- /dev/null
+++ b/arch/unicore32/include/asm/platform_device.h
@@ -0,0 +1 @@
+#include <asm-generic/platform_device.h>
diff --git a/arch/x86/include/asm/platform_device.h b/arch/x86/include/asm/platform_device.h
new file mode 100644
index 0000000..01452c3
--- /dev/null
+++ b/arch/x86/include/asm/platform_device.h
@@ -0,0 +1 @@
+#include <asm-generic/platform_device.h>
diff --git a/arch/xtensa/include/asm/platform_device.h b/arch/xtensa/include/asm/platform_device.h
new file mode 100644
index 0000000..01452c3
--- /dev/null
+++ b/arch/xtensa/include/asm/platform_device.h
@@ -0,0 +1 @@
+#include <asm-generic/platform_device.h>
diff --git a/drivers/base/platform.c b/drivers/base/platform.c
index 1c291af..c25e0c0 100644
--- a/drivers/base/platform.c
+++ b/drivers/base/platform.c
@@ -20,6 +20,7 @@
#include <linux/err.h>
#include <linux/slab.h>
#include <linux/pm_runtime.h>
+#include <asm/platform_device.h>
#include "base.h"
@@ -173,6 +174,7 @@ struct platform_device *platform_device_alloc(const char *name, int id)
pa->pdev.id = id;
device_initialize(&pa->pdev.dev);
pa->pdev.dev.release = platform_device_release;
+ arch_setup_pdev_archdata(&pa->pdev);
}
return pa ? &pa->pdev : NULL;
diff --git a/include/asm-generic/platform_device.h b/include/asm-generic/platform_device.h
new file mode 100644
index 0000000..4a3f6a9
--- /dev/null
+++ b/include/asm-generic/platform_device.h
@@ -0,0 +1,11 @@
+#ifndef __ASM_GENERIC_PLATFORM_DEVICE_H_
+#define __ASM_GENERIC_PLATFORM_DEVICE_H_
+
+/*
+ * an architecture can override to define arch_setup_pdev_archdata
+ */
+#ifndef arch_setup_pdev_archdata
+static inline void arch_setup_pdev_archdata(struct platform_device *pdev) { }
+#endif
+
+#endif /* __ASM_GENERIC_PLATFORM_DEVICE_H_ */
--
1.7.3.4
^ permalink raw reply related
* putting aliases in .dtsi?
From: Kumar Gala @ 2011-06-22 11:56 UTC (permalink / raw)
To: Grant Likely
Cc: devicetree-discuss, linuxppc-dev@lists.ozlabs.org Development
Grant
Any reason you haven't put in aliases into the .dtsi as well?
- k
^ permalink raw reply
* Re: [PATCH] powerpc/85xx: disable timebase synchronization under the hypervisor
From: Kumar Gala @ 2011-06-22 11:44 UTC (permalink / raw)
To: Benjamin Herrenschmidt
Cc: Wood Scott-B07421, Tabi Timur-B04825, linuxppc-dev@ozlabs.org,
paulus@samba.org, McClintock Matthew-B29882, Gala Kumar-B11780
In-Reply-To: <1308105196.2635.16.camel@pasglop>
On Jun 14, 2011, at 9:33 PM, Benjamin Herrenschmidt wrote:
> On Wed, 2011-06-15 at 02:10 +0000, Tabi Timur-B04825 wrote:
>> Benjamin Herrenschmidt wrote:
>>> We might want to generically have a CPU feature bit indicating we =
are
>>> running in guest vs. HV mode. I know Paulus is planning to introduce =
one
>>> so you may want to sync with him.
>>=20
>> Are you talking about CPU_FTR_HVMODE_206?
>=20
> Well, not exactly. Paul wants to break that up since we're adding some
> primitive support for 201 HV mode too (for 970's). Last we discussed,
> the plan was to go for a generic HV mode bit and a separate bit for =
the
> version.
>=20
> Cheers,
> Ben.
Any ETA on Paul's intro of the FTR bit? If not I'll pull this into my =
'next' tree and we can clean up later.
- k
^ permalink raw reply
* Re: Mapping an executable page
From: Tabi Timur-B04825 @ 2011-06-22 11:40 UTC (permalink / raw)
To: Thomas De Schampheleire; +Cc: linuxppc-dev
In-Reply-To: <BANLkTikcn7ghNF7YW7LO+=Qs_4A=RHxJSQ@mail.gmail.com>
Thomas De Schampheleire wrote:
> I think I can make it more reliable by dummy reading the pages*after*
> I disabled interrupts on that processor, immediately before jumping to
> the boot code. Is that correct?
That sounds logical to me.
BTW, since you're already doing something non-standard with your module, wh=
y=20
don't you just make settlbcam exported?
--=20
Timur Tabi
Linux kernel developer at Freescale=
^ permalink raw reply
* Re: [PATCH 5/7] powerpc/85xx: add board support for the Freescale hypervisor
From: Kumar Gala @ 2011-06-22 11:42 UTC (permalink / raw)
To: Timur Tabi; +Cc: linux-kernel, akpm, linux-console, greg, linuxppc-dev
In-Reply-To: <1305813272-31826-6-git-send-email-timur@freescale.com>
On May 19, 2011, at 8:54 AM, Timur Tabi wrote:
> Add support for the ePAPR-compliant Freescale hypervisor (aka "Topaz") =
on the
> Freescale P3041DS, P4080DS, and P5020DS reference boards.
>=20
> Signed-off-by: Timur Tabi <timur@freescale.com>
> ---
> arch/powerpc/platforms/85xx/Kconfig | 3 +++
> arch/powerpc/platforms/85xx/corenet_ds.c | 7 +++++++
> arch/powerpc/platforms/85xx/p3041_ds.c | 16 +++++++++++++++-
> arch/powerpc/platforms/85xx/p4080_ds.c | 29 =
++++++++++++++++-------------
> arch/powerpc/platforms/85xx/p5020_ds.c | 16 +++++++++++++++-
> 5 files changed, 56 insertions(+), 15 deletions(-)
applied to next
- k=
^ permalink raw reply
* Re: [PATCH 4/7] powerpc: add Freescale hypervisor partition control functions
From: Kumar Gala @ 2011-06-22 11:41 UTC (permalink / raw)
To: Timur Tabi; +Cc: linux-kernel, akpm, linux-console, greg, linuxppc-dev
In-Reply-To: <1305813272-31826-5-git-send-email-timur@freescale.com>
On May 19, 2011, at 8:54 AM, Timur Tabi wrote:
> Add functions to restart and halt the current partition when running under
> the Freescale hypervisor. These functions should be assigned to various
> function pointers of the ppc_md structure during the .probe() function for
> the board:
>
> ppc_md.restart = fsl_hv_restart;
> ppc_md.power_off = fsl_hv_halt;
> ppc_md.halt = fsl_hv_halt;
>
> Signed-off-by: Timur Tabi <timur@freescale.com>
> ---
> arch/powerpc/sysdev/fsl_soc.c | 27 +++++++++++++++++++++++++++
> arch/powerpc/sysdev/fsl_soc.h | 3 +++
> 2 files changed, 30 insertions(+), 0 deletions(-)
applied to next
- k
^ permalink raw reply
* Re: [PATCH 3/7] powerpc: introduce the ePAPR embedded hypervisor vmpic driver
From: Kumar Gala @ 2011-06-22 11:41 UTC (permalink / raw)
To: Timur Tabi; +Cc: linux-kernel, akpm, linux-console, greg, linuxppc-dev
In-Reply-To: <1305813272-31826-4-git-send-email-timur@freescale.com>
On May 19, 2011, at 8:54 AM, Timur Tabi wrote:
> From: Ashish Kalra <ashish.kalra@freescale.com>
>=20
> The Freescale ePAPR reference hypervisor provides interrupt controller =
services
> via a hypercall interface, instead of emulating the MPIC controller. =
This is
> called the VMPIC.
>=20
> The ePAPR "virtual interrupt controller" provides interrupt controller =
services
> for external interrupts. External interrupts received by a partition =
can come
> from two sources:
>=20
> - Hardware interrupts - hardware interrupts come from external
> interrupt lines or on-chip I/O devices.
> - Virtual interrupts - virtual interrupts are generated by the =
hypervisor
> as part of some hypervisor service or hypervisor-created virtual =
device.
>=20
> Both types of interrupts are processed using the same programming =
model and
> same set of hypercalls.
>=20
> Signed-off-by: Ashish Kalra <ashish.kalra@freescale.com>
> Signed-off-by: Timur Tabi <timur@freescale.com>
> ---
> arch/powerpc/include/asm/ehv_pic.h | 40 +++++
> arch/powerpc/platforms/Kconfig | 4 +
> arch/powerpc/sysdev/Makefile | 1 +
> arch/powerpc/sysdev/ehv_pic.c | 302 =
++++++++++++++++++++++++++++++++++++
> 4 files changed, 347 insertions(+), 0 deletions(-)
> create mode 100644 arch/powerpc/include/asm/ehv_pic.h
> create mode 100644 arch/powerpc/sysdev/ehv_pic.c
applied to next
- k=
^ permalink raw reply
* Re: [PATCH 2/7] powerpc: introduce ePAPR embedded hypervisor hcall interface
From: Kumar Gala @ 2011-06-22 11:41 UTC (permalink / raw)
To: Timur Tabi; +Cc: linux-kernel, akpm, linux-console, greg, linuxppc-dev
In-Reply-To: <1305813272-31826-3-git-send-email-timur@freescale.com>
On May 19, 2011, at 8:54 AM, Timur Tabi wrote:
> ePAPR hypervisors provide operating system services via a "hypercall"
> interface. The following steps need to be performed to make an hcall:
>=20
> 1. Load r11 with the hcall number
> 2. Load specific other registers with parameters
> 3. Issue instrucion "sc 1"
> 4. The return code is in r3
> 5. Other returned parameters are in other registers.
>=20
> To provide this service to the kernel, these steps are wrapped in =
inline
> assembly functions. Standard ePAPR hcalls are in epapr_hcalls.h, and =
Freescale
> extensions are in fsl_hcalls.h.
>=20
> Signed-off-by: Timur Tabi <timur@freescale.com>
> ---
> arch/powerpc/include/asm/epapr_hcalls.h | 502 +++++++++++++++++++++++
> arch/powerpc/include/asm/fsl_hcalls.h | 655 =
+++++++++++++++++++++++++++++++
> 2 files changed, 1157 insertions(+), 0 deletions(-)
> create mode 100644 arch/powerpc/include/asm/epapr_hcalls.h
> create mode 100644 arch/powerpc/include/asm/fsl_hcalls.h
applied to next
- k=
^ permalink raw reply
* Re: [PATCH 1/7] powerpc: make irq_choose_cpu() available to all PIC drivers
From: Kumar Gala @ 2011-06-22 11:41 UTC (permalink / raw)
To: Timur Tabi; +Cc: linux-kernel, akpm, linux-console, greg, linuxppc-dev
In-Reply-To: <1305813272-31826-2-git-send-email-timur@freescale.com>
On May 19, 2011, at 8:54 AM, Timur Tabi wrote:
> From: Stuart Yoder <stuart.yoder@freescale.com>
>
> Move irq_choose_cpu() into arch/powerpc/kernel/irq.c so that it can be used
> by other PIC drivers. The function is not MPIC-specific.
>
> Signed-off-by: Stuart Yoder <stuart.yoder@freescale.com>
> Signed-off-by: Timur Tabi <timur@freescale.com>
> ---
> arch/powerpc/include/asm/irq.h | 2 ++
> arch/powerpc/kernel/irq.c | 35 +++++++++++++++++++++++++++++++++++
> arch/powerpc/sysdev/mpic.c | 36 ------------------------------------
> 3 files changed, 37 insertions(+), 36 deletions(-)
applied to next
- k
^ permalink raw reply
* Re: [PATCH] powerpc/85xx:DTS: Fix tbi node location for Px020RDB
From: Kumar Gala @ 2011-06-22 11:34 UTC (permalink / raw)
To: Prabhakar Kushwaha; +Cc: meet2prabhu, devicetree-discuss, linuxppc-dev
In-Reply-To: <1307501379-3160-1-git-send-email-prabhakar@freescale.com>
On Jun 7, 2011, at 9:49 PM, Prabhakar Kushwaha wrote:
> ten-bit interface (TBI) module is part of SoC not board.
>=20
> Move tbi entries from board related dts files to Si dts.
>=20
> Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
> ---
> Based upon =
http://git.kernel.org/pub/scm/linux/kernel/git/galak/powerpc.git (branch =
next)
>=20
> arch/powerpc/boot/dts/p1020rdb.dts | 9 ---------
> arch/powerpc/boot/dts/p1020rdb_camp_core0.dts | 8 --------
> arch/powerpc/boot/dts/p1020si.dtsi | 6 +++++-
> arch/powerpc/boot/dts/p2020rdb.dts | 8 --------
> arch/powerpc/boot/dts/p2020rdb_camp_core0.dts | 8 --------
> arch/powerpc/boot/dts/p2020si.dtsi | 6 +++++-
> 6 files changed, 10 insertions(+), 35 deletions(-)
>=20
> diff --git a/arch/powerpc/boot/dts/p1020rdb.dts =
b/arch/powerpc/boot/dts/p1020rdb.dts
> index d6a8ae4..a4e5d6c 100644
> --- a/arch/powerpc/boot/dts/p1020rdb.dts
> +++ b/arch/powerpc/boot/dts/p1020rdb.dts
> @@ -211,14 +211,6 @@
> };
> };
>=20
> - mdio@25000 {
> -
> - tbi0: tbi-phy@11 {
> - reg =3D <0x11>;
> - device_type =3D "tbi-phy";
> - };
> - };
> -
> enet0: ethernet@b0000 {
> fixed-link =3D <1 1 1000 0 0>;
> phy-connection-type =3D "rgmii-id";
> @@ -227,7 +219,6 @@
>=20
> enet1: ethernet@b1000 {
> phy-handle =3D <&phy0>;
> - tbi-handle =3D <&tbi0>;
> phy-connection-type =3D "sgmii";
>=20
> };
I'm not sure we should do this. The phy address we pick is board =
specific so it should NOT be in .dtsi
- k=
^ permalink raw reply
* Re: [PATCH] ppc/85xx: specify interrupt for pq3-localbus devices
From: Kumar Gala @ 2011-06-22 11:30 UTC (permalink / raw)
To: Dmitry Eremin-Solenikov; +Cc: linuxppc-dev, Paul Mackerras
In-Reply-To: <1306941318-5771-1-git-send-email-dbaryshkov@gmail.com>
On Jun 1, 2011, at 10:15 AM, Dmitry Eremin-Solenikov wrote:
> fsl-lbc driver requires an interrupt to bind to localbus device.
> Populate 85xx boards' dts trees with lbc interrupt info.
>
> Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
> ---
> arch/powerpc/boot/dts/mpc8568mds.dts | 2 ++
> arch/powerpc/boot/dts/socrates.dts | 2 ++
> arch/powerpc/boot/dts/tqm8540.dts | 2 ++
> arch/powerpc/boot/dts/tqm8548-bigflash.dts | 2 ++
> arch/powerpc/boot/dts/tqm8548.dts | 2 ++
> arch/powerpc/boot/dts/tqm8560.dts | 2 ++
> arch/powerpc/boot/dts/xpedite5200.dts | 2 ++
> arch/powerpc/boot/dts/xpedite5200_xmon.dts | 2 ++
> 8 files changed, 16 insertions(+), 0 deletions(-)
applied to next
- k
^ 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