Received: by 10.223.164.202 with SMTP id h10csp285842wrb; Tue, 14 Nov 2017 22:59:27 -0800 (PST) X-Google-Smtp-Source: AGs4zMYEzPAr+2aqCfK85DHrwlRyIf1MpMmcjDUMtJ/fAhWHOhF7190PZNSkRr5pWoARmjnkwf27 X-Received: by 10.84.192.3 with SMTP id b3mr15278152pld.118.1510729167599; Tue, 14 Nov 2017 22:59:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510729167; cv=none; d=google.com; s=arc-20160816; b=QbqYcAlGYLNXGO//k0q2WcPF3LQsitwO4O41dNYL3UCJK+7e9ODot5+7QjrhDqlLF6 WBzXBq210goxeigK+FbVxpf2Y7yktBjXrkflK3HsEZmt7kQ3XpxZ6fktR8+p6hNfSOPi Eu5f7Gmer1WzMnbpJxWHXBaPO+qsfyF0tS+fAqs6k3pUEDHIGa25HG28yIgXGoBZSofb GjsII2IfCi6yhH621K5wiGimCtATcScwx4b70XbnQzrQskbOcC87BcwFMrrHuPw9s/lA o3N8PLqXvL2ML1CHLDbrIOjlb0KYwoA+GXCbWEYnxhvXOdMbr+rtbC1uH/CWox4TJNoO KtBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-signature :arc-authentication-results; bh=MrOrknRG+3Xo+cBufeUr67xb+xdeHv+IVTUwXO5v3hQ=; b=oh8y3ne7mUOOM49QVnvyTUHB+DDQmstzeYXTSLCmkAGbZi94rudGWD13tnUeUUfSG5 Eg30A579U1JH7B+Hanv/YmaaREoi0zqvv0LpWtIrcG7wp2uZl0SZNGgIdImbLgBAOGCG KTQTqOb6VUQ2jeFIXSpkNE2vQOJ7Mx5Lwsx5xe62SAgErLLCIXfxs1YjEwCa9r1i5X6l 2QP21lLjnf6wlefqx1mnE2gbft3sq2H2V2oC3pGPHaTqNzXvrXQwlCjvu/6kscaGfe0V jgyNNz10ifNIBsSXzWF2bBEqKCbzNvx3Y3vHKAKFTWkDhg9EXQ3BfHoJqqC5b7a0mtpa Sr5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@flygoat.com header.s=mail header.b=Jk+ZCwdI; dkim=pass header.i=@flygoat.com header.s=mail header.b=Jk+ZCwdI; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l11si4223344pgc.682.2017.11.14.22.59.15; Tue, 14 Nov 2017 22:59:27 -0800 (PST) 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=@flygoat.com header.s=mail header.b=Jk+ZCwdI; dkim=pass header.i=@flygoat.com header.s=mail header.b=Jk+ZCwdI; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757490AbdKODNp (ORCPT + 87 others); Tue, 14 Nov 2017 22:13:45 -0500 Received: from forward101j.mail.yandex.net ([5.45.198.241]:54911 "EHLO forward101j.mail.yandex.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755343AbdKODNE (ORCPT ); Tue, 14 Nov 2017 22:13:04 -0500 Received: from mxback3j.mail.yandex.net (mxback3j.mail.yandex.net [IPv6:2a02:6b8:0:1619::10c]) by forward101j.mail.yandex.net (Yandex) with ESMTP id 845CD1244649; Wed, 15 Nov 2017 06:13:03 +0300 (MSK) Received: from smtp1j.mail.yandex.net (smtp1j.mail.yandex.net [2a02:6b8:0:801::ab]) by mxback3j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id zsJnHGLmnq-D3iiZ8xc; Wed, 15 Nov 2017 06:13:03 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=flygoat.com; s=mail; t=1510715583; bh=MrOrknRG+3Xo+cBufeUr67xb+xdeHv+IVTUwXO5v3hQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=Jk+ZCwdIm9dfdvwIjy7FwSyMrt69ADwFLEnOqmf9r99jOEtDOpcRJ1bZnE2H/LEqJ UlIoBrsl421ukhTds9jnh9hHLFjD2Q74hETviuyn5i9DGy3LLm1RhgLxUI6i2Zr5Pt ZCNfjs9K5nEdCpa4eYdJXyqEfmfrH1nGDN0FrtBU= Received: by smtp1j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id sPMPJaqN4J-D0cum4CY; Wed, 15 Nov 2017 06:13:02 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=flygoat.com; s=mail; t=1510715583; bh=MrOrknRG+3Xo+cBufeUr67xb+xdeHv+IVTUwXO5v3hQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=Jk+ZCwdIm9dfdvwIjy7FwSyMrt69ADwFLEnOqmf9r99jOEtDOpcRJ1bZnE2H/LEqJ UlIoBrsl421ukhTds9jnh9hHLFjD2Q74hETviuyn5i9DGy3LLm1RhgLxUI6i2Zr5Pt ZCNfjs9K5nEdCpa4eYdJXyqEfmfrH1nGDN0FrtBU= Authentication-Results: smtp1j.mail.yandex.net; dkim=pass header.i=@flygoat.com From: Jiaxun Yang To: Ralf Baechle Cc: linux-mips@linux-mips.org, linux-kernel@vger.kernel.org, Jiaxun Yang Subject: [PATCH v3 4/4] MIPS: Loongson64: Load platform device during boot Date: Wed, 15 Nov 2017 11:11:55 +0800 Message-Id: <20171115031155.643-4-jiaxun.yang@flygoat.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20171115031155.643-1-jiaxun.yang@flygoat.com> References: <20171112063617.26546-1-jiaxun.yang@flygoat.com> <20171115031155.643-1-jiaxun.yang@flygoat.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch just add pdev during boot to load the platform driver Signed-off-by: Jiaxun Yang --- arch/mips/loongson64/lemote-2f/Makefile | 2 +- arch/mips/loongson64/lemote-2f/platform.c | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 arch/mips/loongson64/lemote-2f/platform.c diff --git a/arch/mips/loongson64/lemote-2f/Makefile b/arch/mips/loongson64/lemote-2f/Makefile index 08b8abcbfef5..31c90737b98c 100644 --- a/arch/mips/loongson64/lemote-2f/Makefile +++ b/arch/mips/loongson64/lemote-2f/Makefile @@ -2,7 +2,7 @@ # Makefile for lemote loongson2f family machines # -obj-y += clock.o machtype.o irq.o reset.o ec_kb3310b.o +obj-y += clock.o machtype.o irq.o reset.o ec_kb3310b.o platform.o # # Suspend Support diff --git a/arch/mips/loongson64/lemote-2f/platform.c b/arch/mips/loongson64/lemote-2f/platform.c new file mode 100644 index 000000000000..46922f730a64 --- /dev/null +++ b/arch/mips/loongson64/lemote-2f/platform.c @@ -0,0 +1,27 @@ +/* + * Copyright (C) 2017 Jiaxun Yang. + * Author: Jiaxun Yang, jiaxun.yang@flygoat.com + + * Copyright (C) 2009 Lemote Inc. + * Author: Wu Zhangjin, wuzhangjin@gmail.com + * + * 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 + +static int __init lemote2f_platform_init(void) +{ + if (mips_machtype != MACH_LEMOTE_YL2F89) + return -ENODEV; + + return platform_device_register_simple("yeeloong_laptop", -1, NULL, 0); +} + +arch_initcall(lemote2f_platform_init); \ No newline at end of file -- 2.14.1 From 1584065006701201978@xxx Tue Nov 14 17:55:12 +0000 2017 X-GM-THRID: 1584065006701201978 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread