* Re: [PATCH 2/3] Remove empty ppc_md.setup_arch hooks.
From: Josh Boyer @ 2007-10-10 20:28 UTC (permalink / raw)
To: Grant Likely; +Cc: arnd, linuxppc-dev, paulus
In-Reply-To: <20071010184823.13609.41058.stgit@trillian.cg.shawcable.net>
On Wed, 2007-10-10 at 12:48 -0600, Grant Likely wrote:
> From: Grant Likely <grant.likely@secretlab.ca>
Assuming Paul likes the overall change, the 4xx parts look fine to me.
> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
> ---
>
> arch/powerpc/platforms/40x/virtex.c | 5 -----
> arch/powerpc/platforms/40x/walnut.c | 5 -----
> arch/powerpc/platforms/44x/bamboo.c | 5 -----
> arch/powerpc/platforms/44x/ebony.c | 5 -----
> arch/powerpc/platforms/44x/sequoia.c | 5 -----
> 5 files changed, 0 insertions(+), 25 deletions(-)
>
> diff --git a/arch/powerpc/platforms/40x/virtex.c b/arch/powerpc/platforms/40x/virtex.c
> index b52aa94..14bbc32 100644
> --- a/arch/powerpc/platforms/40x/virtex.c
> +++ b/arch/powerpc/platforms/40x/virtex.c
> @@ -36,14 +36,9 @@ static int __init virtex_probe(void)
> return 1;
> }
>
> -static void __init virtex_setup_arch(void)
> -{
> -}
> -
> define_machine(virtex) {
> .name = "Xilinx Virtex",
> .probe = virtex_probe,
> - .setup_arch = virtex_setup_arch,
> .init_IRQ = xilinx_intc_init_tree,
> .get_irq = xilinx_intc_get_irq,
> .calibrate_decr = generic_calibrate_decr,
> diff --git a/arch/powerpc/platforms/40x/walnut.c b/arch/powerpc/platforms/40x/walnut.c
> index c17fdf2..eb0c136 100644
> --- a/arch/powerpc/platforms/40x/walnut.c
> +++ b/arch/powerpc/platforms/40x/walnut.c
> @@ -53,14 +53,9 @@ static int __init walnut_probe(void)
> return 1;
> }
>
> -static void __init walnut_setup_arch(void)
> -{
> -}
> -
> define_machine(walnut) {
> .name = "Walnut",
> .probe = walnut_probe,
> - .setup_arch = walnut_setup_arch,
> .progress = udbg_progress,
> .init_IRQ = uic_init_tree,
> .get_irq = uic_get_irq,
> diff --git a/arch/powerpc/platforms/44x/bamboo.c b/arch/powerpc/platforms/44x/bamboo.c
> index 9bc45de..470e1a3 100644
> --- a/arch/powerpc/platforms/44x/bamboo.c
> +++ b/arch/powerpc/platforms/44x/bamboo.c
> @@ -50,14 +50,9 @@ static int __init bamboo_probe(void)
> return 1;
> }
>
> -static void __init bamboo_setup_arch(void)
> -{
> -}
> -
> define_machine(bamboo) {
> .name = "Bamboo",
> .probe = bamboo_probe,
> - .setup_arch = bamboo_setup_arch,
> .progress = udbg_progress,
> .init_IRQ = uic_init_tree,
> .get_irq = uic_get_irq,
> diff --git a/arch/powerpc/platforms/44x/ebony.c b/arch/powerpc/platforms/44x/ebony.c
> index 5a7fec8..40e18fc 100644
> --- a/arch/powerpc/platforms/44x/ebony.c
> +++ b/arch/powerpc/platforms/44x/ebony.c
> @@ -57,14 +57,9 @@ static int __init ebony_probe(void)
> return 1;
> }
>
> -static void __init ebony_setup_arch(void)
> -{
> -}
> -
> define_machine(ebony) {
> .name = "Ebony",
> .probe = ebony_probe,
> - .setup_arch = ebony_setup_arch,
> .progress = udbg_progress,
> .init_IRQ = uic_init_tree,
> .get_irq = uic_get_irq,
> diff --git a/arch/powerpc/platforms/44x/sequoia.c b/arch/powerpc/platforms/44x/sequoia.c
> index 7d0d9d5..30700b3 100644
> --- a/arch/powerpc/platforms/44x/sequoia.c
> +++ b/arch/powerpc/platforms/44x/sequoia.c
> @@ -50,14 +50,9 @@ static int __init sequoia_probe(void)
> return 1;
> }
>
> -static void __init sequoia_setup_arch(void)
> -{
> -}
> -
> define_machine(sequoia) {
> .name = "Sequoia",
> .probe = sequoia_probe,
> - .setup_arch = sequoia_setup_arch,
> .progress = udbg_progress,
> .init_IRQ = uic_init_tree,
> .get_irq = uic_get_irq,
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
^ permalink raw reply
* Re: [PATCH 2/3] [POWERPC] Add AMCC Kilauea eval board support to platforms/40x
From: Josh Boyer @ 2007-10-10 20:23 UTC (permalink / raw)
To: Stefan Roese; +Cc: linuxppc-dev
In-Reply-To: <200710081108.51625.sr@denx.de>
On Mon, 2007-10-08 at 11:08 +0200, Stefan Roese wrote:
> This patch adds basic support for the new 405EX and the AMCC eval board
> Kilauea to arch/powerpc.
>
> Signed-off-by: Stefan Roese <sr@denx.de>
> ---
> arch/powerpc/platforms/40x/Kconfig | 17 +++++++--
> arch/powerpc/platforms/40x/Makefile | 5 ++-
> arch/powerpc/platforms/40x/kilauea.c | 63 ++++++++++++++++++++++++++++++++++
> 3 files changed, 80 insertions(+), 5 deletions(-)
> create mode 100644 arch/powerpc/platforms/40x/kilauea.c
>
> diff --git a/arch/powerpc/platforms/40x/Kconfig b/arch/powerpc/platforms/40x/Kconfig
> index a0a50b1..da8d02d 100644
> --- a/arch/powerpc/platforms/40x/Kconfig
> +++ b/arch/powerpc/platforms/40x/Kconfig
> @@ -29,6 +29,14 @@
> # help
> # This option enables support for the extra features of the EP405PC board.
>
> +config KILAUEA
> + bool "Kilauea"
> + depends on 40x
> + default y
I think we decided to say default n here. I need to fix the Walnut
example, I know.
> + select 405EX
> + help
> + This option enables support for the AMCC PPC405EX evaluation board.
> +
> #config REDWOOD_5
> # bool "Redwood-5"
> # depends on 40x
> @@ -89,14 +97,17 @@ config 403GCX
> #depends on OAK
> select IBM405_ERR51
>
> +config 405EP
> + bool
> +
> +config 405EX
> + bool
> +
> config 405GP
> bool
> select IBM405_ERR77
> select IBM405_ERR51
>
> -config 405EP
> - bool
> -
> config 405GPR
> bool
>
> diff --git a/arch/powerpc/platforms/40x/Makefile b/arch/powerpc/platforms/40x/Makefile
> index 0a3cfe9..51dadee 100644
> --- a/arch/powerpc/platforms/40x/Makefile
> +++ b/arch/powerpc/platforms/40x/Makefile
> @@ -1,2 +1,3 @@
> -obj-$(CONFIG_WALNUT) += walnut.o
> -obj-$(CONFIG_XILINX_VIRTEX_GENERIC_BOARD) += virtex.o
> +obj-$(CONFIG_KILAUEA) += kilauea.o
> +obj-$(CONFIG_WALNUT) += walnut.o
> +obj-$(CONFIG_XILINX_VIRTEX_GENERIC_BOARD) += virtex.o
> diff --git a/arch/powerpc/platforms/40x/kilauea.c b/arch/powerpc/platforms/40x/kilauea.c
> new file mode 100644
> index 0000000..6cbd528
> --- /dev/null
> +++ b/arch/powerpc/platforms/40x/kilauea.c
> @@ -0,0 +1,63 @@
> +/*
> + * Kilauea board specific routines
> + *
> + * Copyright 2007 DENX Software Engineering, Stefan Roese <sr@denx.de>
> + *
> + * Based on the Walnut code by
> + * Josh Boyer <jwboyer@linux.vnet.ibm.com>
> + * Copyright 2007 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; either version 2 of the License, or (at your
> + * option) any later version.
> + */
> +#include <linux/init.h>
> +#include <asm/machdep.h>
> +#include <asm/prom.h>
> +#include <asm/udbg.h>
> +#include <asm/time.h>
> +#include <asm/uic.h>
> +#include <asm/of_platform.h>
> +
> +static struct of_device_id kilauea_of_bus[] = {
> + { .compatible = "ibm,plb4", },
> + { .compatible = "ibm,opb", },
> + { .compatible = "ibm,ebc", },
> + {},
> +};
> +
> +static int __init kilauea_device_probe(void)
> +{
> + if (!machine_is(kilauea))
> + return 0;
> +
> + of_platform_bus_probe(NULL, kilauea_of_bus, NULL);
> +
> + return 0;
> +}
> +device_initcall(kilauea_device_probe);
> +
> +static int __init kilauea_probe(void)
> +{
> + unsigned long root = of_get_flat_dt_root();
> +
> + if (!of_flat_dt_is_compatible(root, "amcc,kilauea"))
> + return 0;
> +
> + return 1;
> +}
> +
> +static void __init kilauea_setup_arch(void)
> +{
> +}
Assuming Grant's patch to make setup_arch optional gets applied, this
can go too.
> +
> +define_machine(kilauea) {
> + .name = "Kilauea",
> + .probe = kilauea_probe,
> + .setup_arch = kilauea_setup_arch,
> + .progress = udbg_progress,
> + .init_IRQ = uic_init_tree,
> + .get_irq = uic_get_irq,
> + .calibrate_decr = generic_calibrate_decr,
> +};
Other than those two comments, looks good.
josh
^ permalink raw reply
* Re: [PATCH 3/3] [POWERPC] Kilauea DTS
From: Josh Boyer @ 2007-10-10 20:21 UTC (permalink / raw)
To: Stefan Roese; +Cc: linuxppc-dev
In-Reply-To: <200710081110.16447.sr@denx.de>
On Mon, 2007-10-08 at 11:10 +0200, Stefan Roese wrote:
> Signed-off-by: Stefan Roese <sr@denx.de>
Looks pretty good. Just a couple of questions.
> ---
> arch/powerpc/boot/dts/kilauea.dts | 253 +++++++++++++++++++++++++++++++++++++
> 1 files changed, 253 insertions(+), 0 deletions(-)
> create mode 100644 arch/powerpc/boot/dts/kilauea.dts
>
> diff --git a/arch/powerpc/boot/dts/kilauea.dts b/arch/powerpc/boot/dts/kilauea.dts
> new file mode 100644
> index 0000000..4683174
> --- /dev/null
> +++ b/arch/powerpc/boot/dts/kilauea.dts
> @@ -0,0 +1,253 @@
> +/*
> + * Device Tree Source for AMCC Kilauea (405EX)
> + *
> + * Copyright 2007 DENX Software Engineering, Stefan Roese <sr@denx.de>
> + *
> + * This file is licensed under the terms of the GNU General Public
> + * License version 2. This program is licensed "as is" without
> + * any warranty of any kind, whether express or implied.
> + */
> +
> +/ {
> + #address-cells = <1>;
> + #size-cells = <1>;
> + model = "amcc,kilauea";
> + compatible = "amcc,kilauea";
> + dcr-parent = <&/cpus/PowerPC,405EX@0>;
> +
> + cpus {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + PowerPC,405EX@0 {
> + device_type = "cpu";
> + reg = <0>;
> + clock-frequency = <0>; /* Filled in by U-Boot */
Filled in by U-Boot itself? Or by a cuboot wrapper? (which I can't find
in the patches.)
> + timebase-frequency = <0>; /* Filled in by U-Boot */
> + i-cache-line-size = <20>;
> + d-cache-line-size = <20>;
> + i-cache-size = <4000>; /* 16 kB */
> + d-cache-size = <4000>; /* 16 kB */
> + dcr-controller;
> + dcr-access-method = "native";
> + };
> + };
> +
> + memory {
> + device_type = "memory";
> + reg = <0 0>; /* Filled in by U-Boot */
> + };
> +
> + UIC0: interrupt-controller {
> + compatible = "ibm,uic-405ex", "ibm,uic";
> + interrupt-controller;
> + cell-index = <0>;
> + dcr-reg = <0c0 009>;
> + #address-cells = <0>;
> + #size-cells = <0>;
> + #interrupt-cells = <2>;
> + };
> +
> + UIC1: interrupt-controller1 {
> + compatible = "ibm,uic-405ex","ibm,uic";
> + interrupt-controller;
> + cell-index = <1>;
> + dcr-reg = <0d0 009>;
> + #address-cells = <0>;
> + #size-cells = <0>;
> + #interrupt-cells = <2>;
> + interrupts = <1e 4 1f 4>; /* cascade */
> + interrupt-parent = <&UIC0>;
> + };
> +
> + UIC2: interrupt-controller2 {
> + compatible = "ibm,uic-405ex","ibm,uic";
> + interrupt-controller;
> + cell-index = <2>;
> + dcr-reg = <0e0 009>;
> + #address-cells = <0>;
> + #size-cells = <0>;
> + #interrupt-cells = <2>;
> + interrupts = <1c 4 1d 4>; /* cascade */
> + interrupt-parent = <&UIC0>;
> + };
> +
> + plb {
> + compatible = "ibm,plb-405ex", "ibm,plb4";
> + #address-cells = <1>;
> + #size-cells = <1>;
> + ranges;
> + clock-frequency = <0>; /* Filled in by U-Boot */
> +
> + SDRAM0: memory-controller {
> + compatible = "ibm,sdram-405ex";
> + dcr-reg = <010 2>;
> + };
> +
> + MAL0: mcmal {
> + compatible = "ibm,mcmal-405ex", "ibm,mcmal2";
> + dcr-reg = <180 62>;
> + num-tx-chans = <2>;
> + num-rx-chans = <2>;
> + interrupt-parent = <&MAL0>;
> + interrupts = <0 1 2 3 4>;
> + #interrupt-cells = <1>;
> + #address-cells = <0>;
> + #size-cells = <0>;
> + interrupt-map = </*TXEOB*/ 0 &UIC0 a 4
> + /*RXEOB*/ 1 &UIC0 b 4
> + /*SERR*/ 2 &UIC1 0 4
> + /*TXDE*/ 3 &UIC1 1 4
> + /*RXDE*/ 4 &UIC1 2 4>;
> + interrupt-map-mask = <ffffffff>;
> + };
> +
> + POB0: opb {
> + compatible = "ibm,opb-405ex", "ibm,opb";
> + #address-cells = <1>;
> + #size-cells = <1>;
> + ranges = <ef600000 ef600000 a00000>;
> + dcr-reg = <0a0 5>;
> + clock-frequency = <0>; /* Filled in by U-Boot */
> +
> + EBC0: ebc {
> + compatible = "ibm,ebc-405ex", "ibm,ebc";
> + dcr-reg = <012 2>;
> + #address-cells = <2>;
> + #size-cells = <1>;
> + clock-frequency = <0>; /* Filled in by U-Boot */
> + interrupts = <5 1>;
This interrupt is really rising edge? Just double checking.
> + interrupt-parent = <&UIC1>;
> +
> + nor_flash@0,0 {
You have no ranges property for the ebc parent node. Is if filled in by
U-Boot? If so, please add a comment because otherwise I don't see how
this mapping will work.
> + compatible = "amd,s29gl256n", "cfi-flash";
> + bank-width = <2>;
> + reg = <0 000000 4000000>;
> + #address-cells = <1>;
> + #size-cells = <1>;
> + partition@0 {
> + label = "Kernel";
> + reg = <0 180000>;
> + };
> + partition@180000 {
> + label = "ramdisk";
> + reg = <180000 200000>;
> + };
> + partition@380000 {
> + label = "file system";
> + reg = <380000 3aa0000>;
> + };
> + partition@3e20000 {
> + label = "kozio";
> + reg = <3e20000 140000>;
> + };
> + partition@3f60000 {
> + label = "env";
> + reg = <3f60000 40000>;
> + };
> + partition@3fa0000 {
> + label = "u-boot";
> + reg = <3fa0000 60000>;
> + };
> + };
> + };
> +
> + UART0: serial@ef600200 {
> + device_type = "serial";
> + compatible = "ns16550";
> + reg = <ef600200 8>;
> + virtual-reg = <ef600200>;
> + clock-frequency = <0>; /* Filled in by U-Boot */
> + current-speed = <0>;
> + interrupt-parent = <&UIC0>;
> + interrupts = <1a 4>;
> + };
> +
> + UART1: serial@ef600300 {
> + device_type = "serial";
> + compatible = "ns16550";
> + reg = <ef600300 8>;
> + virtual-reg = <ef600300>;
> + clock-frequency = <0>; /* Filled in by U-Boot */
> + current-speed = <0>;
> + interrupt-parent = <&UIC0>;
> + interrupts = <1 4>;
> + };
> +
> + IIC0: i2c@ef600400 {
> + device_type = "i2c";
> + compatible = "ibm,iic-405ex", "ibm,iic";
> + reg = <ef600400 14>;
> + interrupt-parent = <&UIC0>;
> + interrupts = <2 4>;
> + };
> +
> + IIC1: i2c@ef600500 {
> + device_type = "i2c";
> + compatible = "ibm,iic-405ex", "ibm,iic";
> + reg = <ef600500 14>;
> + interrupt-parent = <&UIC0>;
> + interrupts = <7 4>;
> + };
> +
> +
> + RGMII0: emac-rgmii@ef600b00 {
> + device_type = "rgmii-interface";
> + compatible = "ibm,rgmii-405ex", "ibm,rgmii";
> + reg = <ef600b00 104>;
> + };
> +
> + EMAC0: ethernet@ef600900 {
> + linux,network-index = <0>;
> + device_type = "network";
> + compatible = "ibm,emac-405ex", "ibm,emac4";
> + interrupt-parent = <&EMAC0>;
> + interrupts = <0 1>;
> + #interrupt-cells = <1>;
> + #address-cells = <0>;
> + #size-cells = <0>;
> + interrupt-map = </*Status*/ 0 &UIC0 18 4
> + /*Wake*/ 1 &UIC1 1d 4>;
> + reg = <ef600900 70>;
> + local-mac-address = [000000000000];
Does U-Boot (or the wrapper) poke these values as well?
> + mal-device = <&MAL0>;
> + mal-tx-channel = <0>;
> + mal-rx-channel = <0>;
> + cell-index = <0>;
> + max-frame-size = <5dc>;
> + rx-fifo-size = <1000>;
> + tx-fifo-size = <800>;
> + phy-mode = "rgmii";
> + phy-map = <00000000>;
> + rgmii-device = <&RGMII0>;
> + rgmii-channel = <0>;
> + };
> +
> + EMAC1: ethernet@ef600a00 {
> + linux,network-index = <1>;
> + device_type = "network";
> + compatible = "ibm,emac-405ex", "ibm,emac4";
> + interrupt-parent = <&EMAC1>;
> + interrupts = <0 1>;
> + #interrupt-cells = <1>;
> + #address-cells = <0>;
> + #size-cells = <0>;
> + interrupt-map = </*Status*/ 0 &UIC0 19 4
> + /*Wake*/ 1 &UIC1 1f 4>;
> + reg = <ef600a00 70>;
> + local-mac-address = [000000000000];
> + mal-device = <&MAL0>;
> + mal-tx-channel = <1>;
> + mal-rx-channel = <1>;
> + cell-index = <1>;
> + max-frame-size = <5dc>;
> + rx-fifo-size = <1000>;
> + tx-fifo-size = <800>;
> + phy-mode = "rgmii";
> + phy-map = <00000000>;
> + rgmii-device = <&RGMII0>;
> + rgmii-channel = <1>;
> + };
> + };
> + };
No chosen node?
josh
^ permalink raw reply
* Re: [PATCH] Bootwrapper: Enable debug info on boot wrapper
From: Scott Wood @ 2007-10-10 20:10 UTC (permalink / raw)
To: Grant Likely; +Cc: linuxppc-dev, david
In-Reply-To: <fa686aa40710101256q3783994dr854e2bdecddf9820@mail.gmail.com>
Grant Likely wrote:
> Any comments on this one? Scott? David?
It's fine with me.
-Scott
^ permalink raw reply
* Re: [PATCH] Bootwrapper: Enable debug info on boot wrapper
From: Grant Likely @ 2007-10-10 19:56 UTC (permalink / raw)
To: linuxppc-dev, david, paulus, Scott Wood
In-Reply-To: <20071004040501.16923.68468.stgit@trillian.cg.shawcable.net>
Any comments on this one? Scott? David?
Cheers,
g.
On 10/3/07, Grant Likely <grant.likely@secretlab.ca> wrote:
> From: Grant Likely <grant.likely@secretlab.ca>
>
> Add '-g' to BOOTCFLAGS if CONFIG_DEBUG_INFO is set.
>
> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
> ---
>
> arch/powerpc/boot/Makefile | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
> index cf80db3..9dfe79b 100644
> --- a/arch/powerpc/boot/Makefile
> +++ b/arch/powerpc/boot/Makefile
> @@ -25,6 +25,10 @@ BOOTCFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
> -isystem $(shell $(CROSS32CC) -print-file-name=include)
> BOOTAFLAGS := -D__ASSEMBLY__ $(BOOTCFLAGS) -traditional -nostdinc
>
> +ifdef CONFIG_DEBUG_INFO
> +BOOTCFLAGS += -g
> +endif
> +
> ifeq ($(call cc-option-yn, -fstack-protector),y)
> BOOTCFLAGS += -fno-stack-protector
> endif
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
>
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
grant.likely@secretlab.ca
(403) 399-0195
^ permalink raw reply
* Re: [PATCH 2/3] [POWERPC] Add AMCC Kilauea eval board support to platforms/40x
From: Josh Boyer @ 2007-10-10 19:44 UTC (permalink / raw)
To: Stefan Roese; +Cc: Olof Johansson, linuxppc-dev
In-Reply-To: <200710091334.16682.sr@denx.de>
On Tue, 2007-10-09 at 13:34 +0200, Stefan Roese wrote:
> Hi Olof,
>
> On Monday 08 October 2007, Olof Johansson wrote:
> > > +config KILAUEA
> > > + bool "Kilauea"
> > > + depends on 40x
> > > + default y
> > > + select 405EX
> > > + help
> > > + This option enables support for the AMCC PPC405EX evaluation board.
> > > +
> > > #config REDWOOD_5
> > > # bool "Redwood-5"
> > > # depends on 40x
> > > @@ -89,14 +97,17 @@ config 403GCX
> > > #depends on OAK
> > > select IBM405_ERR51
> > >
> > > +config 405EP
> > > + bool
> > > +
> > > +config 405EX
> > > + bool
> > > +
> >
> > Do you really need config options for 405EP/EX? I don't seem them used
> > anywhere else in the code (and it's also contradictory to the whole new
> > multiplatform way of looking at stuff :).
> >
> > I know the 405/440 is still somewhat #ifdef:ed on the cpu here and there,
> > but since this doesn't add any such code I don't see a need for the config
> > options?
>
> Yes, I'm still used to needing these defines from arch/ppc (for example for
> the 4xx EMAC driver). But its possible, that we really don't need it at all
> in arch/powerpc with all the device tree information. Not sure though.
>
> Josh, what do you think? Should I remove the 405EX define completely?
If it's not needed, it can go. As Olof said, it doesn't appear to be
used anywhere in the code so I think it's fine.
One question I do have is if 405EX and 405EP need any of the 405GP
errata config options selected. I would like to think those don't apply
because the hardware is fixed, but I haven't checked to be sure.
josh
^ permalink raw reply
* [PATCH 3/3] Platforms shouldn't mess with ROOT_DEV
From: Grant Likely @ 2007-10-10 18:48 UTC (permalink / raw)
To: paulus, linuxppc-dev, galak, arnd, linas, benh, geoffrey.levand
In-Reply-To: <20071010184542.13609.70984.stgit@trillian.cg.shawcable.net>
From: Grant Likely <grant.likely@secretlab.ca>
There is no good reason for board platform code to mess with the ROOT_DEV.
Remove it from all in-tree platforms except powermac
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---
arch/powerpc/platforms/52xx/efika.c | 9 ---------
arch/powerpc/platforms/52xx/lite5200.c | 12 ------------
arch/powerpc/platforms/cell/setup.c | 5 -----
arch/powerpc/platforms/celleb/setup.c | 5 -----
arch/powerpc/platforms/chrp/setup.c | 10 ----------
arch/powerpc/platforms/pseries/setup.c | 5 -----
6 files changed, 0 insertions(+), 46 deletions(-)
diff --git a/arch/powerpc/platforms/52xx/efika.c b/arch/powerpc/platforms/52xx/efika.c
index 6fc17fa..a0da70c 100644
--- a/arch/powerpc/platforms/52xx/efika.c
+++ b/arch/powerpc/platforms/52xx/efika.c
@@ -180,15 +180,6 @@ static void __init efika_setup_arch(void)
{
rtas_initialize();
-#ifdef CONFIG_BLK_DEV_INITRD
- initrd_below_start_ok = 1;
-
- if (initrd_start)
- ROOT_DEV = Root_RAM0;
- else
-#endif
- ROOT_DEV = Root_SDA2; /* sda2 (sda1 is for the kernel) */
-
efika_pcisetup();
#ifdef CONFIG_PM
diff --git a/arch/powerpc/platforms/52xx/lite5200.c b/arch/powerpc/platforms/52xx/lite5200.c
index 0caa3d9..a0b4934 100644
--- a/arch/powerpc/platforms/52xx/lite5200.c
+++ b/arch/powerpc/platforms/52xx/lite5200.c
@@ -156,18 +156,6 @@ static void __init lite5200_setup_arch(void)
of_node_put(np);
}
#endif
-
-#ifdef CONFIG_BLK_DEV_INITRD
- if (initrd_start)
- ROOT_DEV = Root_RAM0;
- else
-#endif
-#ifdef CONFIG_ROOT_NFS
- ROOT_DEV = Root_NFS;
-#else
- ROOT_DEV = Root_HDA1;
-#endif
-
}
/*
diff --git a/arch/powerpc/platforms/cell/setup.c b/arch/powerpc/platforms/cell/setup.c
index db66542..3d679b1 100644
--- a/arch/powerpc/platforms/cell/setup.c
+++ b/arch/powerpc/platforms/cell/setup.c
@@ -161,11 +161,6 @@ static void __init cell_setup_arch(void)
/* init to some ~sane value until calibrate_delay() runs */
loops_per_jiffy = 50000000;
- if (ROOT_DEV == 0) {
- printk("No ramdisk, default root is /dev/hda2\n");
- ROOT_DEV = Root_HDA2;
- }
-
/* Find and initialize PCI host bridges */
init_pci_config_tokens();
find_and_init_phbs();
diff --git a/arch/powerpc/platforms/celleb/setup.c b/arch/powerpc/platforms/celleb/setup.c
index 0f1dddb..1769d75 100644
--- a/arch/powerpc/platforms/celleb/setup.c
+++ b/arch/powerpc/platforms/celleb/setup.c
@@ -101,11 +101,6 @@ static void __init celleb_setup_arch(void)
/* init to some ~sane value until calibrate_delay() runs */
loops_per_jiffy = 50000000;
- if (ROOT_DEV == 0) {
- printk("No ramdisk, default root is /dev/hda2\n");
- ROOT_DEV = Root_HDA2;
- }
-
#ifdef CONFIG_DUMMY_CONSOLE
conswitchp = &dummy_con;
#endif
diff --git a/arch/powerpc/platforms/chrp/setup.c b/arch/powerpc/platforms/chrp/setup.c
index 96498ad..5930626 100644
--- a/arch/powerpc/platforms/chrp/setup.c
+++ b/arch/powerpc/platforms/chrp/setup.c
@@ -290,16 +290,6 @@ void __init chrp_setup_arch(void)
ppc_md.set_rtc_time = rtas_set_rtc_time;
}
-#ifdef CONFIG_BLK_DEV_INITRD
- /* this is fine for chrp */
- initrd_below_start_ok = 1;
-
- if (initrd_start)
- ROOT_DEV = Root_RAM0;
- else
-#endif
- ROOT_DEV = Root_SDA2; /* sda2 (sda1 is for the kernel) */
-
/* On pegasos, enable the L2 cache if not already done by OF */
pegasos_set_l2cr();
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c
index f0b7146..fdb9b1c 100644
--- a/arch/powerpc/platforms/pseries/setup.c
+++ b/arch/powerpc/platforms/pseries/setup.c
@@ -257,11 +257,6 @@ static void __init pSeries_setup_arch(void)
/* init to some ~sane value until calibrate_delay() runs */
loops_per_jiffy = 50000000;
- if (ROOT_DEV == 0) {
- printk("No ramdisk, default root is /dev/sda2\n");
- ROOT_DEV = Root_SDA2;
- }
-
fwnmi_init();
/* Find and initialize PCI host bridges */
^ permalink raw reply related
* [PATCH 1/3] Only call ppc_md.setup_arch() if it is provided.
From: Grant Likely @ 2007-10-10 18:48 UTC (permalink / raw)
To: paulus, linuxppc-dev, galak, arnd, linas, benh, geoffrey.levand
In-Reply-To: <20071010184542.13609.70984.stgit@trillian.cg.shawcable.net>
From: Grant Likely <grant.likely@secretlab.ca>
This allows platforms which don't have anything to do at setup_arch time
(like a bunch of the 4xx platforms) to eliminate an empty setup_arch hook.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---
arch/powerpc/kernel/setup_32.c | 3 ++-
arch/powerpc/kernel/setup_64.c | 3 ++-
include/asm-powerpc/machdep.h | 2 +-
3 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c
index 7474502..cd870a8 100644
--- a/arch/powerpc/kernel/setup_32.c
+++ b/arch/powerpc/kernel/setup_32.c
@@ -290,7 +290,8 @@ void __init setup_arch(char **cmdline_p)
conswitchp = &dummy_con;
#endif
- ppc_md.setup_arch();
+ if (ppc_md.setup_arch)
+ ppc_md.setup_arch();
if ( ppc_md.progress ) ppc_md.progress("arch: exit", 0x3eab);
paging_init();
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c
index 3089eae..008ab68 100644
--- a/arch/powerpc/kernel/setup_64.c
+++ b/arch/powerpc/kernel/setup_64.c
@@ -530,7 +530,8 @@ void __init setup_arch(char **cmdline_p)
conswitchp = &dummy_con;
#endif
- ppc_md.setup_arch();
+ if (ppc_md.setup_arch)
+ ppc_md.setup_arch();
paging_init();
ppc64_boot_msg(0x15, "Setup Done");
diff --git a/include/asm-powerpc/machdep.h b/include/asm-powerpc/machdep.h
index 71c6e7e..cc7c17f 100644
--- a/include/asm-powerpc/machdep.h
+++ b/include/asm-powerpc/machdep.h
@@ -99,7 +99,7 @@ struct machdep_calls {
#endif /* CONFIG_PPC64 */
int (*probe)(void);
- void (*setup_arch)(void);
+ void (*setup_arch)(void); /* Optional, may be NULL */
void (*init_early)(void);
/* Optional, may be NULL. */
void (*show_cpuinfo)(struct seq_file *m);
^ permalink raw reply related
* [PATCH 0/3] Miscellaneous powerpc patches
From: Grant Likely @ 2007-10-10 18:48 UTC (permalink / raw)
To: paulus, linuxppc-dev, galak, arnd, linas, benh, geoffrey.levand
Paulus,
Here are some patches that have been received favorably on the mailing
list. However, they aren't specific to one particular platform, so Kumar
suggested that they should probably go straight to your tree.
If they look okay to you, can you please pick them up?
Thanks,
g.
--
Grant Likely, B.Sc. P.Eng.
Secret Lab Technologies Ltd.
^ permalink raw reply
* [PATCH 2/3] Remove empty ppc_md.setup_arch hooks.
From: Grant Likely @ 2007-10-10 18:48 UTC (permalink / raw)
To: paulus, linuxppc-dev, galak, arnd, linas, benh, geoffrey.levand
In-Reply-To: <20071010184542.13609.70984.stgit@trillian.cg.shawcable.net>
From: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---
arch/powerpc/platforms/40x/virtex.c | 5 -----
arch/powerpc/platforms/40x/walnut.c | 5 -----
arch/powerpc/platforms/44x/bamboo.c | 5 -----
arch/powerpc/platforms/44x/ebony.c | 5 -----
arch/powerpc/platforms/44x/sequoia.c | 5 -----
5 files changed, 0 insertions(+), 25 deletions(-)
diff --git a/arch/powerpc/platforms/40x/virtex.c b/arch/powerpc/platforms/40x/virtex.c
index b52aa94..14bbc32 100644
--- a/arch/powerpc/platforms/40x/virtex.c
+++ b/arch/powerpc/platforms/40x/virtex.c
@@ -36,14 +36,9 @@ static int __init virtex_probe(void)
return 1;
}
-static void __init virtex_setup_arch(void)
-{
-}
-
define_machine(virtex) {
.name = "Xilinx Virtex",
.probe = virtex_probe,
- .setup_arch = virtex_setup_arch,
.init_IRQ = xilinx_intc_init_tree,
.get_irq = xilinx_intc_get_irq,
.calibrate_decr = generic_calibrate_decr,
diff --git a/arch/powerpc/platforms/40x/walnut.c b/arch/powerpc/platforms/40x/walnut.c
index c17fdf2..eb0c136 100644
--- a/arch/powerpc/platforms/40x/walnut.c
+++ b/arch/powerpc/platforms/40x/walnut.c
@@ -53,14 +53,9 @@ static int __init walnut_probe(void)
return 1;
}
-static void __init walnut_setup_arch(void)
-{
-}
-
define_machine(walnut) {
.name = "Walnut",
.probe = walnut_probe,
- .setup_arch = walnut_setup_arch,
.progress = udbg_progress,
.init_IRQ = uic_init_tree,
.get_irq = uic_get_irq,
diff --git a/arch/powerpc/platforms/44x/bamboo.c b/arch/powerpc/platforms/44x/bamboo.c
index 9bc45de..470e1a3 100644
--- a/arch/powerpc/platforms/44x/bamboo.c
+++ b/arch/powerpc/platforms/44x/bamboo.c
@@ -50,14 +50,9 @@ static int __init bamboo_probe(void)
return 1;
}
-static void __init bamboo_setup_arch(void)
-{
-}
-
define_machine(bamboo) {
.name = "Bamboo",
.probe = bamboo_probe,
- .setup_arch = bamboo_setup_arch,
.progress = udbg_progress,
.init_IRQ = uic_init_tree,
.get_irq = uic_get_irq,
diff --git a/arch/powerpc/platforms/44x/ebony.c b/arch/powerpc/platforms/44x/ebony.c
index 5a7fec8..40e18fc 100644
--- a/arch/powerpc/platforms/44x/ebony.c
+++ b/arch/powerpc/platforms/44x/ebony.c
@@ -57,14 +57,9 @@ static int __init ebony_probe(void)
return 1;
}
-static void __init ebony_setup_arch(void)
-{
-}
-
define_machine(ebony) {
.name = "Ebony",
.probe = ebony_probe,
- .setup_arch = ebony_setup_arch,
.progress = udbg_progress,
.init_IRQ = uic_init_tree,
.get_irq = uic_get_irq,
diff --git a/arch/powerpc/platforms/44x/sequoia.c b/arch/powerpc/platforms/44x/sequoia.c
index 7d0d9d5..30700b3 100644
--- a/arch/powerpc/platforms/44x/sequoia.c
+++ b/arch/powerpc/platforms/44x/sequoia.c
@@ -50,14 +50,9 @@ static int __init sequoia_probe(void)
return 1;
}
-static void __init sequoia_setup_arch(void)
-{
-}
-
define_machine(sequoia) {
.name = "Sequoia",
.probe = sequoia_probe,
- .setup_arch = sequoia_setup_arch,
.progress = udbg_progress,
.init_IRQ = uic_init_tree,
.get_irq = uic_get_irq,
^ permalink raw reply related
* [PATCH 1/3] XilinxFB: use pdata to pass around framebuffer parameters.
From: Grant Likely @ 2007-10-10 18:31 UTC (permalink / raw)
To: linux-fbdev-devel, akonovalov, linuxppc-dev, adaplas, jwboyer
In-Reply-To: <20071010182920.12852.41903.stgit@trillian.cg.shawcable.net>
From: Grant Likely <grant.likely@secretlab.ca>
The call to xilinxfb_assign is getting unwieldy when adding features
to the Xilinx framebuffer driver. Change xilinxfb_assign() to accept
a pointer to a xilinxfb_platform_data structure to prepare for adding
additition configuration options.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---
drivers/video/xilinxfb.c | 43 +++++++++++++++++++++++--------------------
1 files changed, 23 insertions(+), 20 deletions(-)
diff --git a/drivers/video/xilinxfb.c b/drivers/video/xilinxfb.c
index dec602c..b3b57f4 100644
--- a/drivers/video/xilinxfb.c
+++ b/drivers/video/xilinxfb.c
@@ -84,6 +84,12 @@
#define PALETTE_ENTRIES_NO 16 /* passed to fb_alloc_cmap() */
/*
+ * Default xilinxfb configuration
+ */
+static struct xilinxfb_platform_data xilinx_fb_default_pdata = {
+};
+
+/*
* Here are the default fb_fix_screeninfo and fb_var_screeninfo structures
*/
static struct fb_fix_screeninfo xilinx_fb_fix = {
@@ -207,7 +213,7 @@ static struct fb_ops xilinxfb_ops =
*/
static int xilinxfb_assign(struct device *dev, unsigned long physaddr,
- int width_mm, int height_mm, int rotate)
+ struct xilinxfb_platform_data *pdata)
{
struct xilinxfb_drvdata *drvdata;
int rc;
@@ -253,7 +259,7 @@ static int xilinxfb_assign(struct device *dev, unsigned long physaddr,
/* Turn on the display */
drvdata->reg_ctrl_default = REG_CTRL_ENABLE;
- if (rotate)
+ if (pdata->rotate_screen)
drvdata->reg_ctrl_default |= REG_CTRL_ROTATE;
xilinx_fb_out_be32(drvdata, REG_CTRL, drvdata->reg_ctrl_default);
@@ -267,8 +273,8 @@ static int xilinxfb_assign(struct device *dev, unsigned long physaddr,
drvdata->info.flags = FBINFO_DEFAULT;
drvdata->info.var = xilinx_fb_var;
- xilinx_fb_var.height = height_mm;
- xilinx_fb_var.width = width_mm;
+ xilinx_fb_var.height = pdata->screen_height_mm;
+ xilinx_fb_var.width = pdata->screen_width_mm;
/* Allocate a colour map */
rc = fb_alloc_cmap(&drvdata->info.cmap, PALETTE_ENTRIES_NO, 0);
@@ -349,9 +355,6 @@ xilinxfb_platform_probe(struct platform_device *pdev)
{
struct xilinxfb_platform_data *pdata;
struct resource *res;
- int width_mm = 0;
- int height_mm = 0;
- int rotate = 0;
/* Find the registers address */
res = platform_get_resource(pdev, IORESOURCE_IO, 0);
@@ -361,15 +364,12 @@ xilinxfb_platform_probe(struct platform_device *pdev)
}
/* If a pdata structure is provided, then extract the parameters */
- pdata = pdev->dev.platform_data;
- if (pdata) {
- height_mm = pdata->screen_height_mm;
- width_mm = pdata->screen_width_mm;
- rotate = pdata->rotate_screen ? 1 : 0;
- }
+ if (pdev->dev.platform_data)
+ pdata = pdev->dev.platform_data;
+ else
+ pdata = &xilinx_fb_default_pdata;
- return xilinxfb_assign(&pdev->dev, res->start, width_mm, height_mm,
- rotate);
+ return xilinxfb_assign(&pdev->dev, res->start, pdata);
}
static int
@@ -398,9 +398,12 @@ xilinxfb_of_probe(struct of_device *op, const struct of_device_id *match)
{
struct resource res;
const u32 *prop;
- int width = 0, height = 0, rotate = 0;
+ struct xilinxfb_platform_data pdata;
int size, rc;
+ /* Copy with the default pdata (not a ptr reference!) */
+ pdata = xilinx_fb_default_pdata;
+
dev_dbg(&op->dev, "xilinxfb_of_probe(%p, %p)\n", op, match);
rc = of_address_to_resource(op->node, 0, &res);
@@ -411,14 +414,14 @@ xilinxfb_of_probe(struct of_device *op, const struct of_device_id *match)
prop = of_get_property(op->node, "display-number", &size);
if ((prop) && (size >= sizeof(u32)*2)) {
- width = prop[0];
- height = prop[1];
+ pdata.screen_width_mm = prop[0];
+ pdata.screen_height_mm = prop[1];
}
if (of_find_property(op->node, "rotate-display", NULL))
- rotate = 1;
+ pdata.rotate_screen = 1;
- return xilinxfb_assign(&op->dev, res.start, width, height, rotate);
+ return xilinxfb_assign(&op->dev, res.start, &pdata);
}
static int __devexit xilinxfb_of_remove(struct of_device *op)
^ permalink raw reply related
* [PATCH 3/3] XilinxFB: Allow fixed framebuffer base address
From: Grant Likely @ 2007-10-10 18:31 UTC (permalink / raw)
To: linux-fbdev-devel, akonovalov, linuxppc-dev, adaplas, jwboyer
In-Reply-To: <20071010182920.12852.41903.stgit@trillian.cg.shawcable.net>
From: Grant Likely <grant.likely@secretlab.ca>
Allow a fixed framebuffer address to be assigned to the framebuffer device
instead of allocating the framebuffer from the consistent memory pool.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---
drivers/video/xilinxfb.c | 22 ++++++++++++++++------
include/linux/xilinxfb.h | 5 +++++
2 files changed, 21 insertions(+), 6 deletions(-)
diff --git a/drivers/video/xilinxfb.c b/drivers/video/xilinxfb.c
index c617412..6ef99b2 100644
--- a/drivers/video/xilinxfb.c
+++ b/drivers/video/xilinxfb.c
@@ -117,6 +117,7 @@ struct xilinxfb_drvdata {
void *fb_virt; /* virt. address of the frame buffer */
dma_addr_t fb_phys; /* phys. address of the frame buffer */
+ int fb_alloced; /* Flag, was the fb memory alloced? */
u32 reg_ctrl_default;
@@ -235,8 +236,15 @@ static int xilinxfb_assign(struct device *dev, unsigned long physaddr,
}
/* Allocate the framebuffer memory */
- drvdata->fb_virt = dma_alloc_coherent(dev, PAGE_ALIGN(fbsize),
- &drvdata->fb_phys, GFP_KERNEL);
+ if (pdata->fb_phys) {
+ drvdata->fb_phys = pdata->fb_phys;
+ drvdata->fb_virt = ioremap(pdata->fb_phys, fbsize);
+ } else {
+ drvdata->fb_alloced = 1;
+ drvdata->fb_virt = dma_alloc_coherent(dev, PAGE_ALIGN(fbsize),
+ &drvdata->fb_phys, GFP_KERNEL);
+ }
+
if (!drvdata->fb_virt) {
dev_err(dev, "Could not allocate frame buffer memory\n");
rc = -ENOMEM;
@@ -300,8 +308,9 @@ err_regfb:
fb_dealloc_cmap(&drvdata->info.cmap);
err_cmap:
- dma_free_coherent(dev, PAGE_ALIGN(fbsize), drvdata->fb_virt,
- drvdata->fb_phys);
+ if (drvdata->fb_alloced)
+ dma_free_coherent(dev, PAGE_ALIGN(fbsize), drvdata->fb_virt,
+ drvdata->fb_phys);
/* Turn off the display */
xilinx_fb_out_be32(drvdata, REG_CTRL, 0);
@@ -330,8 +339,9 @@ static int xilinxfb_release(struct device *dev)
fb_dealloc_cmap(&drvdata->info.cmap);
- dma_free_coherent(dev, PAGE_ALIGN(drvdata->info.fix.smem_len),
- drvdata->fb_virt, drvdata->fb_phys);
+ if (drvdata->fb_alloced)
+ dma_free_coherent(dev, PAGE_ALIGN(drvdata->info.fix.smem_len),
+ drvdata->fb_virt, drvdata->fb_phys);
/* Turn off the display */
xilinx_fb_out_be32(drvdata, REG_CTRL, 0);
diff --git a/include/linux/xilinxfb.h b/include/linux/xilinxfb.h
index 199a1ee..f2463f5 100644
--- a/include/linux/xilinxfb.h
+++ b/include/linux/xilinxfb.h
@@ -20,6 +20,11 @@ struct xilinxfb_platform_data {
u32 screen_width_mm;
u32 xres, yres; /* resolution of screen in pixels */
u32 xvirt, yvirt; /* resolution of memory buffer */
+
+ /* Physical address of framebuffer memory; If non-zero, driver
+ * will use provided memory address instead of allocating one from
+ * the consistent pool. */
+ u32 fb_phys;
};
#endif /* __XILINXFB_H__ */
^ permalink raw reply related
* [PATCH 0/3] More XilinxFB changes
From: Grant Likely @ 2007-10-10 18:31 UTC (permalink / raw)
To: linux-fbdev-devel, akonovalov, linuxppc-dev, adaplas, jwboyer
Here are some more changes on the xilinxfb driver. These changes add the
ability to specify a custom resolution or framebuffer physical address.
Useful for FPGA designs which use a modified xilinxfb device.
Please review and comment.
Cheers,
g.
--
Grant Likely, B.Sc. P.Eng.
Secret Lab Technologies Ltd.
^ permalink raw reply
* [PATCH 2/3] Xilinxfb: Add support for custom screen resolution
From: Grant Likely @ 2007-10-10 18:31 UTC (permalink / raw)
To: linux-fbdev-devel, akonovalov, linuxppc-dev, adaplas, jwboyer
In-Reply-To: <20071010182920.12852.41903.stgit@trillian.cg.shawcable.net>
From: Grant Likely <grant.likely@secretlab.ca>
Some custom implementations of the xilinx fb can use resolutions other
than 640x480. This patch allows the resolution to be specified in the
device tree or the xilinx_platform_data structure.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---
drivers/video/xilinxfb.c | 71 +++++++++++++++++++++++++++++-----------------
include/linux/xilinxfb.h | 6 +++-
2 files changed, 49 insertions(+), 28 deletions(-)
diff --git a/drivers/video/xilinxfb.c b/drivers/video/xilinxfb.c
index b3b57f4..c617412 100644
--- a/drivers/video/xilinxfb.c
+++ b/drivers/video/xilinxfb.c
@@ -70,12 +70,6 @@
*/
#define BYTES_PER_PIXEL 4
#define BITS_PER_PIXEL (BYTES_PER_PIXEL * 8)
-#define XRES 640
-#define YRES 480
-#define XRES_VIRTUAL 1024
-#define YRES_VIRTUAL YRES
-#define LINE_LENGTH (XRES_VIRTUAL * BYTES_PER_PIXEL)
-#define FB_SIZE (YRES_VIRTUAL * LINE_LENGTH)
#define RED_SHIFT 16
#define GREEN_SHIFT 8
@@ -87,6 +81,10 @@
* Default xilinxfb configuration
*/
static struct xilinxfb_platform_data xilinx_fb_default_pdata = {
+ .xres = 640,
+ .yres = 480,
+ .xvirt = 1024,
+ .yvirt = 480;
};
/*
@@ -96,17 +94,10 @@ static struct fb_fix_screeninfo xilinx_fb_fix = {
.id = "Xilinx",
.type = FB_TYPE_PACKED_PIXELS,
.visual = FB_VISUAL_TRUECOLOR,
- .smem_len = FB_SIZE,
- .line_length = LINE_LENGTH,
.accel = FB_ACCEL_NONE
};
static struct fb_var_screeninfo xilinx_fb_var = {
- .xres = XRES,
- .yres = YRES,
- .xres_virtual = XRES_VIRTUAL,
- .yres_virtual = YRES_VIRTUAL,
-
.bits_per_pixel = BITS_PER_PIXEL,
.red = { RED_SHIFT, 8, 0 },
@@ -217,6 +208,7 @@ static int xilinxfb_assign(struct device *dev, unsigned long physaddr,
{
struct xilinxfb_drvdata *drvdata;
int rc;
+ int fbsize = pdata->xvirt * pdata->yvirt * BYTES_PER_PIXEL;
/* Allocate the driver data region */
drvdata = kzalloc(sizeof(*drvdata), GFP_KERNEL);
@@ -243,7 +235,7 @@ static int xilinxfb_assign(struct device *dev, unsigned long physaddr,
}
/* Allocate the framebuffer memory */
- drvdata->fb_virt = dma_alloc_coherent(dev, PAGE_ALIGN(FB_SIZE),
+ drvdata->fb_virt = dma_alloc_coherent(dev, PAGE_ALIGN(fbsize),
&drvdata->fb_phys, GFP_KERNEL);
if (!drvdata->fb_virt) {
dev_err(dev, "Could not allocate frame buffer memory\n");
@@ -252,7 +244,7 @@ static int xilinxfb_assign(struct device *dev, unsigned long physaddr,
}
/* Clear (turn to black) the framebuffer */
- memset_io((void __iomem *)drvdata->fb_virt, 0, FB_SIZE);
+ memset_io((void __iomem *)drvdata->fb_virt, 0, fbsize);
/* Tell the hardware where the frame buffer is */
xilinx_fb_out_be32(drvdata, REG_FB_ADDR, drvdata->fb_phys);
@@ -269,12 +261,18 @@ static int xilinxfb_assign(struct device *dev, unsigned long physaddr,
drvdata->info.fbops = &xilinxfb_ops;
drvdata->info.fix = xilinx_fb_fix;
drvdata->info.fix.smem_start = drvdata->fb_phys;
+ drvdata->info.fix.smem_len = fbsize;
+ drvdata->info.fix.line_length = pdata->xvirt * BYTES_PER_PIXEL;
+
drvdata->info.pseudo_palette = drvdata->pseudo_palette;
drvdata->info.flags = FBINFO_DEFAULT;
drvdata->info.var = xilinx_fb_var;
-
- xilinx_fb_var.height = pdata->screen_height_mm;
- xilinx_fb_var.width = pdata->screen_width_mm;
+ drvdata->info.var.height = pdata->screen_height_mm;
+ drvdata->info.var.width = pdata->screen_width_mm;
+ drvdata->info.var.xres = pdata->xres;
+ drvdata->info.var.yres = pdata->yres;
+ drvdata->info.var.xres_virtual = pdata->xvirt;
+ drvdata->info.var.yres_virtual = pdata->yvirt;
/* Allocate a colour map */
rc = fb_alloc_cmap(&drvdata->info.cmap, PALETTE_ENTRIES_NO, 0);
@@ -294,14 +292,15 @@ static int xilinxfb_assign(struct device *dev, unsigned long physaddr,
/* Put a banner in the log (for DEBUG) */
dev_dbg(dev, "regs: phys=%lx, virt=%p\n", physaddr, drvdata->regs);
dev_dbg(dev, "fb: phys=%p, virt=%p, size=%x\n",
- (void*)drvdata->fb_phys, drvdata->fb_virt, FB_SIZE);
+ (void*)drvdata->fb_phys, drvdata->fb_virt, fbsize);
+
return 0; /* success */
err_regfb:
fb_dealloc_cmap(&drvdata->info.cmap);
err_cmap:
- dma_free_coherent(dev, PAGE_ALIGN(FB_SIZE), drvdata->fb_virt,
+ dma_free_coherent(dev, PAGE_ALIGN(fbsize), drvdata->fb_virt,
drvdata->fb_phys);
/* Turn off the display */
xilinx_fb_out_be32(drvdata, REG_CTRL, 0);
@@ -331,8 +330,8 @@ static int xilinxfb_release(struct device *dev)
fb_dealloc_cmap(&drvdata->info.cmap);
- dma_free_coherent(dev, PAGE_ALIGN(FB_SIZE), drvdata->fb_virt,
- drvdata->fb_phys);
+ dma_free_coherent(dev, PAGE_ALIGN(drvdata->info.fix.smem_len),
+ drvdata->fb_virt, drvdata->fb_phys);
/* Turn off the display */
xilinx_fb_out_be32(drvdata, REG_CTRL, 0);
@@ -364,10 +363,18 @@ xilinxfb_platform_probe(struct platform_device *pdev)
}
/* If a pdata structure is provided, then extract the parameters */
- if (pdev->dev.platform_data)
+ pdata = &xilinx_fb_default_pdata;
+ if (pdev->dev.platform_data) {
pdata = pdev->dev.platform_data;
- else
- pdata = &xilinx_fb_default_pdata;
+ if (!pdata->xres)
+ pdata->xres = xilinx_fb_default_pdata.xres;
+ if (!pdata->yres)
+ pdata->yres = xilinx_fb_default_pdata.yres;
+ if (!pdata->xvirt)
+ pdata->xvirt = xilinx_fb_default_pdata.xvirt;
+ if (!pdata->yvirt)
+ pdata->yvirt = xilinx_fb_default_pdata.yvirt;
+ }
return xilinxfb_assign(&pdev->dev, res->start, pdata);
}
@@ -412,12 +419,24 @@ xilinxfb_of_probe(struct of_device *op, const struct of_device_id *match)
return rc;
}
- prop = of_get_property(op->node, "display-number", &size);
+ prop = of_get_property(op->node, "phys-size", &size);
if ((prop) && (size >= sizeof(u32)*2)) {
pdata.screen_width_mm = prop[0];
pdata.screen_height_mm = prop[1];
}
+ prop = of_get_property(op->node, "resolution", &size);
+ if ((prop) && (size >= sizeof(u32)*2)) {
+ pdata.xres = prop[0];
+ pdata.yres = prop[1];
+ }
+
+ prop = of_get_property(op->node, "virtual-resolution", &size);
+ if ((prop) && (size >= sizeof(u32)*2)) {
+ pdata.xvirt = prop[0];
+ pdata.yvirt = prop[1];
+ }
+
if (of_find_property(op->node, "rotate-display", NULL))
pdata.rotate_screen = 1;
diff --git a/include/linux/xilinxfb.h b/include/linux/xilinxfb.h
index 9ad984d..199a1ee 100644
--- a/include/linux/xilinxfb.h
+++ b/include/linux/xilinxfb.h
@@ -15,9 +15,11 @@
/* ML300/403 reference design framebuffer driver platform data struct */
struct xilinxfb_platform_data {
- u32 rotate_screen;
- u32 screen_height_mm;
+ u32 rotate_screen; /* Flag to rotate display 180 degrees */
+ u32 screen_height_mm; /* Physical dimentions of screen in mm */
u32 screen_width_mm;
+ u32 xres, yres; /* resolution of screen in pixels */
+ u32 xvirt, yvirt; /* resolution of memory buffer */
};
#endif /* __XILINXFB_H__ */
^ permalink raw reply related
* Re: [PATCH] Device tree bindings for Xilinx devices
From: Grant Likely @ 2007-10-10 16:39 UTC (permalink / raw)
To: linuxppc-dev, Segher Boessenkool, Josh Boyer, David Gibson
In-Reply-To: <20071008075127.9887.38702.stgit@trillian.cg.shawcable.net>
Anybody have any comments on this? Segher? David?
Cheers,
g.
On 10/8/07, Grant Likely <grant.likely@secretlab.ca> wrote:
> From: Grant Likely <grant.likely@secretlab.ca>
>
> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
> ---
>
> This is a first draft, please review and comment.
>
> On a side node, I think booting-without-of.txt could get really unwieldly
> in the near future. Perhaps the device tree bindings should be organized
> differently and separated from the functional description of device tree
> usage. Thoughts?
>
> Cheers,
> g.
>
> Documentation/powerpc/booting-without-of.txt | 58 ++++++++++++++++++++++++++
> 1 files changed, 58 insertions(+), 0 deletions(-)
>
> diff --git a/Documentation/powerpc/booting-without-of.txt b/Documentation/powerpc/booting-without-of.txt
> index 20e0e6c..a6d6056 100644
> --- a/Documentation/powerpc/booting-without-of.txt
> +++ b/Documentation/powerpc/booting-without-of.txt
> @@ -1850,6 +1850,64 @@ platforms are moved over to use the flattened-device-tree model.
>
> More devices will be defined as this spec matures.
>
> + l) Xilinx ML300 Framebuffer
> +
> + Simple framebuffer device from the ML300 reference design (also on the
> + ML403 reference design as well as others).
> +
> + Required properties:
> + - compatible : Must include "xilinx,ml300-fb"
> + - reg : offset and length of the framebuffer register set
> +
> + Optional properties:
> + - resolution : <xres yres> pixel resolution of framebuffer. Some
> + implementations use a different resolution. Default
> + is <d#640 d#480>
> + - virt-resolution : <xvirt yvirt> Size of framebuffer in memory.
> + Default is <d#1024 d#480>.
> + - rotate-display : rotate display 180 degrees.
> + - display-number : Logical number of display
> +
> + m) Xilinx SystemACE
> +
> + The Xilinx SystemACE device is used to program FPGAs from an FPGA
> + bitstream stored on a CF card. It can also be used as a generic CF
> + interface device.
> +
> + Required properties:
> + - compatible : Must include "xilinx,sysace"
> + - reg : offset and length of SystemACE register set
> +
> + Recommended properties:
> + - interrupt-parent, interrupts : Connection of device irq signal.
> +
> + Optional properties:
> + - number : logical number of the SystemACE device based at 0.
> + - 8-bit (empty) : Set this property if the SystemACE must be in 8 bit mode
> +
> + n) Xilinx EMAC and Xilinx TEMAC
> +
> + Xilinx Ethernet devices. Uses common properties from other Ethernet
> + devices with the following constraints:
> +
> + Required properties:
> + - compatible : Must include one of: "xilinx,plb-temac",
> + "xilinx,plb-emac", "xilinx-opb-emac"
> + - dma-mode : Must be one of "none", "simple", "sg" (sg == scatter gather)
> +
> + o) Xilinx Uartlite
> +
> + Xilinx uartlite devices are simple fixed speed serial ports. Uartlite
> + ports should be described in a node with the following properties.
> +
> + Requred properties:
> + - compatible : Must include "xilinx,uartlite"
> + - reg : offset and length of uartlite register set
> +
> + Recommended properties:
> + - port-number : logical port number of uartlite device based at 0.
> + - interrupt-parent, interrupts : Connection of device irq signal.
> +
> VII - Specifying interrupt information for devices
> ===================================================
>
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
>
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
grant.likely@secretlab.ca
(403) 399-0195
^ permalink raw reply
* Re: include/asm/cpm2.h:14:21: error: asm/cpm.h: No such file or directory
From: Scott Wood @ 2007-10-10 16:39 UTC (permalink / raw)
To: Misbah khan; +Cc: linuxppc-dev
In-Reply-To: <13129025.post@talk.nabble.com>
On Tue, Oct 09, 2007 at 09:03:13PM -0700, Misbah khan wrote:
>
> Please Let me know the Status
>
> Misbah
Are you suddenly Timur's boss? :-)
The issue was a misapplied patch in Kumar's tree. It has been fixed, as he
pointed out in another post in this thread.
-Scott
^ permalink raw reply
* Re: [PATCH v2] powerpc: don't enable cpu hotplug on mpic-based pseries
From: Olof Johansson @ 2007-10-10 16:43 UTC (permalink / raw)
To: Milton Miller
Cc: Stephen Rothwell, Greg Kroah-Hartman, linux-kernel, linuxppc-dev,
Paul Mackerras, Linus Torvalds
In-Reply-To: <200710101008.l9AA8hIG084068@sullivan.realtime.net>
On Wed, Oct 10, 2007 at 05:08:44AM -0500, Milton Miller wrote:
> Olof's patch searched the device-tree again, looking for an mpic. This
> code instead checks that we found an xics the first time by checking the
> init function.
I'm glad you find the kernel so perfect that your best use of time is
to tweak the code added in a non-critical path (performance-wise) with
a new way of checking for hardware features (no other code in the kernel
checks ppc_md function pointers for that purpose).
Pseries can only have mpic or xics, so it's not like it matters if we
check for mpic or !xics, either.
But hey, any color bike shed will do, and I don't care which one Paul
chooses to merge. I will not waste more time debating this simple patch
though. :)
-Olof
^ permalink raw reply
* Please pull linux-2.6-mpc52xx.git
From: Grant Likely @ 2007-10-10 16:30 UTC (permalink / raw)
To: Paul Mackerras, linuxppc-dev, Sylvain Munaut
Paulus,
Sylvain has asked if I would like to help with the mpc52xx
maintainership. If it's okay by you, here is a patch that adds me as
co-maintainer for the mpc52xx platform along with 3 other mpc52xx
related fixes.
Sylvain, can you please reply to this message confirming that this is
what we talked about?
Thanks,
g.
The following changes since commit dcccb37e98e0444b0c6a03b303855771aa463c96:
Grant Likely (1):
[POWERPC] Lite5200: Use comma delimiter format for lists in device tree
are available in the git repository at:
git://git.secretlab.ca/git/linux-2.6-mpc52xx.git for-2.6.24
Grant Likely (4):
[POWERPC] MPC52xx: Drop show_cpuinfo platform hooks from Lite5200
[POWERPC] MPC52xx: Trim includes on mpc5200 platform support code
[POWERPC] MPC5200: Don't make firmware fixups into common code
[POWERPC] Add co-maintainer for PowerPC MPC52xx platform
MAINTAINERS | 2 +
arch/powerpc/platforms/52xx/efika.c | 19 +-----
arch/powerpc/platforms/52xx/lite5200.c | 95 ++++++++++++++------------
arch/powerpc/platforms/52xx/mpc52xx_common.c | 38 ++++-------
arch/powerpc/platforms/52xx/mpc52xx_pic.c | 11 +---
include/asm-powerpc/mpc52xx.h | 2 +-
6 files changed, 68 insertions(+), 99 deletions(-)
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
grant.likely@secretlab.ca
(403) 399-0195
^ permalink raw reply
* Marvell 88se6121 in Kernel2.4
From: mike zheng @ 2007-10-10 16:29 UTC (permalink / raw)
To: linuxppc-dev
[-- Attachment #1: Type: text/plain, Size: 109 bytes --]
Hello,
Anyone has the source code of kernel2.4 device driver for Marvel 88se6121?
Thanks in advance,
Mike
[-- Attachment #2: Type: text/html, Size: 205 bytes --]
^ permalink raw reply
* Re: crash on shutdown on rs/6000 powerpc
From: Milton Miller @ 2007-10-10 16:18 UTC (permalink / raw)
To: Joel Schopp; +Cc: linuxppc-dev, Paul Mackerras
In-Reply-To: <470CF38F.3080809%40austin.ibm.com>
Joel Schoopp wrote:
>Paulus wrote:
>> [c00000003f923c40] c00000000003bff4 .xics_migrate_irqs_away+0x3c/0x20c
>> [c00000003f923d00] c000000000040d54 .pseries_cpu_disable+0x98/0xb4
>> [c00000003f923d80] c000000000028e4c .__cpu_disable+0x44/0x58
>> [c00000003f923df0] c00000000007e204 .take_cpu_down+0x34/0x60
>> [c00000003f923e70] c00000000008ba3c .do_stop+0x144/0x1e4
>> [c00000003f923f00] c00000000006fd74 .kthread+0x78/0xc4
>> [c00000003f923f90] c0000000000272a8 .kernel_thread+0x4c
>>
>> I don't have time tonight or tomorrow to track this down further. I'm
>> taking the kids to the coast tommorow. :)
>>
> This looks like the problem Olof and Milton sent out patches to fix. The
> Power3 shouldn't be doing cpu hotplug.
Paul's comment prompted both of us.
Actually, cpu_hotplug (offline calling rtas stop-self, not dlpar
remove) should be supported on POWER3 and RS64, its just that the
pseries disable code calls over into xics directly. offline support
would help preserve system uptime under a "failing processor"
scenerio.
To fix that, we need a mpic version of migrate_irqs_away. powermac
is using the "bury head in sand" approach for that right now (ie
if you bind an interrupt and offline all the cpus in the mask, the
interrupt won't be delivered until you reset the affinity). Its also
a broken in that bringing a cpu back online adds the cpu to all
interrupts not just those who have the cpu mask bit set.
milton
^ permalink raw reply
* Re: crash on shutdown on rs/6000 powerpc
From: Joel Schopp @ 2007-10-10 15:45 UTC (permalink / raw)
To: Paul Mackerras; +Cc: lkml, torvalds, linuxppc-dev
In-Reply-To: <18187.31582.236420.418530@cargo.ozlabs.ibm.com>
> [c00000003f923c40] c00000000003bff4 .xics_migrate_irqs_away+0x3c/0x20c
> [c00000003f923d00] c000000000040d54 .pseries_cpu_disable+0x98/0xb4
> [c00000003f923d80] c000000000028e4c .__cpu_disable+0x44/0x58
> [c00000003f923df0] c00000000007e204 .take_cpu_down+0x34/0x60
> [c00000003f923e70] c00000000008ba3c .do_stop+0x144/0x1e4
> [c00000003f923f00] c00000000006fd74 .kthread+0x78/0xc4
> [c00000003f923f90] c0000000000272a8 .kernel_thread+0x4c/0x68
>
> I don't have time tonight or tomorrow to track this down further. I'm
> taking the kids to the coast tommorow. :)
This looks like the problem Olof and Milton sent out patches to fix. The
Power3 shouldn't be doing cpu hotplug.
^ permalink raw reply
* Please pull linux-2.6-virtex.git
From: Grant Likely @ 2007-10-10 15:40 UTC (permalink / raw)
To: Josh Boyer, linuxppc-dev, Antonino A. Daplas, Andrei Konovalov
Josh, please pull:
git://git.secretlab.ca/git/linux-2.6-virtex.git virtex-for-2.6.24
This tree is based on Paulus' current top-of-tree.
There are some minor changes in here plus the XilinxFB migration to
use of_platform bus. Normally fb changes go in via the -mm tree; but
I've confirmed with Tony that it's okay to go in via the powerpc tree
(which probably makes sense because it depends on the port of virtex
support to arch/powerpc). The xilinxfb patches have also been acked
by Andrei, the xilinxfb author.
If I can get an account for patchwork; I can also take responsibility
for updating the state of virtex patches there.
The following changes since commit dcccb37e98e0444b0c6a03b303855771aa463c96:
Grant Likely (1):
[POWERPC] Lite5200: Use comma delimiter format for lists in device tree
are available in the git repository at:
git://git.secretlab.ca/git/linux-2.6-virtex.git virtex-for-2.6.24
Grant Likely (11):
[POWERPC] XilinxFB: add banner output to probe routine when
DEBUG is defined
[POWERPC] XilinxFB: Replace calls to printk with dev_dbg, dev_err, etc.
[POWERPC] XilinxFB: rename failout labels to reflect failure
[POWERPC] XilinxFB: Split device setup from bus binding
[POWERPC] XilinxFB: cleanup platform_bus binding to use platform bus API.
[POWERPC] XilinxFB: add of_platform bus binding
[POWERPC] XilinxFB: Make missing pdata structure non-fatal
[POWERPC] XilinxFB: sparse fixes
[POWERPC] Virtex: Fix URL for Xilinx Virtex support in MAINTAINERS
[POWERPC] Don't build arch/powerpc/sysdev/dcr.c for ARCH=ppc kernels
[POWERPC] Uartlite: bootwrapper bug fix, getc loops forever
MAINTAINERS | 2 +-
arch/powerpc/boot/uartlite.c | 4 +-
arch/powerpc/sysdev/Makefile | 2 +-
drivers/video/xilinxfb.c | 279 ++++++++++++++++++++++++++++++------------
4 files changed, 203 insertions(+), 84 deletions(-)
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
grant.likely@secretlab.ca
(403) 399-0195
^ permalink raw reply
* Re: [PATCH] drivers/ata: add support to Freescale 3.0Gbps SATA Controller
From: Kumar Gala @ 2007-10-10 14:31 UTC (permalink / raw)
To: Li Yang; +Cc: linux-ide, jgarzik, Ashish Kalra, linuxppc-dev
In-Reply-To: <1192011083-20220-1-git-send-email-leoli@freescale.com>
On Wed, 10 Oct 2007, Li Yang wrote:
> From: Ashish Kalra <ashish.kalra@freescale.com>
>
> This patch adds support for Freescale 3.0Gbps SATA Controller supporting
> Native Command Queueing(NCQ), device hotplug, and ATAPI. This controller
> can be found on MPC8315 and MPC8378.
>
> Signed-off-by: Ashish Kalra <ashish.kalra@freescale.com>
> Signed-off-by: Li Yang <leoli@freescale.com>
> ---
> drivers/ata/Kconfig | 9 +
> drivers/ata/Makefile | 1 +
> drivers/ata/sata_fsl.c | 1505 ++++++++++++++++++++++++++++++++++++++++++++++++
> drivers/ata/sata_fsl.h | 104 ++++
> 4 files changed, 1619 insertions(+), 0 deletions(-)
> create mode 100644 drivers/ata/sata_fsl.c
> create mode 100644 drivers/ata/sata_fsl.h
This patch shouldn't be accepted until we close on the device tree
definition since it impacts the driver.
Also CONFIG_SATA_FSL_FPGA_PCI should be removed since that was just an
internal debug thing.
- k
^ permalink raw reply
* C67x00 driver and usb keyboard
From: Robertson, Joseph M. @ 2007-10-10 13:50 UTC (permalink / raw)
To: linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 2346 bytes --]
Hi all,
Good News: I got the C67x00 driver to work with my ppc-405 + cypress usb controller!
I had to get the calls right to the cypress chip about turning on the power to the ports. Our HW people wired all
that stuff up for us. So I had to make some pins outputs and turn them on.
Usb storage works. I can get udev to create a device and I can connect and use it.
BUT I cannot get a keyboard or mouse to work.
I have:
1. turned on all the keyboard stuff in the kernel
keyboard.o is being made, all the usbhid stuff is being compiled (made it a module).
2. loading the modules detects a usb keyboard and fills out the right id and vendor.
3. loading a mouse fills out the right id and vendor.
4. I have set my xwindows kdrive.cf to use XKB.
I don't know, anyone have any debugging tips for usb keyboards?
My big problem is I cant find any good info on how usb keyboards are supposed to connect to the kernel and X.
I have a custom 2.6.17.1 kernel, plus the c67x00 driver.
HW is a Virtex4 with builtin PPC-405 and cypress c67300 usb controller.
Xfree 4.3.0 building the kdrive, small X windows.
Joe Robertson
Joseph.Robertson@sanmina-sci.com
CONFIDENTIALITY
This e-mail message and any attachments thereto, is intended only for use by the addressee(s) named herein and may contain legally privileged and/or confidential information. If you are not the intended recipient of this e-mail message, you are hereby notified that any dissemination, distribution or copying of this e-mail message, and any attachments thereto, is strictly prohibited. If you have received this e-mail message in error, please immediately notify the sender and permanently delete the original and any copies of this email and any prints thereof.
ABSENT AN EXPRESS STATEMENT TO THE CONTRARY HEREINABOVE, THIS E-MAIL IS NOT INTENDED AS A SUBSTITUTE FOR A WRITING. Notwithstanding the Uniform Electronic Transactions Act or the applicability of any other law of similar substance and effect, absent an express statement to the contrary hereinabove, this e-mail message its contents, and any attachments hereto are not intended to represent an offer or acceptance to enter into a contract and are not otherwise intended to bind the sender, Sanmina-SCI Corporation (or any of its subsidiaries), or any other person or entity.
[-- Attachment #2: Type: text/html, Size: 2879 bytes --]
^ permalink raw reply
* RE: Linux 'reboot' is HRESET or SRESET on MPC880?
From: DI BACCO ANTONIO - technolabs @ 2007-10-10 12:49 UTC (permalink / raw)
To: melinda develey, linuxppc-embedded
In-Reply-To: <200258.92901.qm@web63911.mail.re1.yahoo.com>
> I need to know if the linux reboot command performs a HRESET or
SRESET. I would like to preserve
> the direction and status of my GPIO pins and then I would like to
perform an SRESET that=20
> shouldn't touch the pddat, pddir.
The mpc8xx restart consists in clearing the ME bit in MSR register to
cause checkstop on machine check and then accessing an invalid location.
I don't know if this causes a SRESET or HRESET and if the GPIO will be
preserved or not. I know that PDDAT, PDDIR and the like are preserved
with SRESET.=20
Bye.
P.S: Please don't post html messages!=20
Do you know me? I see that you greeted me in your mail.
^ 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