Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp3666716imm; Mon, 1 Oct 2018 02:25:32 -0700 (PDT) X-Google-Smtp-Source: ACcGV62Jqz5X3qjty8y8m/cTtdlnIk+lYtJ6hD521ZOq6TxKv+H7xuXIlFDjz9xPOeRQ+ld0QXM5 X-Received: by 2002:a62:18a:: with SMTP id 132-v6mr10521649pfb.207.1538385932489; Mon, 01 Oct 2018 02:25:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538385932; cv=none; d=google.com; s=arc-20160816; b=tppq4YJM7EqTINlwPfhgBlmtASCi/HhEKenKNGv4g9mIbiOZIjlIsIrAzQYbur+NQS TUPGQvJrWTVDy+4+wVwndYUH3KiPLhu5fSymMwcua9WgO5K9o++7/fwzx3aYhut390XI rT4qykXHO5O4c5zmjzZr8DDu5wjx3Tyc6WmSqdnY/4EsdqXOoPkRXgJBCW91+51uYKWr p+wa/nD9HTFZhKTNzn4Krizrd1RQRhGSGhe7lAXOr3rQkJfe7OFWCHNaSZpu7dKhhL8o TOM/c1sEGrwlmwi3ExTG9IYCWD4O6/fsMxyeU8JFcroLxo0WoIqzZvezyc/Jsw3Q/IsH Nu9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=OhEgUOB92QopJxDtkpB/kyOIyuMWKtWWsN3PGIRlWBw=; b=yKCXyLXT5K804Yna5AGU79u1sGhuG/OgNr7UWpmZryFnMO2I7+2zil6WhfZHjO9u6D L+CrVugSXdvInv2gnpBaxiDhASZ7wMK2cUFbqPoLQ5ki+LqwWnXeb04AOfOruVfajr1k 2Php63J6l0ZCQcRefucXdpcZyHDDBoeQg556Hl0ZWaxzP8FD3pO0EHfJG6cIJ8nwppV6 UWcHr+og65rJWdYmNSifshLe+Xy5u5iQa/HS1h+iMzxJQlqY4AJUY25kbJOVLLD12Fth DeOb+uN9edf1rwQmn6PTZUeCSzigCBwykm5+bJoFg3uq7JAw8PZ0YMg5q3KKVgXTitAF 47xw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=kLnPe+dk; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t29-v6si11994420pgn.442.2018.10.01.02.25.17; Mon, 01 Oct 2018 02:25:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=kLnPe+dk; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729101AbeJAQBy (ORCPT + 99 others); Mon, 1 Oct 2018 12:01:54 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:37125 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728960AbeJAQBx (ORCPT ); Mon, 1 Oct 2018 12:01:53 -0400 Received: by mail-wr1-f66.google.com with SMTP id u12-v6so13040371wrr.4; Mon, 01 Oct 2018 02:25:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:subject:from:to:cc:date:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=OhEgUOB92QopJxDtkpB/kyOIyuMWKtWWsN3PGIRlWBw=; b=kLnPe+dkYCEOCvcI7eAaPv/TjTybwXi9/8+YLm/CFZ4J8ecACyJLfgrkw1sGtAmgQJ OLqvFLXSsSpDxsyAGipT6gACLv4YleuKMnFWP9pA+7PibUfSTCDBwbJewzNXjFRTTGWw kIYwRopI/VRvQYwx+9meWsnaUkKxkpUUpTFMQHNq+7p54HceFFCWA7jz2wgJTgPRzk2A mpQUK4FL8EKE6N0T6yi3Hl+AMZqyIwN1uKEE8Mm91OYKmaB/qE19QOlAE15l1aCTBaS2 +kXAanjp/l+q0m9PJAeIU6C4zCuVavNz57EBDpLCDlc50MDTa6xCyQUep4pI2/5IL8/Z xwMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=OhEgUOB92QopJxDtkpB/kyOIyuMWKtWWsN3PGIRlWBw=; b=SQgSTIMeyuobmHshO8Rd5NSlnchhZTZIEpvDthGHePhIlgHLG0ct7A3tDDR/cCkJoH bLgPxukMhZ+zkI7bT+iZXOOS3gAeP5ka94gnU0783rZav1xWKhUCnryA1EUlimuRqfBd zS1rSGHaFSufl50GbjpUQV4t3QFBST4IoNxcKW8Ch9ccWJl1IMRm48CvC651faT8krhP MlR3EQSn0zrhabo8TsA5KKa54mD9Xx6a8UJmaXkeBNDP0Nt4WrBZ2820oZg3LY0rQ0PN W7Rz/AamubOrbvDdymYSRIgy/5brXhYI7+7RcnFS74hdoT20/FDmiCRBjyw0orsVSVfm +dBw== X-Gm-Message-State: ABuFfoicuAzH1AvuSPcKxx4BjXbjQfGLYeLQW5ci+sMzjZtyxgD9JT3+ sM1rm8dLQCiKVL9JLtohd/M= X-Received: by 2002:adf:ec11:: with SMTP id x17-v6mr6381768wrn.266.1538385901779; Mon, 01 Oct 2018 02:25:01 -0700 (PDT) Received: from laptop ([37.122.159.87]) by smtp.gmail.com with ESMTPSA id k25-v6sm10742636wre.18.2018.10.01.02.24.59 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 01 Oct 2018 02:25:01 -0700 (PDT) Message-ID: Subject: Re: [RFC 5/5] MIPS: Add Realtek RTL8186 SoC support From: Yasha Cherikovsky To: Marc Zyngier , Ralf Baechle , Paul Burton , James Hogan , linux-mips@linux-mips.org Cc: Thomas Gleixner , Jason Cooper , Daniel Lezcano , Rob Herring , Mark Rutland , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Date: Mon, 01 Oct 2018 12:24:58 +0300 In-Reply-To: <351da67a-b1e6-7972-5c91-0f204690080f@arm.com> References: <20180930141510.2690-1-yasha.che3@gmail.com> <20180930141510.2690-6-yasha.che3@gmail.com> <351da67a-b1e6-7972-5c91-0f204690080f@arm.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2018-10-01 at 10:15 +0100, Marc Zyngier wrote: > On 01/10/18 09:48, Yasha Cherikovsky wrote: > > Hi Marc, > > > > On Mon, 2018-10-01 at 09:19 +0100, Marc Zyngier wrote: > > > Hi Yasha, > > > > > > On 30/09/18 15:15, Yasha Cherikovsky wrote: > > > > The Realtek RTL8186 SoC is a MIPS based SoC > > > > used in some home routers [1][2]. > > > > > > > > The hardware includes Lexra LX5280 CPU with a TLB, > > > > two Ethernet controllers, a WLAN controller and more. > > > > > > > > With this patch, it is possible to successfully boot > > > > the kernel and load userspace on the Edimax BR-6204Wg > > > > router. > > > > Network drivers support will come in future patches. > > > > > > > > This patch includes: > > > > - New MIPS rtl8186 platform > > > > - Core platform setup code (mostly DT based) > > > > - New Kconfig option > > > > - defconfig file > > > > - MIPS zboot UART support > > > > - RTL8186 interrupt controller driver > > > > - RTL8186 timer driver > > > > - Device tree files for the RTL8186 SoC and Edimax BR-6204Wg > > > > router > > > > > > > > [1] https://www.linux-mips.org/wiki/Realtek_SOC#Realtek_RTL8186 > > > > [2] https://wikidevi.com/wiki/Realtek_RTL8186 > > > > > > > > Signed-off-by: Yasha Cherikovsky > > > > Cc: Ralf Baechle > > > > Cc: Paul Burton > > > > Cc: James Hogan > > > > Cc: Thomas Gleixner > > > > Cc: Jason Cooper > > > > Cc: Marc Zyngier > > > > Cc: Daniel Lezcano > > > > Cc: Rob Herring > > > > Cc: Mark Rutland > > > > Cc: linux-mips@linux-mips.org > > > > Cc: devicetree@vger.kernel.org > > > > Cc: linux-kernel@vger.kernel.org > > > > --- > > > > arch/mips/Kbuild.platforms | 1 + > > > > arch/mips/Kconfig | 17 ++ > > > > arch/mips/boot/compressed/uart-16550.c | 5 + > > > > arch/mips/boot/dts/Makefile | 1 + > > > > arch/mips/boot/dts/realtek/Makefile | 4 + > > > > arch/mips/boot/dts/realtek/rtl8186.dtsi | 86 +++++++ > > > > .../dts/realtek/rtl8186_edimax_br_6204wg.dts | 45 ++++ > > > > arch/mips/configs/rtl8186_defconfig | 112 +++++++++ > > > > arch/mips/include/asm/mach-rtl8186/rtl8186.h | 37 +++ > > > > arch/mips/rtl8186/Makefile | 2 + > > > > arch/mips/rtl8186/Platform | 7 + > > > > arch/mips/rtl8186/irq.c | 8 + > > > > arch/mips/rtl8186/prom.c | 15 ++ > > > > arch/mips/rtl8186/setup.c | 80 +++++++ > > > > arch/mips/rtl8186/time.c | 10 + > > > > drivers/clocksource/Kconfig | 9 + > > > > drivers/clocksource/Makefile | 1 + > > > > drivers/clocksource/timer-rtl8186.c | 220 > > > > ++++++++++++++++++ > > > > drivers/irqchip/Kconfig | 5 + > > > > drivers/irqchip/Makefile | 1 + > > > > drivers/irqchip/irq-rtl8186.c | 107 +++++++++ > > > > > > Could you please split this into at least three patches (arch code, > > > clocksource, irqchip) to ease the review? > > > > > > Thanks, > > > > > > M. > > > > Currently the RTL8186_IRQ and the RTL8186_TIMER Kconfig entries depend > > on > > MACH_RTL8186 (which is added in the MIPS portion of the same patch). > > Also, MACH_RTL8186 in MIPS selects these two options. > > > > What is the best way to split that? > > It is absolutely fine to have something depending on a non-selectable > config option, which would allow you to split things up as finely as you > want. Just have the patch enabling the config option last. > > Thanks, > > M. Good to know, thanks. I'll send a v2 soon. Yasha