From patchwork Thu Sep 4 00:58:22 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josh Boyer X-Patchwork-Id: 3787 X-Patchwork-Delegate: jwboyer@gmail.com Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id 5A4F8DE9FB for ; Fri, 10 Oct 2008 23:39:05 +1100 (EST) X-Original-To: linuxppc-dev@ozlabs.org Delivered-To: linuxppc-dev@ozlabs.org Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.233]) by ozlabs.org (Postfix) with ESMTP id 36647DE66A for ; Fri, 10 Oct 2008 23:38:24 +1100 (EST) Received: by wr-out-0506.google.com with SMTP id c48so275687wra.1 for ; Fri, 10 Oct 2008 05:38:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:in-reply-to :references:from:date:subject:to:mime-version:x-mailer :content-transfer-encoding:sender; bh=qCEUwv7RZ/9mQJj8TiKmpbJKqMdN56CYAO8TKd1hGhA=; b=Q6dvpulg7JQ8MLiNWCr5FZEU6P0zSk1OtrYnC0TuZxDUEiHFuVIaCPAlrgIrBM7Ks1 phKrGkinJc0a2kVL+g4KiWwcAKy953rEBjQPaC7TRunZLx/PV+CBIvP1DbrQLPVBFncE YzwGWKce36Syu1WjN4EELf+wnlX8cKcusyH4U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:in-reply-to:references:from:date:subject:to:mime-version :x-mailer:content-transfer-encoding:sender; b=OAKMizsuvZ/oMRuvjq7vK30/Njc4FSuZUP0tf5C0O+uwRWaWwgrf46Ev1DdAR5/HA6 IMk0qjsbpfRfoFwjLvlgfQNDdvIhpcU2KdbSKW9GXDufcvF3rMHwexHCZQI4ARJzSZ50 POrD+wEzNrx0JXRhrxS7vYQovvHOl+mryS2dY= Received: by 10.65.158.19 with SMTP id k19mr2688256qbo.94.1223642303241; Fri, 10 Oct 2008 05:38:23 -0700 (PDT) Received: from ?192.168.1.101? (24-247-237-59.dhcp.aldl.mi.charter.com [24.247.237.59]) by mx.google.com with ESMTPS id p27sm2355955qbp.16.2008.10.10.05.38.22 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 10 Oct 2008 05:38:22 -0700 (PDT) Message-Id: <071a0947286c71852506d8d5c63cc9c88d5f4191.1223642006.git.jwboyer@linux.vnet.ibm.com> In-Reply-To: References: From: Josh Boyer Date: Wed, 3 Sep 2008 20:58:22 -0400 Subject: [PATCH 2/5] powerpc/40x: Add support for PowerPC 405EZ Acadia board To: linuxppc-dev@ozlabs.org Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 (2.22.3.1-1.fc9) X-BeenThere: linuxppc-dev@ozlabs.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org Add base support for the AMCC PowerPC 405EZ Acadia evalution board. In addition to some of the normal PPC 40x peripherals, the Acadia board has: - 64 MiB PSRAM - NOR and NAND flash - Two USB 1.1 host ports - Two CAN 2.0 ports - ADC and DAC connectors - LCD display This adds the basic platform support to build from. Signed-off-by: Josh Boyer --- arch/powerpc/platforms/40x/Kconfig | 14 +++++++++ arch/powerpc/platforms/40x/Makefile | 1 + arch/powerpc/platforms/40x/acadia.c | 56 +++++++++++++++++++++++++++++++++++ 3 files changed, 71 insertions(+), 0 deletions(-) create mode 100644 arch/powerpc/platforms/40x/acadia.c diff --git a/arch/powerpc/platforms/40x/Kconfig b/arch/powerpc/platforms/40x/Kconfig index a9260e2..fe59060 100644 --- a/arch/powerpc/platforms/40x/Kconfig +++ b/arch/powerpc/platforms/40x/Kconfig @@ -14,6 +14,14 @@ # help # This option enables support for the CPCI405 board. +config ACADIA + bool "Acadia" + depends on 40x + default n + select 405EZ + help + This option enables support for the AMCC 405EZ Acadia evaluation board. + config EP405 bool "EP405/EP405PC" depends on 40x @@ -118,6 +126,12 @@ config 405EX select IBM_NEW_EMAC_EMAC4 select IBM_NEW_EMAC_RGMII +config 405EZ + bool + select IBM_NEW_EMAC_NO_FLOW_CTRL + select IBM_NEW_EMAC_MAL_CLR_ICINTSTAT + select IBM_NEW_EMAC_MAL_COMMON_ERR + config 405GPR bool diff --git a/arch/powerpc/platforms/40x/Makefile b/arch/powerpc/platforms/40x/Makefile index 5533a5c..ff483c0 100644 --- a/arch/powerpc/platforms/40x/Makefile +++ b/arch/powerpc/platforms/40x/Makefile @@ -3,3 +3,4 @@ obj-$(CONFIG_MAKALU) += makalu.o obj-$(CONFIG_WALNUT) += walnut.o obj-$(CONFIG_XILINX_VIRTEX_GENERIC_BOARD) += virtex.o obj-$(CONFIG_EP405) += ep405.o +obj-$(CONFIG_ACADIA) += acadia.o diff --git a/arch/powerpc/platforms/40x/acadia.c b/arch/powerpc/platforms/40x/acadia.c new file mode 100644 index 0000000..9a4419b --- /dev/null +++ b/arch/powerpc/platforms/40x/acadia.c @@ -0,0 +1,56 @@ +/* + * Acadia board support + * + * Copyright 2008 IBM Corporation + * Based on the Walnut code + * Josh Boyer + * + * 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 +#include + +#include +#include +#include +#include +#include +#include + +static __initdata struct of_device_id acadia_of_bus[] = { + { .compatible = "ibm,plb3", }, + { .compatible = "ibm,opb", }, + { .compatible = "ibm,ebc", }, + {}, +}; + +static int __init acadia_device_probe(void) +{ + of_platform_bus_probe(NULL, acadia_of_bus, NULL); + + return 0; +} +machine_device_initcall(acadia, acadia_device_probe); + +static int __init acadia_probe(void) +{ + unsigned long root = of_get_flat_dt_root(); + + if (!of_flat_dt_is_compatible(root, "amcc,acadia")) + return 0; + + return 1; +} + +define_machine(acadia) { + .name = "Acadia", + .probe = acadia_probe, + .progress = udbg_progress, + .init_IRQ = uic_init_tree, + .get_irq = uic_get_irq, + .restart = ppc4xx_reset_system, + .calibrate_decr = generic_calibrate_decr, +};