From patchwork Wed Mar 23 12:17:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dieter Pfeuffer X-Patchwork-Id: 601203 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from arrakis.dune.hu (caladan.dune.hu [78.24.191.180]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3qVTBv4H08z9sdg for ; Wed, 23 Mar 2016 23:19:19 +1100 (AEDT) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 925C6B9165E; Wed, 23 Mar 2016 13:18:37 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.1 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP; Wed, 23 Mar 2016 13:18:37 +0100 (CET) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id D62D6B91642 for ; Wed, 23 Mar 2016 13:18:35 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 CL_IP_EQ_HELO_IP=-2 (check from: .men. - helo: .mail1.bemta3.messagelabs. - helo-domain: .messagelabs.) FROM/MX_MATCHES_HELO(DOMAIN)=-2; rate: -7 Received: from mail1.bemta3.messagelabs.com (mail1.bemta3.messagelabs.com [195.245.230.161]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Wed, 23 Mar 2016 13:18:31 +0100 (CET) Received: from [85.158.137.19] by server-1.bemta-3.messagelabs.com id 3D/AA-07924-69982F65; Wed, 23 Mar 2016 12:18:30 +0000 X-Env-Sender: Dieter.Pfeuffer@men.de X-Msg-Ref: server-16.tower-39.messagelabs.com!1458735509!30901439!1 X-Originating-IP: [80.255.6.145] X-StarScan-Received: X-StarScan-Version: 8.11; banners=-,-,- X-VirusChecked: Checked Received: (qmail 16021 invoked from network); 23 Mar 2016 12:18:30 -0000 Received: from unknown (HELO keys.men.de) (80.255.6.145) by server-16.tower-39.messagelabs.com with AES128-SHA encrypted SMTP; 23 Mar 2016 12:18:30 -0000 Received: from MEN-EX01.intra.men.de ([192.168.1.1]) by keys.men.de (PGP Universal service); Wed, 23 Mar 2016 13:18:30 +0100 X-PGP-Universal: processed; by keys.men.de on Wed, 23 Mar 2016 13:18:30 +0100 Received: from localhost.localdomain (192.168.3.84) by MEN-EX01.intra.men.de (192.168.1.1) with Microsoft SMTP Server (TLS) id 15.0.1076.9; Wed, 23 Mar 2016 13:18:29 +0100 From: Dieter Pfeuffer To: Date: Wed, 23 Mar 2016 13:17:26 +0100 Message-ID: <305da1317911f7707a68b1f117ba4a3a9be621d0.1458642197.git.dieter.pfeuffer@men.de> X-Mailer: git-send-email 1.9.1 In-Reply-To: References: MIME-Version: 1.0 X-Originating-IP: [192.168.3.84] X-ClientProxiedBy: MEN-EX01.intra.men.de (192.168.1.1) To MEN-EX01.intra.men.de (192.168.1.1) X-EXCLAIMER-MD-CONFIG: e4841e51-7998-49c0-ba41-8b8a0e2d8962 Subject: [OpenWrt-Devel] [PATCH 2/8] mpc85xx: add target NM50 to kernel config X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Dieter Pfeuffer , openwrt-devel@lists.openwrt.org Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" Signed-off-by: Dieter Pfeuffer --- .../files/arch/powerpc/platforms/85xx/men_nm50.c | 77 ++++++++++++++++++++++ .../230-powerpc-85xx-men-nm50-support.patch | 22 +++++++ 2 files changed, 99 insertions(+) create mode 100644 target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/men_nm50.c create mode 100644 target/linux/mpc85xx/patches-3.18/230-powerpc-85xx-men-nm50-support.patch diff --git a/target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/men_nm50.c b/target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/men_nm50.c new file mode 100644 index 0000000..d476529 --- /dev/null +++ b/target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/men_nm50.c @@ -0,0 +1,77 @@ +/* + * MEN NM50 board setup + * + * Copyright (c) 2016 MEN Mikro Elektronik GmbH + * + * Based on p1022_rdk.c (C) Timur Tabi + * + * This is free software, licensed under the GNU General Public License v2. + * See /LICENSE for more information. + */ + +#include +#include +#include +#include + +#include +#include +#include + +#include "mpc85xx.h" +#include "smp.h" + +static void __init men_nm50_pic_init(void) +{ + struct mpic *mpic = mpic_alloc(NULL, 0, MPIC_BIG_ENDIAN | + MPIC_SINGLE_DEST_CPU, + 0, 256, " OpenPIC "); + BUG_ON(mpic == NULL); + mpic_init(mpic); +} + +/** + * Setup the architecture + */ +static void __init men_nm50_setup_arch(void) +{ + if (ppc_md.progress) + ppc_md.progress("men_nm50_setup_arch()", 0); + + mpc85xx_smp_init(); + + fsl_pci_assign_primary(); + + swiotlb_detect_4g(); + + pr_info("MEN NM50 Mobile Wireless LAN Access Point\n"); +} + +machine_arch_initcall(men_nm50, mpc85xx_common_publish_devices); +machine_arch_initcall(men_nm50, swiotlb_setup_bus_notifier); + +/** + * Initial probe of hardware + * + * Called very early, device-tree isn't unflattened + */ +static int __init men_nm50_probe(void) +{ + unsigned long root = of_get_flat_dt_root(); + + return of_flat_dt_is_compatible(root, "men,nm50"); +} + +define_machine(men_nm50) { + .name = "MEN NM50", + .probe = men_nm50_probe, + .setup_arch = men_nm50_setup_arch, + .init_IRQ = men_nm50_pic_init, +#ifdef CONFIG_PCI + .pcibios_fixup_bus = fsl_pcibios_fixup_bus, +#endif + .get_irq = mpic_get_irq, + .restart = fsl_rstcr_restart, + .calibrate_decr = generic_calibrate_decr, + .progress = udbg_progress, +}; diff --git a/target/linux/mpc85xx/patches-3.18/230-powerpc-85xx-men-nm50-support.patch b/target/linux/mpc85xx/patches-3.18/230-powerpc-85xx-men-nm50-support.patch new file mode 100644 index 0000000..1104051 --- /dev/null +++ b/target/linux/mpc85xx/patches-3.18/230-powerpc-85xx-men-nm50-support.patch @@ -0,0 +1,22 @@ +--- a/arch/powerpc/platforms/85xx/Makefile ++++ b/arch/powerpc/platforms/85xx/Makefile +@@ -31,3 +31,4 @@ obj-$(CONFIG_XES_MPC85xx) += xes_mpc85xx + obj-$(CONFIG_GE_IMP3A) += ge_imp3a.o + obj-$(CONFIG_PPC_QEMU_E500) += qemu_e500.o + obj-$(CONFIG_SGY_CTS1000) += sgy_cts1000.o ++obj-$(CONFIG_MEN_NM50) += men_nm50.o +--- a/arch/powerpc/platforms/85xx/Kconfig ++++ b/arch/powerpc/platforms/85xx/Kconfig +@@ -241,6 +241,12 @@ config SGY_CTS1000 + help + Enable this to support functionality in Servergy's CTS-1000 systems. + ++config MEN_NM50 ++ bool "MEN NM50" ++ select DEFAULT_UIMAGE ++ help ++ This option enables support for the MEN NM50 Mobile Wireless LAN Access Point. ++ + endif # PPC32 + + config PPC_QEMU_E500