Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp2224347ybh; Mon, 9 Mar 2020 01:24:34 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtfPl2UN/u5KJ8eIZ/1nnpMrdXYafWWuARqw43G7zfnXWtGr3GycJW0cbpb28LJyxrrwSAC X-Received: by 2002:aca:ab16:: with SMTP id u22mr2435908oie.133.1583742274647; Mon, 09 Mar 2020 01:24:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583742274; cv=none; d=google.com; s=arc-20160816; b=OWY1xkOmxKfb++O2qHUubdd9iHWNpFFt3v+DOVVfhV7whw3Sl5ZHjvFOQDy/RrZQOg xHD5aHSpzPlF0+Fv7meJ1in9NEXs8a6VQJz+FlKRrwoZ6Tgem7qybbUTycaoY+gcyQE3 MJCxDZEZXhACbBerz4IcMpVATgqsi8fMvLmBHsh9siGGsmOSVe/TQql9WcyODQCnSp42 jwq64r0M1Zc3ZoWTp0lvGoY4yadGuTinKaXGpYCQV1radeBKsPLO/UYmXNxGqYmfSaNG A7RuiYVOC/VJqd7x3VrlBuOcKLII+HEOjxmd6lfjbS2wq/ONEuVhGKRN9DGiHHwUkRRi 0i+w== 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; bh=eQrP/fPEyZoJcwlHGlyW72+UypBBsh2nw1zGfru6+Eo=; b=oqiyPOhlusNjc9p58OGLprxN3c8Kl/b3Pb4nyGcW3+yF3VwaArK3Rws8/qGXsTagx4 33JBa6rGY+dW4t13ItnhTzWFuCP0pUe2rXjUffLBe3AJBxD9v/hlduVb00ZawuTWrr99 +x20Gkqu4yptxJN2CHK2l9gS6cAhDe2HM1P0xmGJEu+npylOXTALL15gI0BG+CZYG+oi 4IM0I44j1920FEBy2S5Wdwtc5/6mJPoHl2xGiu7cFg36ajsVmqS2qYN06038jrdGs6k0 mHkEwmANIIM+xt+g3awlkPJUPND/Pfhvvhn4uiCDhJvf2o1Ugtddlhnc1NTrRrftbnFm mLrg== ARC-Authentication-Results: i=1; mx.google.com; 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 m3si794831otn.302.2020.03.09.01.24.22; Mon, 09 Mar 2020 01:24:34 -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; 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 S1726759AbgCIIXt (ORCPT + 99 others); Mon, 9 Mar 2020 04:23:49 -0400 Received: from mail.loongson.cn ([114.242.206.163]:55950 "EHLO loongson.cn" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726463AbgCIIXr (ORCPT ); Mon, 9 Mar 2020 04:23:47 -0400 Received: from linux.localdomain (unknown [113.200.148.30]) by mail.loongson.cn (Coremail) with SMTP id AQAAf9Dxb9_+_GVesb4YAA--.12S5; Mon, 09 Mar 2020 16:23:30 +0800 (CST) From: Tiezhu Yang To: Thomas Bogendoerfer , Huacai Chen , Jiaxun Yang , Bjorn Helgaas , Jens Axboe Cc: linux-mips@vger.kernel.org, linux-pci@vger.kernel.org, linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org, Xuefeng Li Subject: [PATCH 3/6] MIPS: Loongson: Use firmware arguments to get board name Date: Mon, 9 Mar 2020 16:23:23 +0800 Message-Id: <1583742206-29163-4-git-send-email-yangtiezhu@loongson.cn> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1583742206-29163-1-git-send-email-yangtiezhu@loongson.cn> References: <1583742206-29163-1-git-send-email-yangtiezhu@loongson.cn> X-CM-TRANSID: AQAAf9Dxb9_+_GVesb4YAA--.12S5 X-Coremail-Antispam: 1UD129KBjvJXoW7Cr47WF45uw1kZr1fGw1Utrb_yoW8Cw45pa n3A34kWr4Ygr1Uur98trW3Cr1fAa98Krs7JFW2vr15Ka4qq34aqFZ8C3W8ArsrAF45Ga47 XryrKr48GF4Ikw7anT9S1TB71UUUUUDqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUPK14x267AKxVWrJVCq3wAFc2x0x2IEx4CE42xK8VAvwI8IcIk0 rVWrJVCq3wAFIxvE14AKwVWUJVWUGwA2048vs2IY020E87I2jVAFwI0_JrWl82xGYIkIc2 x26xkF7I0E14v26ryj6s0DM28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48ve4kI8wA2z4x0 Y4vE2Ix0cI8IcVAFwI0_Gr0_Xr1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI0_Cr0_Gr1UM2 8EF7xvwVC2z280aVAFwI0_Gr1j6F4UJwA2z4x0Y4vEx4A2jsIEc7CjxVAFwI0_Cr1j6rxd M2AIxVAIcxkEcVAq07x20xvEncxIr21l5I8CrVACY4xI64kE6c02F40Ex7xfMcIj6xIIjx v20xvE14v26r1j6r18McIj6I8E87Iv67AKxVW8JVWxJwAm72CE4IkC6x0Yz7v_Jr0_Gr1l F7xvr2IYc2Ij64vIr41lF7I21c0EjII2zVCS5cI20VAGYxC7M4IIrI8v6xkF7I0E8cxan2 IY04v7MxkIecxEwVAFwVW8ZwCF04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8 JwC20s026c02F40E14v26r1j6r18MI8I3I0E7480Y4vE14v26r106r1rMI8E67AF67kF1V AFwI0_Jw0_GFylIxkGc2Ij64vIr41lIxAIcVC0I7IYx2IY67AKxVWUJVWUCwCI42IY6xII jxv20xvEc7CjxVAFwI0_Gr0_Cr1lIxAIcVCF04k26cxKx2IYs7xG6r1j6r1xMIIF0xvEx4 A2jsIE14v26r4j6F4UMIIF0xvEx4A2jsIEc7CjxVAFwI0_Gr0_Gr1UYxBIdaVFxhVjvjDU 0xZFpf9x0JUcXo7UUUUU= X-CM-SenderInfo: p1dqw3xlh2x3gn0dqz5rrqw2lrqou0/ Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In order to distinguish various types of bridge chip such as AMD RS780E or Loongson 7A1000, we can use firmware arguments to get board name. Signed-off-by: Tiezhu Yang --- arch/mips/include/asm/mach-loongson64/boot_param.h | 1 + arch/mips/loongson64/env.c | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/arch/mips/include/asm/mach-loongson64/boot_param.h b/arch/mips/include/asm/mach-loongson64/boot_param.h index 8c286be..225a563 100644 --- a/arch/mips/include/asm/mach-loongson64/boot_param.h +++ b/arch/mips/include/asm/mach-loongson64/boot_param.h @@ -217,5 +217,6 @@ struct loongson_system_configuration { extern struct efi_memory_map_loongson *loongson_memmap; extern struct loongson_system_configuration loongson_sysconf; +extern struct board_devices *eboard; #endif diff --git a/arch/mips/loongson64/env.c b/arch/mips/loongson64/env.c index 0daeb7b..a244a8c 100644 --- a/arch/mips/loongson64/env.c +++ b/arch/mips/loongson64/env.c @@ -24,6 +24,9 @@ EXPORT_SYMBOL(cpu_clock_freq); struct efi_memory_map_loongson *loongson_memmap; struct loongson_system_configuration loongson_sysconf; +struct board_devices *eboard; +EXPORT_SYMBOL(eboard); + u64 loongson_chipcfg[MAX_PACKAGES] = {0xffffffffbfc00180}; u64 loongson_chiptemp[MAX_PACKAGES]; u64 loongson_freqctrl[MAX_PACKAGES]; @@ -51,6 +54,8 @@ void __init prom_init_env(void) ((u64)loongson_p + loongson_p->system_offset); ecpu = (struct efi_cpuinfo_loongson *) ((u64)loongson_p + loongson_p->cpu_offset); + eboard = (struct board_devices *) + ((u64)loongson_p + loongson_p->boarddev_table_offset); eirq_source = (struct irq_source_routing_table *) ((u64)loongson_p + loongson_p->irq_offset); loongson_memmap = (struct efi_memory_map_loongson *) -- 2.1.0