LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* 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

* Re: powerpc/p1022ds: add missing iounmap calls to platform file
From: Kumar Gala @ 2011-06-22 11:30 UTC (permalink / raw)
  To: Timur Tabi; +Cc: linuxppc-dev
In-Reply-To: <1307563317-13009-1-git-send-email-timur@freescale.com>


On Jun 8, 2011, at 3:01 PM, Timur Tabi wrote:

> The platform file for the Freecale P1022DS reference board is not freeing
> the ioremap() mapping of the PIXIS and global utilities nodes it creates.
> 
> Signed-off-by: Timur Tabi <timur@freescale.com>
> ---
> arch/powerpc/platforms/85xx/p1022_ds.c |   11 ++++++++---
> 1 files changed, 8 insertions(+), 3 deletions(-)

applied to next

- k

^ permalink raw reply

* Re: [PATCH] tqm8540: add description for onboard flash
From: Kumar Gala @ 2011-06-22 11:29 UTC (permalink / raw)
  To: Dmitry Eremin-Solenikov; +Cc: Paul Mackerras, linuxppc-dev
In-Reply-To: <1308028947-8738-1-git-send-email-dbaryshkov@gmail.com>


On Jun 14, 2011, at 12:22 AM, Dmitry Eremin-Solenikov wrote:

> Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
> ---
> arch/powerpc/boot/dts/tqm8540.dts |   40 =
+++++++++++++++++++++++++++++++++++++
> 1 files changed, 40 insertions(+), 0 deletions(-)

applied to next

- k=

^ permalink raw reply

* Re: [PATCH] MAINTAINERS: add arch/powerpc/platforms/85xx/ to the 85xx entry
From: Kumar Gala @ 2011-06-22 11:29 UTC (permalink / raw)
  To: Baruch Siach; +Cc: linuxppc-dev
In-Reply-To: <f05e0f3cb5925c980c1f3b764a2e70d999419937.1308545941.git.baruch@tkos.co.il>


On Jun 20, 2011, at 12:00 AM, Baruch Siach wrote:

> Cc: Kumar Gala <galak@kernel.crashing.org>
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> ---
> MAINTAINERS |    1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)

applied to next

- k

^ permalink raw reply

* Re: [PATCH] [v2] powerpc/p1022ds: fix audio-related properties in the device tree
From: Kumar Gala @ 2011-06-22 11:28 UTC (permalink / raw)
  To: Timur Tabi; +Cc: linuxppc-dev
In-Reply-To: <1307559785-11007-1-git-send-email-timur@freescale.com>


On Jun 8, 2011, at 2:03 PM, Timur Tabi wrote:

> On the Freescale P1022DS reference board, the SSI audio controller is
> connected in "asynchronous" mode to the codec's clocks, so the device tree
> needs an "fsl,ssi-asynchronous" property.
> 
> Also remove the clock-frequency property from the wm8776 node, because
> the clock is enabled only if U-Boot enables it, and U-Boot will set the
> property if the clock is enabled.  A future version of the P1022DS audio
> driver will configure the clock itself, but for now, the driver should
> not be told that the clock is running when it isn't.
> 
> Also fix the FIFO depth to 15, instead of 16.
> 
> Signed-off-by: Timur Tabi <timur@freescale.com>
> ---
> arch/powerpc/boot/dts/p1022ds.dts |    9 ++++++---
> 1 files changed, 6 insertions(+), 3 deletions(-)

applied to merge

- k

^ permalink raw reply

* Re: [PATCH] powerpc/e500: fix breakage with fsl_rio_mcheck_exception
From: Kumar Gala @ 2011-06-22 11:28 UTC (permalink / raw)
  To: Scott Wood; +Cc: linuxppc-dev
In-Reply-To: <20110616190916.GA31367@schlenkerla.am.freescale.net>


On Jun 16, 2011, at 2:09 PM, Scott Wood wrote:

> The wrong MCSR bit was being used on e500mc.  MCSR_BUS_RBERR only exists
> on e500v1/v2.  Use MCSR_LD on e500mc, and remove all MCSR checking
> in fsl_rio_mcheck_exception as we now no longer call that function
> if the appropriate bit in MCSR is not set.
> 
> If RIO support was enabled at compile-time, but was never probed, just
> return from fsl_rio_mcheck_exception rather than dereference a NULL
> pointer.
> 
> TODO: There is still a remaining, though comparitively minor, issue in
> that this recovery mechanism will falsely engage if there's an unrelated
> MCSR_LD event at the same time as a RIO error.
> 
> Signed-off-by: Scott Wood <scottwood@freescale.com>
> ---
> arch/powerpc/kernel/traps.c   |    2 +-
> arch/powerpc/sysdev/fsl_rio.c |   33 +++++++++++++++++----------------
> 2 files changed, 18 insertions(+), 17 deletions(-)

applied to merge

- k

^ permalink raw reply

* Re: [PATCH] hwrng: ppc4xx - add support for ppc4xx TRNG
From: Josh Boyer @ 2011-06-22 11:14 UTC (permalink / raw)
  To: Matt Mackall; +Cc: linuxppc-dev, Herbert Xu
In-Reply-To: <1308671762.4954.0.camel@calx>

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.

josh

^ permalink raw reply

* Re: [PATCH] powerpc/85xx: fix NAND_CMD_READID read bytes number
From: Kumar Gala @ 2011-06-22 11:08 UTC (permalink / raw)
  To: Shaohui Xie; +Cc: scottwood, linux-mtd, linuxppc-dev
In-Reply-To: <1307931792-30386-1-git-send-email-Shaohui.Xie@freescale.com>


On Jun 12, 2011, at 9:23 PM, Shaohui Xie wrote:

> when nand_get_flash_type() is called, it will read 8 bytes of ID =
instead of 5,
> but the driver only read 5 bytes, so kernel will dump error messages =
like:
>=20
> fsl-lbc ffe124000.localbus: read_byte beyond end of buffer
> fsl-lbc ffe124000.localbus: read_byte beyond end of buffer
> fsl-lbc ffe124000.localbus: read_byte beyond end of buffer
>=20
> Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
> Acked-by: Scott Wood <scottwood@freescale.com>
> ---
> drivers/mtd/nand/fsl_elbc_nand.c |    6 +++---
> 1 files changed, 3 insertions(+), 3 deletions(-)

applied to merge

- k=

^ permalink raw reply

* RE: [PATCH] fsl-diu-fb: remove the ioctl interface
From: Jenkins, Clive @ 2011-06-22 10:39 UTC (permalink / raw)
  To: Anatolij Gustschin, Timur Tabi; +Cc: linuxppc-dev, linux-fbdev, lethal, yorksun
In-Reply-To: <20110622003853.1041385c@wker>

> > The ioctl interface in the Freescale DIU framebuffer driver is just
a
> > collection of miscellaneous functions which were only used in a
one-time
> > demo application that was never distributed.  Plus, the ioctls were
spread
> > across two types (both conflicting), and the demo app didn't even
use all
> > of them.
> >=20
> > Removing the ioctl interface also allows us to clean up the header
file and
> > remove other unusued stuff.
>=20
> No! We are using ioctl interface of this driver in many video
> rendering applications on overlay planes on huge number of boards.
> So, please don't remove it.
>=20
> Anatolij

Can you make available your application code by posting a link to it?

Thanks,
Clive

^ permalink raw reply

* [PATCH v2 2/4] powerpc, mpc52xx: add a4m072 board support
From: Heiko Schocher @ 2011-06-22 10:39 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Heiko Schocher, Wolfgang Denk, devicetree-discuss
In-Reply-To: <1308729311-15375-3-git-send-email-hs@denx.de>

Signed-off-by: Heiko Schocher <hs@denx.de>
cc: Grant Likely <grant.likely@secretlab.ca>
cc: devicetree-discuss@ozlabs.org
cc: Wolfgang Denk <wd@denx.de>
cc: Wolfram Sang <w.sang@pengutronix.de>
---
For this patchseries following patch is needed:

http://patchwork.ozlabs.org/patch/91919/

Grant? Do you have some comments on that patch?

changes for v2:
  add comment from Wolfram Sang:
  use mpc5200.dtsi

 arch/powerpc/boot/dts/a4m072.dts             |  172 ++++++++++++++++++++++++++
 arch/powerpc/platforms/52xx/mpc5200_simple.c |    1 +
 2 files changed, 173 insertions(+), 0 deletions(-)
 create mode 100644 arch/powerpc/boot/dts/a4m072.dts

diff --git a/arch/powerpc/boot/dts/a4m072.dts b/arch/powerpc/boot/dts/a4m072.dts
new file mode 100644
index 0000000..adb6746
--- /dev/null
+++ b/arch/powerpc/boot/dts/a4m072.dts
@@ -0,0 +1,172 @@
+/*
+ * a4m072 board Device Tree Source
+ *
+ * Copyright (C) 2011 DENX Software Engineering GmbH
+ * Heiko Schocher <hs@denx.de>
+ *
+ * Copyright (C) 2007 Semihalf
+ * Marian Balakowicz <m8@semihalf.com>
+ *
+ * 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/ "mpc5200b.dtsi"
+
+/ {
+	model = "anonymous,a4m072";
+	compatible = "anonymous,a4m072";
+
+	soc5200@f0000000 {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		compatible = "fsl,mpc5200b-immr";
+		ranges = <0 0xf0000000 0x0000c000>;
+		reg = <0xf0000000 0x00000100>;
+		bus-frequency = <0>; /* From boot loader */
+		system-frequency = <0>; /* From boot loader */
+
+		cdm@200 {
+			fsl,ext_48mhz_en = <0x0>;
+			fsl,fd_enable = <0x01>;
+			fsl,fd_counters = <0xbbbb>;
+		};
+
+		timer@600 {
+			compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
+			reg = <0x600 0x80>;
+			interrupts = <1 9 0>;
+			fsl,has-wdt;
+		};
+
+		gpt3: timer@630 { /* General Purpose Timer in GPIO mode */
+			compatible = "fsl,mpc5200b-gpt-gpio","fsl,mpc5200-gpt-gpio";
+			gpio-controller;
+			#gpio-cells = <2>;
+		};
+
+		gpt4: timer@640 { /* General Purpose Timer in GPIO mode */
+			compatible = "fsl,mpc5200b-gpt-gpio","fsl,mpc5200-gpt-gpio";
+			gpio-controller;
+			#gpio-cells = <2>;
+		};
+
+		gpt5: timer@650 { /* General Purpose Timer in GPIO mode */
+			compatible = "fsl,mpc5200b-gpt-gpio","fsl,mpc5200-gpt-gpio";
+			gpio-controller;
+			#gpio-cells = <2>;
+		};
+
+		spi@f00 {
+			status = "disabled";
+		};
+
+		psc@2000 {
+			compatible = "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart";
+			reg = <0x2000 0x100>;
+			interrupts = <2 1 0>;
+		};
+
+		psc@2200 {
+			compatible = "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart";
+			reg = <0x2200 0x100>;
+			interrupts = <2 2 0>;
+		};
+
+		psc@2400 {
+			compatible = "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart";
+			reg = <0x2400 0x100>;
+			interrupts = <2 3 0>;
+		};
+
+		psc@2600 {
+			status = "disabled";
+		};
+
+		psc@2800 {
+			status = "disabled";
+		};
+
+		psc@2c00 {
+			compatible = "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart";
+			reg = <0x2c00 0x100>;
+			interrupts = <2 4 0>;
+		};
+
+		ethernet@3000 {
+			phy-handle = <&phy0>;
+		};
+
+		mdio@3000 {
+			phy0: ethernet-phy@1f {
+				reg = <0x1f>;
+				interrupts = <1 2 0>; /* IRQ 2 active low */
+			};
+		};
+
+		i2c@3d00 {
+			status = "disabled";
+		};
+
+		i2c@3d40 {
+			 hwmon@2e {
+				compatible = "nsc,lm87";
+				reg = <0x2e>;
+			};
+			 rtc@51 {
+				compatible = "nxp,rtc8564";
+				reg = <0x51>;
+			};
+		};
+	};
+
+	localbus {
+		compatible = "fsl,mpc5200b-lpb","simple-bus";
+		#address-cells = <2>;
+		#size-cells = <1>;
+		ranges = <0 0 0xfe000000 0x02000000
+			  1 0 0x62000000 0x00400000
+			  2 0 0x64000000 0x00200000
+			  3 0 0x66000000 0x01000000
+			  6 0 0x68000000 0x01000000
+			  7 0 0x6a000000 0x00000004
+			 >;
+
+		flash@0,0 {
+			compatible = "cfi-flash";
+			reg = <0 0 0x02000000>;
+			bank-width = <2>;
+			#size-cells = <1>;
+			#address-cells = <1>;
+		};
+		sram0@1,0 {
+			compatible = "mtd-ram";
+			reg = <1 0x00000 0x00400000>;
+			bank-width = <2>;
+		};
+	};
+
+	pci@f0000d00 {
+		#interrupt-cells = <1>;
+		#size-cells = <2>;
+		#address-cells = <3>;
+		device_type = "pci";
+		compatible = "fsl,mpc5200-pci";
+		reg = <0xf0000d00 0x100>;
+		interrupt-map-mask = <0xf800 0 0 7>;
+		interrupt-map = <
+				 /* IDSEL 0x16 */
+				 0xc000 0 0 1 &mpc5200_pic 1 3 3
+				 0xc000 0 0 2 &mpc5200_pic 1 3 3
+				 0xc000 0 0 3 &mpc5200_pic 1 3 3
+				 0xc000 0 0 4 &mpc5200_pic 1 3 3>;
+		clock-frequency = <0>; /* From boot loader */
+		interrupts = <2 8 0 2 9 0 2 10 0>;
+		bus-range = <0 0>;
+		ranges = <0x42000000 0 0x80000000 0x80000000 0 0x10000000
+			  0x02000000 0 0x90000000 0x90000000 0 0x10000000
+			  0x01000000 0 0x00000000 0xa0000000 0 0x01000000>;
+	};
+};
diff --git a/arch/powerpc/platforms/52xx/mpc5200_simple.c b/arch/powerpc/platforms/52xx/mpc5200_simple.c
index e36d6e2..192b4ff 100644
--- a/arch/powerpc/platforms/52xx/mpc5200_simple.c
+++ b/arch/powerpc/platforms/52xx/mpc5200_simple.c
@@ -50,6 +50,7 @@ static void __init mpc5200_simple_setup_arch(void)
 
 /* list of the supported boards */
 static const char *board[] __initdata = {
+	"anonymous,a4m072",
 	"intercontrol,digsy-mtc",
 	"manroland,mucmc52",
 	"manroland,uc101",
-- 
1.7.5.4

^ permalink raw reply related

* Re: GPIO MPC8315 board
From: Martyn Welch @ 2011-06-22  9:37 UTC (permalink / raw)
  To: linuxppc-dev
In-Reply-To: <31901492.post@talk.nabble.com>

On 22/06/11 09:56, Vasanth Ragavendran wrote:
> 
> Hi
>  
> I am using a MPC8315ERDB board. For this i've an external button which is
> connected to GPIO pin 7 of the board. And if this button is pressed then
> certain files have to be deleted. Browsing through the internet i found that
> GPIO drivers have to be included into the kernel and hence i set a 'y' to
> CONFIG_MPC8xxx_GPIO, CONFIG_GPIO_SYSFS and CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB
> etc. And the dts file has be modified to include the following lines 
>  
> gpio1: gpio-controller@c00 {                
> #gpio-cells = <2>;                
> compatible = "fsl,mpc8315-gpio", "fsl,mpc8349-gpio";                
> reg = <0xc00 0x100>;                
> interrupts = <74 0x8>;                
> interrupt-parent = <&ipic>;                
> gpio-controller;         };          
>  
> this is included under immr@e0000000.
>  
> further i included
>  
> erase-button@0 {
> compatible = "erase-button";
> interrupts = <7 2>;
> interrupt-parent = <&gpio1>;
> };
>  
> am i right in including this? coz after compiling the kernel i get a folder
> under /sys/class/gpio. I did an export using
>  
> echo 224 > /sys/class/gpio/export.
>  
> 224 was the number appearing in gpiochip224/base.
>  
> It created another folder gpio224.
>  
> However i'm not able to set the value in them nor the direction.
>  
> echo 1 > /sys/class/gpio/gpio224/value
> cat /sys/class/gpio/gpio224/value
> returns a value of 0 only.
>  
> however the direction is "in"
> cat /sys/class/gpio/gpio224/direction
> in
> 

echo "out" > /sys/class/gpio/gpio224/direction

Martyn

> Am i doing it correctly? How to check it programatically if the button is
> pressed and take the corresponding action! Plz help!
>  
> My kernel version is 2.6.35.9.
>  
> Thanking you in advance.


-- 
Martyn Welch (Principal Software Engineer) | Registered in England and
GE Intelligent Platforms                   | Wales (3828642) at 100
T +44(0)127322748                          | Barbirolli Square, Manchester,
E martyn.welch@ge.com                      | M2 3AB  VAT:GB 927559189

^ permalink raw reply

* GPIO MPC8315 board
From: Vasanth Ragavendran @ 2011-06-22  8:56 UTC (permalink / raw)
  To: linuxppc-dev


Hi
=20
I am using a MPC8315ERDB board. For this i've an external button which is
connected to GPIO pin 7 of the board. And if this button is pressed then
certain files have to be deleted. Browsing through the internet i found tha=
t
GPIO drivers have to be included into the kernel and hence i set a 'y' to
CONFIG_MPC8xxx_GPIO, CONFIG_GPIO_SYSFS and CONFIG_ARCH_WANT_OPTIONAL_GPIOLI=
B
etc. And the dts file has be modified to include the following lines=20
=20
gpio1: gpio-controller@c00 {               =20
#gpio-cells =3D <2>;               =20
compatible =3D "fsl,mpc8315-gpio", "fsl,mpc8349-gpio";               =20
reg =3D <0xc00 0x100>;               =20
interrupts =3D <74 0x8>;               =20
interrupt-parent =3D <&ipic>;               =20
gpio-controller;         };         =20
=20
this is included under immr@e0000000.
=20
further i included
=20
erase-button@0 {
compatible =3D "erase-button";
interrupts =3D <7 2>;
interrupt-parent =3D <&gpio1>;
};
=20
am i right in including this? coz after compiling the kernel i get a folder
under /sys/class/gpio. I did an export using
=20
echo 224 > /sys/class/gpio/export.
=20
224 was the number appearing in gpiochip224/base.
=20
It created another folder gpio224.
=20
However i'm not able to set the value in them nor the direction.
=20
echo 1 > /sys/class/gpio/gpio224/value
cat /sys/class/gpio/gpio224/value=EF=BB=BF
returns a value of 0 only.
=20
however the direction is "in"
cat /sys/class/gpio/gpio224/direction
in

Am i doing it correctly? How to check it programatically if the button is
pressed and take the corresponding action! Plz help!
=20
My kernel version is 2.6.35.9.
=20
Thanking you in advance.
--=20
View this message in context: http://old.nabble.com/GPIO-MPC8315-board-tp31=
901492p31901492.html
Sent from the linuxppc-dev mailing list archive at Nabble.com.

^ permalink raw reply

* Re: [PATCH 2/4] powerpc, mpc52xx: add a4m072 board support
From: Wolfram Sang @ 2011-06-22  8:25 UTC (permalink / raw)
  To: Heiko Schocher; +Cc: devicetree-discuss, linuxppc-dev, Wolfgang Denk
In-Reply-To: <4E01A43F.6030801@denx.de>

[-- Attachment #1: Type: text/plain, Size: 366 bytes --]

> >> Grant? Do you have some comments on that patch?
> > 
> > Can you use the mpc5200-include?
> 
> Sorry, cannot parse this ...

Check other mpc5200-boards, like pcm030:

/include/ "mpc5200b.dtsi"

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply

* Re: [PATCH 2/4] powerpc, mpc52xx: add a4m072 board support
From: Heiko Schocher @ 2011-06-22  8:13 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: devicetree-discuss, linuxppc-dev, Wolfgang Denk
In-Reply-To: <20110622080959.GA16605@pengutronix.de>

Hello Wolfram,

Wolfram Sang wrote:
> On Wed, Jun 22, 2011 at 09:55:09AM +0200, Heiko Schocher wrote:
>> Signed-off-by: Heiko Schocher <hs@denx.de>
>> cc: Grant Likely <grant.likely@secretlab.ca>
>> cc: devicetree-discuss@ozlabs.org
>> cc: Wolfgang Denk <wd@denx.de>
>> ---
>> For this patchseries following patch is needed:
>>
>> http://patchwork.ozlabs.org/patch/91919/
>>
>> Grant? Do you have some comments on that patch?
> 
> Can you use the mpc5200-include?

Sorry, cannot parse this ...

bye,
Heiko
-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

^ permalink raw reply

* Re: [PATCH 0/15] Hypervisor-mode KVM on POWER7 and PPC970
From: Dmitry Eremin-Solenikov @ 2011-06-22  8:17 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: linuxppc-dev
In-Reply-To: <20110622032013.GA28610@bloggs.ozlabs.ibm.com>

On 6/22/11, Paul Mackerras <paulus@samba.org> wrote:
> On Tue, Jun 21, 2011 at 02:18:39PM +0000, Dmitry Eremin-Solenikov wrote:
>
>> I have a Maple board (dual PPC970FX). Will this patchset work on it?
>> Should I add any additional changes to add support for this platform?
>
> Provided the firmware gives you control in hypervisor mode, yes it
> should work, and I don't know of any extra changes you would need.
> I don't recall what firmware the Maple boards had on them, though.

On my board I have a PIBS firmware which programs all PPC970 registers
with special script. I think one of the scripts bears "hypervisor" settings,
so I'll try to give this patchset a try.

-- 
With best wishes
Dmitry

^ permalink raw reply

* Re: [PATCH 2/4] powerpc, mpc52xx: add a4m072 board support
From: Wolfram Sang @ 2011-06-22  8:09 UTC (permalink / raw)
  To: Heiko Schocher; +Cc: devicetree-discuss, linuxppc-dev, Wolfgang Denk
In-Reply-To: <1308729311-15375-3-git-send-email-hs@denx.de>

[-- Attachment #1: Type: text/plain, Size: 586 bytes --]

On Wed, Jun 22, 2011 at 09:55:09AM +0200, Heiko Schocher wrote:
> Signed-off-by: Heiko Schocher <hs@denx.de>
> cc: Grant Likely <grant.likely@secretlab.ca>
> cc: devicetree-discuss@ozlabs.org
> cc: Wolfgang Denk <wd@denx.de>
> ---
> For this patchseries following patch is needed:
> 
> http://patchwork.ozlabs.org/patch/91919/
> 
> Grant? Do you have some comments on that patch?

Can you use the mpc5200-include?

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply

* [PATCH 4/4] powerpc, mpc5200: add options to mpc5200_defconfig
From: Heiko Schocher @ 2011-06-22  7:55 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Heiko Schocher, Wolfgang Denk
In-Reply-To: <1308729311-15375-1-git-send-email-hs@denx.de>

Add the following options to the mpc5200_defconfig, needed
for the a4m072 board support:

CONFIG_AMD_PHY=y
CONFIG_MTD_PLATRAM=y -> this deletes CONFIG_MTD_RAM=y
CONFIG_GPIO_SYSFS=y
CONFIG_SENSORS_LM87=m
CONFIG_RTC_DRV_PCF8563=m

Signed-off-by: Heiko Schocher <hs@denx.de>
cc: Wolfgang Denk <wd@denx.de>
---
 arch/powerpc/configs/mpc5200_defconfig |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/configs/mpc5200_defconfig b/arch/powerpc/configs/mpc5200_defconfig
index b3e27f6..1e64591 100644
--- a/arch/powerpc/configs/mpc5200_defconfig
+++ b/arch/powerpc/configs/mpc5200_defconfig
@@ -39,9 +39,9 @@ CONFIG_MTD_CHAR=y
 CONFIG_MTD_BLOCK=y
 CONFIG_MTD_CFI=y
 CONFIG_MTD_CFI_AMDSTD=y
-CONFIG_MTD_RAM=y
 CONFIG_MTD_ROM=y
 CONFIG_MTD_PHYSMAP_OF=y
+CONFIG_MTD_PLATRAM=y
 CONFIG_MTD_UBI=m
 CONFIG_PROC_DEVICETREE=y
 CONFIG_BLK_DEV_LOOP=y
@@ -56,6 +56,7 @@ CONFIG_ATA=y
 CONFIG_PATA_MPC52xx=y
 CONFIG_PATA_PLATFORM=y
 CONFIG_NETDEVICES=y
+CONFIG_AMD_PHY=y
 CONFIG_LXT_PHY=y
 CONFIG_NET_ETHERNET=y
 CONFIG_FEC_MPC52xx=y
@@ -75,6 +76,8 @@ CONFIG_SPI_GPIO=m
 CONFIG_SPI_MPC52xx=m
 CONFIG_SPI_MPC52xx_PSC=m
 CONFIG_SPI_SPIDEV=m
+CONFIG_GPIO_SYSFS=y
+CONFIG_SENSORS_LM87=m
 CONFIG_WATCHDOG=y
 CONFIG_DRM=y
 CONFIG_VIDEO_OUTPUT_CONTROL=y
@@ -107,6 +110,7 @@ CONFIG_USB_STORAGE=y
 CONFIG_NEW_LEDS=y
 CONFIG_RTC_CLASS=y
 CONFIG_RTC_DRV_DS1307=y
+CONFIG_RTC_DRV_PCF8563=m
 CONFIG_EXT2_FS=y
 CONFIG_EXT3_FS=y
 # CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
-- 
1.7.5.4

^ permalink raw reply related

* [PATCH 3/4] powerpc, mpc5200: update mpc5200_defconfig
From: Heiko Schocher @ 2011-06-22  7:55 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Heiko Schocher, Wolfgang Denk
In-Reply-To: <1308729311-15375-1-git-send-email-hs@denx.de>

just made a

make mpc5200_defconfig
make savedefconfig
cp defconfig arch/powerpc/configs/mpc5200_defconfig

So changes needed in mpc5200_defconfig for a4m072 board support
better indicated.

Signed-off-by: Heiko Schocher <hs@denx.de>
cc: Wolfgang Denk <wd@denx.de>
---
 arch/powerpc/configs/mpc5200_defconfig |    9 +--------
 1 files changed, 1 insertions(+), 8 deletions(-)

diff --git a/arch/powerpc/configs/mpc5200_defconfig b/arch/powerpc/configs/mpc5200_defconfig
index e63f537..b3e27f6 100644
--- a/arch/powerpc/configs/mpc5200_defconfig
+++ b/arch/powerpc/configs/mpc5200_defconfig
@@ -1,8 +1,8 @@
 CONFIG_EXPERIMENTAL=y
 CONFIG_SYSVIPC=y
+CONFIG_SPARSE_IRQ=y
 CONFIG_LOG_BUF_SHIFT=14
 CONFIG_BLK_DEV_INITRD=y
-# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
 CONFIG_MODULES=y
 CONFIG_MODULE_UNLOAD=y
 # CONFIG_BLK_DEV_BSG is not set
@@ -20,8 +20,6 @@ CONFIG_PPC_BESTCOMM=y
 CONFIG_SIMPLE_GPIO=y
 CONFIG_NO_HZ=y
 CONFIG_HIGH_RES_TIMERS=y
-CONFIG_SPARSE_IRQ=y
-CONFIG_PM=y
 CONFIG_NET=y
 CONFIG_PACKET=y
 CONFIG_UNIX=y
@@ -36,10 +34,7 @@ CONFIG_SYN_COOKIES=y
 # CONFIG_IPV6 is not set
 CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
 CONFIG_MTD=y
-CONFIG_MTD_CONCAT=y
-CONFIG_MTD_PARTITIONS=y
 CONFIG_MTD_CMDLINE_PARTS=y
-CONFIG_MTD_OF_PARTS=y
 CONFIG_MTD_CHAR=y
 CONFIG_MTD_BLOCK=y
 CONFIG_MTD_CFI=y
@@ -115,7 +110,6 @@ CONFIG_RTC_DRV_DS1307=y
 CONFIG_EXT2_FS=y
 CONFIG_EXT3_FS=y
 # CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
-CONFIG_INOTIFY=y
 CONFIG_MSDOS_FS=y
 CONFIG_VFAT_FS=y
 CONFIG_PROC_KCORE=y
@@ -133,5 +127,4 @@ CONFIG_PRINTK_TIME=y
 CONFIG_DEBUG_KERNEL=y
 CONFIG_DETECT_HUNG_TASK=y
 CONFIG_DEBUG_INFO=y
-# CONFIG_RCU_CPU_STALL_DETECTOR is not set
 # CONFIG_CRYPTO_ANSI_CPRNG is not set
-- 
1.7.5.4

^ permalink raw reply related

* [PATCH 2/4] powerpc, mpc52xx: add a4m072 board support
From: Heiko Schocher @ 2011-06-22  7:55 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Heiko Schocher, Wolfgang Denk, devicetree-discuss
In-Reply-To: <1308729311-15375-1-git-send-email-hs@denx.de>

Signed-off-by: Heiko Schocher <hs@denx.de>
cc: Grant Likely <grant.likely@secretlab.ca>
cc: devicetree-discuss@ozlabs.org
cc: Wolfgang Denk <wd@denx.de>
---
For this patchseries following patch is needed:

http://patchwork.ozlabs.org/patch/91919/

Grant? Do you have some comments on that patch?

 arch/powerpc/boot/dts/a4m072.dts             |  273 ++++++++++++++++++++++++++
 arch/powerpc/platforms/52xx/mpc5200_simple.c |    1 +
 2 files changed, 274 insertions(+), 0 deletions(-)
 create mode 100644 arch/powerpc/boot/dts/a4m072.dts

diff --git a/arch/powerpc/boot/dts/a4m072.dts b/arch/powerpc/boot/dts/a4m072.dts
new file mode 100644
index 0000000..cea1c6f
--- /dev/null
+++ b/arch/powerpc/boot/dts/a4m072.dts
@@ -0,0 +1,273 @@
+/*
+ * a4m072 board Device Tree Source
+ *
+ * Copyright (C) 2011 DENX Software Engineering GmbH
+ * Heiko Schocher <hs@denx.de>
+ *
+ * Copyright (C) 2007 Semihalf
+ * Marian Balakowicz <m8@semihalf.com>
+ *
+ * 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.
+ */
+
+/dts-v1/;
+
+/ {
+	model = "anonymous,a4m072";
+	compatible = "anonymous,a4m072";
+	#address-cells = <1>;
+	#size-cells = <1>;
+	interrupt-parent = <&mpc5200_pic>;
+
+	cpus {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		PowerPC,5200@0 {
+			device_type = "cpu";
+			reg = <0>;
+			d-cache-line-size = <32>;
+			i-cache-line-size = <32>;
+			d-cache-size = <0x4000>;	// L1, 16K
+			i-cache-size = <0x4000>;	// L1, 16K
+			timebase-frequency = <0>; /* From boot loader */
+			bus-frequency = <0>; /* From boot loader */
+			clock-frequency = <0>; /* From boot loader */
+		};
+	};
+
+	memory {
+		device_type = "memory";
+		reg = <0x00000000 0x04000000>;
+	};
+
+	soc5200@f0000000 {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		compatible = "fsl,mpc5200b-immr";
+		ranges = <0 0xf0000000 0x0000c000>;
+		reg = <0xf0000000 0x00000100>;
+		bus-frequency = <0>; /* From boot loader */
+		system-frequency = <0>; /* From boot loader */
+
+		cdm@200 {
+			compatible = "fsl,mpc5200b-cdm","fsl,mpc5200-cdm";
+			reg = <0x200 0x38>;
+			fsl,ext_48mhz_en = <0x0>;
+			fsl,fd_enable = <0x01>;
+			fsl,fd_counters = <0xbbbb>;
+		};
+
+		mpc5200_pic: interrupt-controller@500 {
+			// 5200 interrupts are encoded into two levels;
+			interrupt-controller;
+			#interrupt-cells = <3>;
+			compatible = "fsl,mpc5200b-pic","fsl,mpc5200-pic";
+			reg = <0x500 0x80>;
+		};
+
+		timer@600 {
+			compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
+			reg = <0x600 0x80>;
+			interrupts = <1 9 0>;
+			fsl,has-wdt;
+		};
+
+		gpt3: timer@630 { /* General Purpose Timer in GPIO mode */
+			compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
+			reg = <0x630 0x10>;
+			interrupts = <1 12 0>;
+			gpio-controller;
+			#gpio-cells = <2>;
+		};
+
+		gpt4: timer@640 { /* General Purpose Timer in GPIO mode */
+			compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
+			reg = <0x640 0x10>;
+			interrupts = <1 13 0>;
+			gpio-controller;
+			#gpio-cells = <2>;
+		};
+
+		gpt5: timer@650 { /* General Purpose Timer in GPIO mode */
+			compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
+			reg = <0x650 0x10>;
+			interrupts = <1 14 0>;
+			gpio-controller;
+			#gpio-cells = <2>;
+		};
+
+		can@900 {
+			compatible = "fsl,mpc5200b-mscan","fsl,mpc5200-mscan";
+			interrupts = <2 17 0>;
+			reg = <0x900 0x80>;
+		};
+
+		can@980 {
+			compatible = "fsl,mpc5200b-mscan","fsl,mpc5200-mscan";
+			interrupts = <2 18 0>;
+			reg = <0x980 0x80>;
+		};
+
+		gpio_simple: gpio@b00 {
+			compatible = "fsl,mpc5200b-gpio","fsl,mpc5200-gpio";
+			reg = <0xb00 0x40>;
+			interrupts = <1 7 0>;
+			gpio-controller;
+			#gpio-cells = <2>;
+			fsl,port_config = <0x19051444>;
+		};
+
+		gpio_wkup: gpio@c00 {
+			compatible = "fsl,mpc5200b-gpio-wkup","fsl,mpc5200-gpio-wkup";
+			reg = <0xc00 0x40>;
+			interrupts = <1 8 0 0 3 0>;
+			gpio-controller;
+			#gpio-cells = <2>;
+		};
+
+		usb@1000 {
+			compatible = "fsl,mpc5200b-ohci","fsl,mpc5200-ohci","ohci-be";
+			reg = <0x1000 0xff>;
+			interrupts = <2 6 0>;
+		};
+
+		dma-controller@1200 {
+			compatible = "fsl,mpc5200b-bestcomm","fsl,mpc5200-bestcomm";
+			reg = <0x1200 0x80>;
+			interrupts = <3 0 0  3 1 0  3 2 0  3 3 0
+			              3 4 0  3 5 0  3 6 0  3 7 0
+			              3 8 0  3 9 0  3 10 0  3 11 0
+			              3 12 0  3 13 0  3 14 0  3 15 0>;
+		};
+
+		xlb@1f00 {
+			compatible = "fsl,mpc5200b-xlb","fsl,mpc5200-xlb";
+			reg = <0x1f00 0x100>;
+		};
+
+		psc@2000 {
+			compatible = "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart";
+			reg = <0x2000 0x100>;
+			interrupts = <2 1 0>;
+		};
+
+		psc@2200 {
+			compatible = "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart";
+			reg = <0x2200 0x100>;
+			interrupts = <2 2 0>;
+		};
+
+		psc@2400 {
+			compatible = "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart";
+			reg = <0x2400 0x100>;
+			interrupts = <2 3 0>;
+		};
+
+		psc@2c00 {
+			compatible = "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart";
+			reg = <0x2c00 0x100>;
+			interrupts = <2 4 0>;
+		};
+
+		ethernet@3000 {
+			compatible = "fsl,mpc5200b-fec","fsl,mpc5200-fec";
+			reg = <0x3000 0x400>;
+			local-mac-address = [ 00 00 00 00 00 00 ];
+			interrupts = <2 5 0>;
+			phy-handle = <&phy0>;
+		};
+
+		mdio@3000 {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			compatible = "fsl,mpc5200b-mdio","fsl,mpc5200-mdio";
+			reg = <0x3000 0x400>;
+			interrupts = <2 5 0>;
+
+			phy0: ethernet-phy@1f {
+				reg = <0x1f>;
+				interrupts = <1 2 0>; /* IRQ 2 active low */
+			};
+		};
+
+		ata@3a00 {
+			compatible = "fsl,mpc5200b-ata","fsl,mpc5200-ata";
+			reg = <0x3a00 0x100>;
+			interrupts = <2 7 0>;
+		};
+
+		i2c@3d40 {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			compatible = "fsl,mpc5200b-i2c","fsl,mpc5200-i2c","fsl-i2c";
+			reg = <0x3d40 0x40>;
+			interrupts = <2 16 0>;
+
+			 hwmon@2e {
+				compatible = "nsc,lm87";
+				reg = <0x2e>;
+			};
+			 rtc@51 {
+				compatible = "nxp,rtc8564";
+				reg = <0x51>;
+			};
+		};
+
+		sram@8000 {
+			compatible = "fsl,mpc5200b-sram","fsl,mpc5200-sram";
+			reg = <0x8000 0x4000>;
+		};
+	};
+
+	localbus {
+		compatible = "fsl,mpc5200b-lpb","simple-bus";
+		#address-cells = <2>;
+		#size-cells = <1>;
+		ranges = <0 0 0xfe000000 0x02000000
+			  1 0 0x62000000 0x00400000
+			  2 0 0x64000000 0x00200000
+			  3 0 0x66000000 0x01000000
+			  6 0 0x68000000 0x01000000
+			  7 0 0x6a000000 0x00000004
+			 >;
+
+		flash@0,0 {
+			compatible = "cfi-flash";
+			reg = <0 0 0x02000000>;
+			bank-width = <2>;
+			#size-cells = <1>;
+			#address-cells = <1>;
+		};
+		sram0@1,0 {
+			compatible = "mtd-ram";
+			reg = <1 0x00000 0x00400000>;
+			bank-width = <2>;
+		};
+	};
+
+	pci@f0000d00 {
+		#interrupt-cells = <1>;
+		#size-cells = <2>;
+		#address-cells = <3>;
+		device_type = "pci";
+		compatible = "fsl,mpc5200-pci";
+		reg = <0xf0000d00 0x100>;
+		interrupt-map-mask = <0xf800 0 0 7>;
+		interrupt-map = <
+				 /* IDSEL 0x16 */
+				 0xc000 0 0 1 &mpc5200_pic 1 3 3
+				 0xc000 0 0 2 &mpc5200_pic 1 3 3
+				 0xc000 0 0 3 &mpc5200_pic 1 3 3
+				 0xc000 0 0 4 &mpc5200_pic 1 3 3>;
+		clock-frequency = <0>; /* From boot loader */
+		interrupts = <2 8 0 2 9 0 2 10 0>;
+		bus-range = <0 0>;
+		ranges = <0x42000000 0 0x80000000 0x80000000 0 0x10000000
+			  0x02000000 0 0x90000000 0x90000000 0 0x10000000
+			  0x01000000 0 0x00000000 0xa0000000 0 0x01000000>;
+	};
+};
diff --git a/arch/powerpc/platforms/52xx/mpc5200_simple.c b/arch/powerpc/platforms/52xx/mpc5200_simple.c
index e36d6e2..192b4ff 100644
--- a/arch/powerpc/platforms/52xx/mpc5200_simple.c
+++ b/arch/powerpc/platforms/52xx/mpc5200_simple.c
@@ -50,6 +50,7 @@ static void __init mpc5200_simple_setup_arch(void)
 
 /* list of the supported boards */
 static const char *board[] __initdata = {
+	"anonymous,a4m072",
 	"intercontrol,digsy-mtc",
 	"manroland,mucmc52",
 	"manroland,uc101",
-- 
1.7.5.4

^ permalink raw reply related

* [PATCH 1/4] net, phy: am79c874 support
From: Heiko Schocher @ 2011-06-22  7:55 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Heiko Schocher, linux-netdev, Wolfgang Denk
In-Reply-To: <1308729311-15375-1-git-send-email-hs@denx.de>

Signed-off-by: Heiko Schocher <hs@denx.de>
cc: linux-netdev@vger.kernel.org
cc: Wolfgang Denk <wd@denx.de>
---
 drivers/net/phy/Kconfig  |    5 ++
 drivers/net/phy/Makefile |    1 +
 drivers/net/phy/amd79.c  |  109 ++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 115 insertions(+), 0 deletions(-)
 create mode 100644 drivers/net/phy/amd79.c

diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig
index a702443..ee70d04 100644
--- a/drivers/net/phy/Kconfig
+++ b/drivers/net/phy/Kconfig
@@ -15,6 +15,11 @@ if PHYLIB
 
 comment "MII PHY device drivers"
 
+config AMD_PHY
+	tristate "Drivers for the AMD79 PHYs"
+	---help---
+	  Currently supports the amd79c874
+
 config MARVELL_PHY
 	tristate "Drivers for Marvell PHYs"
 	---help---
diff --git a/drivers/net/phy/Makefile b/drivers/net/phy/Makefile
index 2333215..79bc8b4 100644
--- a/drivers/net/phy/Makefile
+++ b/drivers/net/phy/Makefile
@@ -23,3 +23,4 @@ obj-$(CONFIG_DP83640_PHY)	+= dp83640.o
 obj-$(CONFIG_STE10XP)		+= ste10Xp.o
 obj-$(CONFIG_MICREL_PHY)	+= micrel.o
 obj-$(CONFIG_MDIO_OCTEON)	+= mdio-octeon.o
+obj-$(CONFIG_AMD_PHY)		+= amd79.o
diff --git a/drivers/net/phy/amd79.c b/drivers/net/phy/amd79.c
new file mode 100644
index 0000000..914d696
--- /dev/null
+++ b/drivers/net/phy/amd79.c
@@ -0,0 +1,109 @@
+/*
+ * Driver for AMD am79 PHYs
+ *
+ * Author: Heiko Schocher <hs@denx.de>
+ *
+ * Copyright (c) 2011 DENX Software Engineering GmbH
+ *
+ * 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/string.h>
+#include <linux/errno.h>
+#include <linux/unistd.h>
+#include <linux/interrupt.h>
+#include <linux/init.h>
+#include <linux/io.h>
+#include <linux/delay.h>
+#include <linux/netdevice.h>
+#include <linux/etherdevice.h>
+#include <linux/skbuff.h>
+#include <linux/spinlock.h>
+#include <linux/mm.h>
+#include <linux/module.h>
+#include <linux/mii.h>
+#include <linux/ethtool.h>
+#include <linux/phy.h>
+#include <linux/uaccess.h>
+
+#include <asm/irq.h>
+
+#define MII_AMD79_IR		17  /* Interrupt Status/Control Register */
+#define MII_AMD79_IR_EN_LINK	0x0400	/* IR enable Linkstate */
+#define MII_AMD79_IR_ACK_LINK	0x0004	/* IR ack Linkstate */
+
+MODULE_DESCRIPTION("AMD PHY driver");
+MODULE_AUTHOR("Heiko Schocher <hs@denx.de>");
+MODULE_LICENSE("GPL");
+
+static int amd79_ack_interrupt(struct phy_device *phydev)
+{
+	int err;
+
+	err = phy_read(phydev, MII_BMSR);
+	if (err < 0)
+		return err;
+
+	err = phy_read(phydev, MII_AMD79_IR);
+	if (err < 0)
+		return err;
+
+	return 0;
+}
+
+static int amd79_config_init(struct phy_device *phydev)
+{
+	int err = 0;
+
+	return err;
+}
+
+static int amd79_config_intr(struct phy_device *phydev)
+{
+	int err;
+
+	if (phydev->interrupts == PHY_INTERRUPT_ENABLED)
+		err = phy_write(phydev, MII_AMD79_IR_EN_LINK,
+			MII_AMD79_IR_EN_LINK);
+	else
+		err = phy_write(phydev, MII_AMD79_IR_EN_LINK, 0);
+
+	return err;
+}
+
+static struct phy_driver amd79_driver = {
+	.phy_id		= 0x0022561b,
+	.name		= "AMD79C874",
+	.phy_id_mask	= 0xfffffff0,
+	.features	= PHY_BASIC_FEATURES,
+	.flags		= PHY_HAS_INTERRUPT,
+	.config_init	= amd79_config_init,
+	.config_aneg	= genphy_config_aneg,
+	.read_status	= genphy_read_status,
+	.ack_interrupt	= amd79_ack_interrupt,
+	.config_intr	= amd79_config_intr,
+	.driver		= { .owner = THIS_MODULE,},
+};
+
+static int __init amd79_init(void)
+{
+	int ret;
+
+	ret = phy_driver_register(&amd79_driver);
+	if (ret)
+		return ret;
+
+	return 0;
+}
+
+static void __exit amd79_exit(void)
+{
+	phy_driver_unregister(&amd79_driver);
+}
+
+module_init(amd79_init);
+module_exit(amd79_exit);
-- 
1.7.5.4

^ permalink raw reply related

* [PATCH 0/4] powerpc, mpc5200: add support for a4m072 board
From: Heiko Schocher @ 2011-06-22  7:55 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Heiko Schocher, Wolfgang Denk

- Add PHY support (AMD am79c874)
- Add DTS to support a4m072 board
- Update mpc5200_defconfig
- Add config options needed for a4m072 board support
  to mpc5200_defconfig 

cc: Wolfgang Denk <wd@denx.de>

Heiko Schocher (4):
  net, phy: am79c874 support
  powerpc, mpc5200: add a4m072 board support
  powerpc, mpc5200: update mpc5200_defconfig
  powerpc, mpc5200: add options to mpc5200_defconfig

 arch/powerpc/boot/dts/a4m072.dts             |  273 ++++++++++++++++++++++++++
 arch/powerpc/configs/mpc5200_defconfig       |   15 +-
 arch/powerpc/platforms/52xx/mpc5200_simple.c |    1 +
 drivers/net/phy/Kconfig                      |    5 +
 drivers/net/phy/Makefile                     |    1 +
 drivers/net/phy/amd79.c                      |  109 ++++++++++
 6 files changed, 395 insertions(+), 9 deletions(-)
 create mode 100644 arch/powerpc/boot/dts/a4m072.dts
 create mode 100644 drivers/net/phy/amd79.c

-- 
1.7.5.4

^ permalink raw reply


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