From patchwork Sun Aug 19 20:26:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Darren Stevens X-Patchwork-Id: 959456 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41tqnc6L5cz9ryn for ; Mon, 20 Aug 2018 07:29:08 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=stevens-zone.net Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 41tqnc4yYbzF1S4 for ; Mon, 20 Aug 2018 07:29:08 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=stevens-zone.net X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=none (mailfrom) smtp.mailfrom=stevens-zone.net (client-ip=212.227.126.133; helo=mout.kundenserver.de; envelope-from=darren@stevens-zone.net; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=stevens-zone.net Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 41tqkg2YgqzF2Dc for ; Mon, 20 Aug 2018 07:26:34 +1000 (AEST) Received: from mintppc.home ([86.171.142.179]) by mrelayeu.kundenserver.de (mreue007 [212.227.15.163]) with ESMTPA (Nemesis) id 0MAo9v-1fgkv612wV-00BscD; Sun, 19 Aug 2018 23:26:31 +0200 From: Darren Stevens To: linuxppc-dev Date: Sun, 19 Aug 2018 21:26:28 +0100 (BST) Message-ID: <4c6da168591.7567d73b@auth.smtp.1and1.co.uk> User-Agent: YAM/2.9p1 (AmigaOS4; PPC; rv:20140418r7798) Subject: [PATCH NEXT v2 4/4] powerpc/pasemi: Connect Nemo boot code. MIME-Version: 1.0 Content-type: multipart/mixed; boundary="--=_BOUNDARY.6c124c601c8edb48.f1" X-Provags-ID: V03:K1:OPDIaWu+nxMcG11P+ILCehpZemdgx+ABRdrCqXW8zafCdZryNc0 wSsxmzoG3Oy+KBQLzJj4m+TbrCj1M/LDIMM+mrzvVRCr0wMBzAAzImXB0F7DoN876Yns9Gv lFddFYbrH9rKZYY0vsvuVxLjfCSQJWvBBhKjR5bWKyGLPwxBHetMS0hpKyiLxTsdvX2U3ub Wdj2pC9SqK3bbSyac/eZg== X-UI-Out-Filterresults: notjunk:1; V01:K0:rtNzhwi/Aj8=:X0qA5r6v6iAiSc6SUP41b0 8Hcbd9OzCL3lK6/j4WKb4rg/vmstGpzi6K1+KxTmUVi5pkqCncOA8RVkSkjOxfg1asibSKCh5 idzZScDyQIa/mTlY7st5lbDXiI0r9qKV2s9sQMjZyqGwG7BTMEGNd/ZiuI/lVikKYkeuPqvQJ L+Kfe4PvlOu63tLPz8rFVGWJrg2doWrS2T0Vca++0h2+7XtVm34RHEbV4w86p3YkR7HIjmV2T CRaYKqr36K5uUMaSKjhvYfSIMApKNm6OMkEVG3JwZ5iJmkhKusjUlKQDZ99eZrtMz16VIAT5F N4Wv1WTtMs4qBKdqEq7IvAqmrmCp+5JfQ/zeBQk2aGtTjQqYH2XdiOKceK7zgNJFna4bLmW97 CRnFz8qRDu2Da3HfN1MsrGDQ3kr913RGNauYD2jsxUJYTcoctGbWm+9tNxVJ4O4atsupuSvNe ajoKIEmoYTRRkRKRpW1UjQnztbLmS17PfV9IFUxrUhPo79r0aiUidO4/YGaian1zq3bkWFQM5 lHJmbi95lytqUFbFB3sSJFD4FD3ctPy5JaUBR2z5nxCkSr6qTtFHJOel57XKlM0iiBbX8s+Em veD1FKd8Etttzc9HwQZ8UTCh8urPaRmZoHlk4ys2GSlleFT+q1irRPksBEiZWClkYMjNZN3VS XqT/GlF47mgKk4kEz97OahTOytqbaVC+y993KY772LgK/uwrCI6WNOsF5uRXoYbz2sHM= X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Christian Zigotzky Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" The previous 3 commits added support code for the Nemo motherbard as used in the Amigaone X1000, now wire them up so the board can be detected and initalised at boot time. Signed-off-by: Darren Stevens --- Changes made: v2: Changed init code to be empty when NEMO=n rather than using #ifdefs diff --git a/arch/powerpc/platforms/pasemi/pci.c b/arch/powerpc/platforms/pasemi/pci.c index c230acc..3ed0ff6 100644 --- a/arch/powerpc/platforms/pasemi/pci.c +++ b/arch/powerpc/platforms/pasemi/pci.c @@ -27,6 +27,7 @@ #include #include +#include #include #include @@ -182,6 +183,8 @@ static int pa_pxp_read_config(struct pci_bus *bus, unsigned int devfn, addr = pa_pxp_cfg_addr(hose, bus->number, devfn, offset); + sb600_set_flag(bus->number); + /* * Note: the caller has already checked that offset is * suitably aligned and that len is 1, 2 or 4. @@ -216,6 +219,8 @@ static int pa_pxp_write_config(struct pci_bus *bus, unsigned int devfn, addr = pa_pxp_cfg_addr(hose, bus->number, devfn, offset); + sb600_set_flag(bus->number); + /* * Note: the caller has already checked that offset is * suitably aligned and that len is 1, 2 or 4. @@ -266,6 +271,11 @@ static int __init pas_add_bridge(struct device_node *dev) /* Interpret the "ranges" property */ pci_process_bridge_OF_ranges(hose, dev, 1); + /* Scan for an isa bridge. This is needed to find the SB600 + on the nemo and does nothing on machines without one + */ + isa_bridge_find_early(hose); + return 0; } diff --git a/arch/powerpc/platforms/pasemi/setup.c b/arch/powerpc/platforms/pasemi/setup.c index 98bf2f7..49e67cf 100644 --- a/arch/powerpc/platforms/pasemi/setup.c +++ b/arch/powerpc/platforms/pasemi/setup.c @@ -314,6 +314,8 @@ static __init void pas_init_IRQ(void) mpic_unmask_irq(irq_get_irq_data(nmi_virq)); } + nemo_init_IRQ(mpic); + of_node_put(mpic_node); of_node_put(root); } @@ -475,6 +477,8 @@ static int __init pasemi_publish_devices(void) /* Publish OF platform devices for SDC and other non-PCI devices */ of_platform_bus_probe(NULL, pasemi_bus_ids, NULL); + nemo_init_rtc(); + return 0; } machine_device_initcall(pasemi, pasemi_publish_devices); @@ -489,6 +493,17 @@ static int __init pas_probe(void) !of_machine_is_compatible("pasemi,pwrficient")) return 0; +#ifdef CONFIG_PPC_PASEMI_NEMO + /* + * Check for the Nemo motherboard here, if we are running on one + * change the machine definition to fit + */ + if (of_machine_is_compatible("pasemi,nemo")) { + pm_power_off = pas_shutdown; + ppc_md.name = "A-EON Amigaone X1000"; + } +#endif + iommu_init_early_pasemi(); return 1;