From: Josh Boyer <jwboyer@linux.vnet.ibm.com>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH 18/25] powerpc: Base support for 440GX Taishan eval board
Date: Thu, 6 Dec 2007 21:17:58 -0600 [thread overview]
Message-ID: <20071206211758.6f086161@zod.rchland.ibm.com> (raw)
In-Reply-To: <20071206080129.737E8DE09F@ozlabs.org>
On Thu, 06 Dec 2007 19:00:18 +1100
Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
> From: Hugh Blemings <hugh@blemings.org>
>
>
> Signed-off-by: Hugh Blemings <hugh@blemings.org>
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> ---
> Index: linux-work/arch/powerpc/platforms/44x/Kconfig
> ===================================================================
> --- linux-work.orig/arch/powerpc/platforms/44x/Kconfig 2007-12-03 12:05:58.000000000 +1100
> +++ linux-work/arch/powerpc/platforms/44x/Kconfig 2007-12-03 13:52:59.000000000 +1100
> @@ -22,6 +22,14 @@ config SEQUOIA
> help
> This option enables support for the AMCC PPC440EPX evaluation board.
>
> +config TAISHAN
> + bool "Taishan"
> + depends on 44x
> + default n
> + select 440GX
> + help
> + This option enables support for the IBM PPC440GX "Taishan" evaluation board.
AMCC Taishan board.
> +
> #config LUAN
> # bool "Luan"
> # depends on 44x
> @@ -58,6 +66,10 @@ config 440GP
>
> config 440GX
> bool
> + select IBM_NEW_EMAC_EMAC4
> + select IBM_NEW_EMAC_RGMII
> + select IBM_NEW_EMAC_ZMII #test only
> + select IBM_NEW_EMAC_TAH #test only
>
> config 440SP
> bool
> Index: linux-work/arch/powerpc/platforms/44x/Makefile
> ===================================================================
> --- linux-work.orig/arch/powerpc/platforms/44x/Makefile 2007-12-03 11:48:01.000000000 +1100
> +++ linux-work/arch/powerpc/platforms/44x/Makefile 2007-12-03 13:52:59.000000000 +1100
> @@ -1,4 +1,5 @@
> obj-$(CONFIG_44x) := misc_44x.o
> obj-$(CONFIG_EBONY) += ebony.o
> +obj-$(CONFIG_TAISHAN) += taishan.o
> obj-$(CONFIG_BAMBOO) += bamboo.o
> obj-$(CONFIG_SEQUOIA) += sequoia.o
> Index: linux-work/arch/powerpc/platforms/44x/taishan.c
> ===================================================================
> --- /dev/null 1970-01-01 00:00:00.000000000 +0000
> +++ linux-work/arch/powerpc/platforms/44x/taishan.c 2007-12-03 13:39:01.000000000 +1100
> @@ -0,0 +1,74 @@
> +/*
> + * Taishan board specific routines based off ebony.c code
> + * original copyrights below
> + *
> + * Matt Porter <mporter@kernel.crashing.org>
> + * Copyright 2002-2005 MontaVista Software Inc.
> + *
> + * Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net>
> + * Copyright (c) 2003-2005 Zultys Technologies
> + *
> + * Rewritten and ported to the merged powerpc tree:
> + * Copyright 2007 David Gibson <dwg@au1.ibm.com>, IBM Corporation.
> + *
> + * Modified from ebony.c for taishan:
> + * Copyright 2007 Hugh Blemings <hugh@au.ibm.com>, 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 <linux/of_platform.h>
> +
> +#include <asm/machdep.h>
> +#include <asm/prom.h>
> +#include <asm/udbg.h>
> +#include <asm/time.h>
> +#include <asm/uic.h>
> +#include <asm/pci-bridge.h>
> +
> +#include "44x.h"
> +
> +static struct of_device_id taishan_of_bus[] = {
> + { .compatible = "ibm,plb4", },
> + { .compatible = "ibm,opb", },
> + { .compatible = "ibm,ebc", },
> + {},
> +};
> +
> +static int __init taishan_device_probe(void)
> +{
> + if (!machine_is(taishan))
> + return 0;
> +
> + of_platform_bus_probe(NULL, taishan_of_bus, NULL);
> +
> + return 0;
> +}
> +device_initcall(taishan_device_probe);
> +
> +/*
> + * Called very early, MMU is off, device-tree isn't unflattened
> + */
> +static int __init taishan_probe(void)
> +{
> + unsigned long root = of_get_flat_dt_root();
> +
> + if (!of_flat_dt_is_compatible(root, "ibm,taishan"))
> + return 0;
amcc,taishan
> +
> + return 1;
> +}
> +
> +define_machine(taishan) {
> + .name = "Taishan",
> + .probe = taishan_probe,
> + .progress = udbg_progress,
> + .init_IRQ = uic_init_tree,
> + .get_irq = uic_get_irq,
> + .restart = ppc44x_reset_system,
> + .calibrate_decr = generic_calibrate_decr,
> +};
> Index: linux-work/arch/powerpc/boot/dts/taishan.dts
> ===================================================================
> --- /dev/null 1970-01-01 00:00:00.000000000 +0000
> +++ linux-work/arch/powerpc/boot/dts/taishan.dts 2007-12-03 13:39:01.000000000 +1100
> @@ -0,0 +1,414 @@
> +/*
> + * Device Tree Source for IBM/AMCC Taishan
> + *
<snip>
> + *
> + * To build:
> + * dtc -I dts -O asm -o taishan.S -b 0 taishan.dts
> + * dtc -I dts -O dtb -o taishan.dtb -b 0 taishan.dts
Remove this please. It's not really needed anymore.
> + */
> +
> +/ {
> + #address-cells = <2>;
> + #size-cells = <1>;
> + model = "ibm,taishan";
> + compatible = "ibm,taishan";
amcc,taishan
> + dcr-parent = <&/cpus/PowerPC,440GX@0>;
> +
> + cpus {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + PowerPC,440GX@0 {
> + device_type = "cpu";
> + reg = <0>;
> + clock-frequency = <2FAF0800>; // 800MHz
> + timebase-frequency = <0>; // Filled in by zImage
> + i-cache-line-size = <32>;
> + d-cache-line-size = <32>;
> + i-cache-size = <8000>; /* 32 kB */
> + d-cache-size = <8000>; /* 32 kB */
> + dcr-controller;
> + dcr-access-method = "native";
> + };
> + };
> +
> + memory {
> + device_type = "memory";
> + reg = <0 0 0>; // Filled in by zImage
> + };
> +
> +
> + UICB0: interrupt-controller-base {
> + compatible = "ibm,uic-440gx", "ibm,uic";
> + interrupt-controller;
> + cell-index = <3>;
> + dcr-reg = <200 009>;
> + #address-cells = <0>;
> + #size-cells = <0>;
> + #interrupt-cells = <2>;
> + };
> +
> +
> + UIC0: interrupt-controller0 {
> + compatible = "ibm,uic-440gx", "ibm,uic"; /* Should be AMCC ? */
This I think is fine as ibm,uic. Unless AMCC actually changed the UIC
to have differences, it was found on the IBM boards first :)
> + interrupt-controller;
> + cell-index = <0>;
> + dcr-reg = <0c0 009>;
> + #address-cells = <0>;
> + #size-cells = <0>;
> + #interrupt-cells = <2>;
> + interrupts = <01 4 00 4>; /* cascade - first non-critical */
> + interrupt-parent = <&UICB0>;
> +
> + };
> +
> + UIC1: interrupt-controller1 {
> + compatible = "ibm,uic-440gx", "ibm,uic";
> + interrupt-controller;
> + cell-index = <1>;
> + dcr-reg = <0d0 009>;
> + #address-cells = <0>;
> + #size-cells = <0>;
> + #interrupt-cells = <2>;
> + interrupts = <03 4 02 4>; /* cascade */
> + interrupt-parent = <&UICB0>;
> + };
> +
> + UIC2: interrupt-controller2 {
> + compatible = "ibm,uic-440gx", "ibm,uic";
> + interrupt-controller;
> + cell-index = <2>; /* was 1 */
> + dcr-reg = <210 009>;
> + #address-cells = <0>;
> + #size-cells = <0>;
> + #interrupt-cells = <2>;
> + interrupts = <05 4 04 4>; /* cascade */
> + interrupt-parent = <&UICB0>;
> + };
> +
> +
> + CPC0: cpc {
> + compatible = "ibm,cpc-440gp";
> + dcr-reg = <0b0 003 0e0 010>;
> + // FIXME: anything else?
> + };
> +
> + plb {
> + compatible = "ibm,plb-440gx", "ibm,plb4";
> + #address-cells = <2>;
> + #size-cells = <1>;
> + ranges;
> + clock-frequency = <9896800>; // 160MHz
> +
> + SDRAM0: memory-controller {
> + compatible = "ibm,sdram-440gp";
> + dcr-reg = <010 2>;
> + // FIXME: anything else?
> + };
> +
> + SRAM0: sram {
> + compatible = "ibm,sram-440gp";
> + dcr-reg = <020 8 00a 1>;
> + };
> +
> + DMA0: dma {
> + // FIXME: ???
> + compatible = "ibm,dma-440gp";
> + dcr-reg = <100 027>;
> + };
> +
> + MAL0: mcmal {
> + compatible = "ibm,mcmal-440gx", "ibm,mcmal2";
> + dcr-reg = <180 62>;
> + num-tx-chans = <4>;
> + num-rx-chans = <4>;
> + 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-440gx", "ibm,opb";
> + #address-cells = <1>;
> + #size-cells = <1>;
> + /* Wish there was a nicer way of specifying a full 32-bit
> + range */
> + ranges = <00000000 1 00000000 80000000
> + 80000000 1 80000000 80000000>;
> + dcr-reg = <090 00b>;
> + interrupt-parent = <&UIC1>;
> + interrupts = <7 4>;
> + clock-frequency = <4C4B400>; // 80MHz
> +
> +
> + /* Put EBC0 back **FIXME** */
Hrm?
> +
> + EBC0: ebc {
> + compatible = "ibm,ebc-440gx", "ibm,ebc";
> + dcr-reg = <012 2>;
> + #address-cells = <2>;
> + #size-cells = <1>;
> + clock-frequency = <4C4B400>; // 80MHz
> + // ranges property is supplied by zImage
> + // based on firmware's configuration of the
> + // EBC bridge
> + interrupts = <5 4>;
> + interrupt-parent = <&UIC1>;
> +
> +// small-flash@0,80000 {
> +// device_type = "rom";
> +// compatible = "direct-mapped";
> +// probe-type = "JEDEC";
> +// bank-width = <1>;
> +// partitions = <0 80000>;
> +// partition-names = "OpenBIOS";
> +// reg = <0 80000 80000>;
> +// };
You can probably just omit the child EBC nodes for now. Adding them
when they're right is pretty easy.
> +
> +// ds1743@1,0 {
> +// /* NVRAM & RTC */
> +// compatible = "ds1743";
> +// reg = <1 0 2000>;
> +// };
> +
> +// large-flash@2,0 {
> +// device_type = "rom";
> +// compatible = "direct-mapped";
> +// probe-type = "JEDEC";
> +// bank-width = <1>;
> +// partitions = <0 380000
> +// 380000 80000>;
> +// partition-names = "fs", "firmware";
> +// reg = <2 0 400000>;
> +// };
> +
> +// ir@3,0 {
> +// reg = <3 0 10>;
> +// };
> +
> +// fpga@7,0 {
> +// compatible = "Ebony-FPGA";
> +// reg = <7 0 10>;
> +// };
> + };
> +
> +
> + PCIX0: pci@20ec00000 {
> + device_type = "pci";
> + #interrupt-cells = <1>;
> + #size-cells = <2>;
> + #address-cells = <3>;
> + compatible = "ibm,plb440gp-pcix", "ibm,plb-pcix";
> + primary;
> + large-inbound-windows;
> + enable-msi-hole;
> + reg = <2 0ec00000 8 /* Config space access */
> + 0 0 0 /* no IACK cycles */
> + 2 0ed00000 4 /* Special cycles */
> + 2 0ec80000 100 /* Internal registers */
> + 2 0ec80100 fc>; /* Internal messaging registers */
> +
> + /* Outbound ranges, one memory and one IO,
> + * later cannot be changed
> + */
> + ranges = <02000000 0 80000000 00000003 80000000 0 80000000
> + 01000000 0 00000000 00000002 08000000 0 00010000>;
> +
> + /* Inbound 2GB range starting at 0 */
> + dma-ranges = <42000000 0 0 0 0 0 80000000>;
> +
> + /* Ebony has all 4 IRQ pins tied together per slot */
This isn't an Ebony board. Does Taishan do the same?
> + interrupt-map-mask = <f800 0 0 7>;
> + interrupt-map = <
> + /* IDSEL 1 */
> + 0800 0 0 1 &UIC0 17 8
> + 0800 0 0 2 &UIC0 18 8
> + 0800 0 0 3 &UIC0 19 8
> + 0800 0 0 4 &UIC0 1a 8
> +
> + /* IDSEL 2 */
> + 1000 0 0 1 &UIC0 18 8
> + 1000 0 0 2 &UIC0 19 8
> + 1000 0 0 3 &UIC0 1a 8
> + 1000 0 0 4 &UIC0 17 8
> + >;
> + };
> + };
> +
> + chosen {
> + linux,stdout-path = "/plb/opb/serial@40000300";
> + };
> +};
josh
next prev parent reply other threads:[~2007-12-07 3:20 UTC|newest]
Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-06 7:59 [PATCH 0/25] powerpc: 4xx PCI, PCI-X and PCI-Express support among others Benjamin Herrenschmidt
2007-12-06 8:00 ` [PATCH 2/25] powerpc: Merge pci_process_bridge_OF_ranges() Benjamin Herrenschmidt
2007-12-06 8:00 ` [PATCH 1/25] powerpc: Make isa_mem_base common to 32 and 64 bits Benjamin Herrenschmidt
2007-12-06 8:00 ` [PATCH 3/25] powerpc: Fix powerpc 32 bits resource fixup for 64 bits resources Benjamin Herrenschmidt
2007-12-06 8:00 ` [PATCH 4/25] powerpc: Reworking machine check handling and Fix 440/440A Benjamin Herrenschmidt
2007-12-10 17:59 ` Josh Boyer
2007-12-10 20:33 ` Benjamin Herrenschmidt
2007-12-10 20:44 ` Josh Boyer
2007-12-06 8:00 ` [PATCH 5/25] powerpc: Add xmon function to dump 44x TLB Benjamin Herrenschmidt
2007-12-06 8:00 ` [PATCH 6/25] powerpc: Change 32 bits PCI message about resource allocation Benjamin Herrenschmidt
2007-12-06 8:00 ` [PATCH 7/25] powerpc: Add of_translate_dma_address Benjamin Herrenschmidt
2007-12-06 8:00 ` [PATCH 8/25] powerpc: Improve support for 4xx indirect DCRs Benjamin Herrenschmidt
2007-12-07 2:19 ` Josh Boyer
2007-12-10 4:54 ` Benjamin Herrenschmidt
2007-12-06 8:00 ` [PATCH 9/25] powerpc: 4xx PLB to PCI-X support Benjamin Herrenschmidt
2007-12-06 8:00 ` [PATCH 10/25] powerpc: 4xx PLB to PCI 2.x support Benjamin Herrenschmidt
2007-12-06 8:00 ` [PATCH 11/25] powerpc: 4xx PLB to PCI Express support Benjamin Herrenschmidt
2007-12-06 9:26 ` Stefan Roese
2007-12-06 22:21 ` Benjamin Herrenschmidt
2007-12-07 7:02 ` Stefan Roese
2007-12-09 7:07 ` Benjamin Herrenschmidt
2007-12-06 8:00 ` [PATCH 12/25] powerpc: PCI support for 4xx Ebony board Benjamin Herrenschmidt
2007-12-06 8:00 ` [PATCH 13/25] powerpc: Remove useless volatiles in udbg_16550.c Benjamin Herrenschmidt
2007-12-06 8:00 ` [PATCH 14/25] powerpc: Add early udbg support for 40x processors Benjamin Herrenschmidt
2007-12-06 8:00 ` [PATCH 15/25] powerpc: early debug forces console log level to max Benjamin Herrenschmidt
2007-12-06 8:00 ` [PATCH 16/25] powerpc: EP405 boards support for arch/powerpc Benjamin Herrenschmidt
2007-12-07 3:05 ` Josh Boyer
2007-12-09 6:57 ` Benjamin Herrenschmidt
2007-12-10 4:56 ` Benjamin Herrenschmidt
2007-12-06 8:00 ` [PATCH 17/25] powerpc: Add PCI to Walnut platform Benjamin Herrenschmidt
2007-12-06 8:00 ` [PATCH 18/25] powerpc: Base support for 440GX Taishan eval board Benjamin Herrenschmidt
2007-12-06 19:56 ` Josh Boyer
2007-12-07 3:17 ` Josh Boyer [this message]
2007-12-09 7:01 ` Benjamin Herrenschmidt
2007-12-09 17:24 ` Olof Johansson
2007-12-09 18:24 ` Josh Boyer
2007-12-09 20:20 ` Olof Johansson
2007-12-09 19:58 ` Benjamin Herrenschmidt
2007-12-10 1:29 ` Josh Boyer
2007-12-09 23:43 ` CC munging by mailman lists (Was: Re: [PATCH 18/25] powerpc: Base support for 440GX Taishan eval board) Stephen Rothwell
2007-12-10 5:39 ` [PATCH 18/25] powerpc: Base support for 440GX Taishan eval board Benjamin Herrenschmidt
2007-12-06 8:00 ` [PATCH 19/25] powerpc: Wire up PCI on Bamboo board Benjamin Herrenschmidt
2007-12-07 3:19 ` Josh Boyer
2007-12-09 7:03 ` Benjamin Herrenschmidt
2007-12-10 5:40 ` Benjamin Herrenschmidt
2007-12-06 8:00 ` [PATCH 20/25] powerpc: Wire up 440EP USB controlle support to " Benjamin Herrenschmidt
2007-12-06 8:00 ` [PATCH 21/25] powerpc: Adds decoding of 440SPE memory size to boot wrapper library Benjamin Herrenschmidt
2007-12-07 3:22 ` Josh Boyer
2007-12-09 7:04 ` Benjamin Herrenschmidt
2007-12-06 8:00 ` [PATCH 22/25] powerpc: Add mfspr/mtspr inline macros to 4xx bootwrapper Benjamin Herrenschmidt
2007-12-06 8:00 ` [PATCH 23/25] powerpc: Rework 4xx clock probing in boot wrapper Benjamin Herrenschmidt
2007-12-07 3:27 ` Josh Boyer
2007-12-09 7:05 ` Benjamin Herrenschmidt
2007-12-10 5:43 ` Benjamin Herrenschmidt
2007-12-10 11:54 ` Josh Boyer
2007-12-06 8:00 ` [PATCH 24/25] powerpc: Base support for 440SPe "Katmai" eval board Benjamin Herrenschmidt
2007-12-06 9:42 ` Stefan Roese
2007-12-06 8:00 ` [PATCH 25/25] powerpc: 4xx PCI-E Link setup improvements Benjamin Herrenschmidt
2007-12-06 13:32 ` [PATCH 0/25] powerpc: 4xx PCI, PCI-X and PCI-Express support among others Josh Boyer
2007-12-06 20:25 ` Josh Boyer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071206211758.6f086161@zod.rchland.ibm.com \
--to=jwboyer@linux.vnet.ibm.com \
--cc=benh@kernel.crashing.org \
--cc=linuxppc-dev@ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).