From patchwork Mon Feb 16 15:46:14 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Medve X-Patchwork-Id: 440223 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 1534D140270 for ; Tue, 17 Feb 2015 02:55:16 +1100 (AEDT) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id EEE0D1A1467 for ; Tue, 17 Feb 2015 02:55:15 +1100 (AEDT) X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1bbn0103.outbound.protection.outlook.com [157.56.111.103]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id C56CF1A0F20 for ; Tue, 17 Feb 2015 02:51:27 +1100 (AEDT) Received: from BN3PR0301CA0044.namprd03.prod.outlook.com (25.160.152.140) by BN3PR0301MB1188.namprd03.prod.outlook.com (25.160.156.15) with Microsoft SMTP Server (TLS) id 15.1.87.18; Mon, 16 Feb 2015 15:51:20 +0000 Received: from BN1BFFO11FD027.protection.gbl (2a01:111:f400:7c10::1:177) by BN3PR0301CA0044.outlook.office365.com (2a01:111:e400:401e::12) with Microsoft SMTP Server (TLS) id 15.1.87.13 via Frontend Transport; Mon, 16 Feb 2015 15:51:20 +0000 Received: from tx30smr01.am.freescale.net (192.88.168.50) by BN1BFFO11FD027.mail.protection.outlook.com (10.58.144.90) with Microsoft SMTP Server (TLS) id 15.1.99.6 via Frontend Transport; Mon, 16 Feb 2015 15:51:20 +0000 Received: from right.am.freescale.net (right.am.freescale.net [10.81.116.70]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id t1GFpIF4026808; Mon, 16 Feb 2015 08:51:19 -0700 From: Emil Medve To: , Subject: [RFC v2 03/10] powerpc/mpc85xx: Add platform support for the Freescale DPAA BMan Date: Mon, 16 Feb 2015 09:46:14 -0600 Message-ID: <1424101581-22109-4-git-send-email-Emilian.Medve@Freescale.com> X-Mailer: git-send-email 2.3.0 In-Reply-To: <1424101581-22109-1-git-send-email-Emilian.Medve@Freescale.com> References: <1424101581-22109-1-git-send-email-Emilian.Medve@Freescale.com> X-EOPAttributedMessage: 0 Received-SPF: Fail (protection.outlook.com: domain of Freescale.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=Emilian.Medve@Freescale.com; freescale.mail.onmicrosoft.com; dkim=none (message not signed) header.d=none; X-Forefront-Antispam-Report: CIP:192.88.168.50; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(339900001)(46102003)(62966003)(2950100001)(86362001)(50986999)(47776003)(106466001)(77096005)(105606002)(76176999)(77156002)(36756003)(92566002)(104016003)(85426001)(50466002)(19580405001)(6806004)(50226001)(229853001)(19580395003)(87936001)(48376002)(2101003); DIR:OUT; SFP:1102; SCL:1; SRVR:BN3PR0301MB1188; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; MLV:sfv; LANG:en; MIME-Version: 1.0 X-Microsoft-Antispam: UriScan:; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;SRVR:BN3PR0301MB1188; X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004); SRVR:BN3PR0301MB1188; X-Forefront-PRVS: 0489CFBAC9 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:; SRVR:BN3PR0301MB1188; X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Feb 2015 15:51:20.3743 (UTC) X-MS-Exchange-CrossTenant-Id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=710a03f5-10f6-4d38-9ff4-a80b81da590d; Ip=[192.88.168.50] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR0301MB1188 Cc: Geoff Thorpe X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" From: Geoff Thorpe Change-Id: I59de17c040cdd304f86306336fcf89f130f7db2d Signed-off-by: Geoff Thorpe --- arch/powerpc/Kconfig | 5 +++++ arch/powerpc/configs/mpc85xx_defconfig | 1 + arch/powerpc/configs/mpc85xx_smp_defconfig | 1 + arch/powerpc/platforms/85xx/Kconfig | 1 + arch/powerpc/platforms/85xx/corenet_generic.c | 16 ++++++++++++++++ arch/powerpc/platforms/85xx/p1023_rdb.c | 14 ++++++++++++++ 6 files changed, 38 insertions(+) diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 7258b468..6ab5ad5 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -779,6 +779,11 @@ config FSL_GTM help Freescale General-purpose Timers support +config HAS_FSL_QBMAN + bool "Datapath Acceleration Queue and Buffer management" + help + Datapath Acceleration Queue and Buffer management + # Yes MCA RS/6000s exist but Linux-PPC does not currently support any config MCA bool diff --git a/arch/powerpc/configs/mpc85xx_defconfig b/arch/powerpc/configs/mpc85xx_defconfig index 8496389..aa7e41f 100644 --- a/arch/powerpc/configs/mpc85xx_defconfig +++ b/arch/powerpc/configs/mpc85xx_defconfig @@ -49,6 +49,7 @@ CONFIG_HIGHMEM=y CONFIG_BINFMT_MISC=m CONFIG_MATH_EMULATION=y CONFIG_FORCE_MAX_ZONEORDER=12 +CONFIG_HAS_FSL_QBMAN=y CONFIG_PCI=y CONFIG_PCIEPORTBUS=y # CONFIG_PCIEASPM is not set diff --git a/arch/powerpc/configs/mpc85xx_smp_defconfig b/arch/powerpc/configs/mpc85xx_smp_defconfig index bf88caf..82feda1 100644 --- a/arch/powerpc/configs/mpc85xx_smp_defconfig +++ b/arch/powerpc/configs/mpc85xx_smp_defconfig @@ -50,6 +50,7 @@ CONFIG_HIGHMEM=y CONFIG_BINFMT_MISC=m CONFIG_MATH_EMULATION=y CONFIG_FORCE_MAX_ZONEORDER=12 +CONFIG_HAS_FSL_QBMAN=y CONFIG_PCI=y CONFIG_PCI_MSI=y CONFIG_RAPIDIO=y diff --git a/arch/powerpc/platforms/85xx/Kconfig b/arch/powerpc/platforms/85xx/Kconfig index dbdd5fa..51e9a7b 100644 --- a/arch/powerpc/platforms/85xx/Kconfig +++ b/arch/powerpc/platforms/85xx/Kconfig @@ -276,6 +276,7 @@ config CORENET_GENERIC select GPIO_MPC8XXX select HAS_RAPIDIO select PPC_EPAPR_HV_PIC + select HAS_FSL_QBMAN help This option enables support for the FSL CoreNet based boards. For 32bit kernel, the following boards are supported: diff --git a/arch/powerpc/platforms/85xx/corenet_generic.c b/arch/powerpc/platforms/85xx/corenet_generic.c index 63bef30..74faab7 100644 --- a/arch/powerpc/platforms/85xx/corenet_generic.c +++ b/arch/powerpc/platforms/85xx/corenet_generic.c @@ -197,6 +197,21 @@ static int __init corenet_generic_probe(void) return 0; } +/* Early setup is required for large chunks of contiguous (and coarsely-aligned) + * memory. The following shoe-horns Bman "init_early" calls into the + * platform setup to let them parse their CCSR nodes early on. + */ +#ifdef CONFIG_FSL_BMAN_CONFIG +void __init bman_init_early(void); +#endif + +__init void corenet_ds_init_early(void) +{ +#ifdef CONFIG_FSL_BMAN_CONFIG + bman_init_early(); +#endif +} + define_machine(corenet_generic) { .name = "CoreNet Generic", .probe = corenet_generic_probe, @@ -215,6 +230,7 @@ define_machine(corenet_generic) { #else .power_save = e500_idle, #endif + .init_early = corenet_ds_init_early, }; machine_arch_initcall(corenet_generic, corenet_gen_publish_devices); diff --git a/arch/powerpc/platforms/85xx/p1023_rdb.c b/arch/powerpc/platforms/85xx/p1023_rdb.c index d5b7509..624d3d6 100644 --- a/arch/powerpc/platforms/85xx/p1023_rdb.c +++ b/arch/powerpc/platforms/85xx/p1023_rdb.c @@ -103,7 +103,20 @@ static int __init p1023_rdb_probe(void) unsigned long root = of_get_flat_dt_root(); return of_flat_dt_is_compatible(root, "fsl,P1023RDB"); +} + +/* Early setup is required for large chunks of contiguous (and coarsely-aligned) + * memory. The following shoe-horns Bman "init_early" calls into the + * platform setup to let them parse their CCSR nodes early on. */ +#ifdef CONFIG_FSL_BMAN_CONFIG +void __init bman_init_early(void); +#endif +static __init void p1023_rdb_init_early(void) +{ +#ifdef CONFIG_FSL_BMAN_CONFIG + bman_init_early(); +#endif } define_machine(p1023_rdb) { @@ -119,4 +132,5 @@ define_machine(p1023_rdb) { .pcibios_fixup_bus = fsl_pcibios_fixup_bus, .pcibios_fixup_phb = fsl_pcibios_fixup_phb, #endif + .init_early = p1023_rdb_init_early, };