Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp2224316ybh; Mon, 9 Mar 2020 01:24:31 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvOzjgGQJtoIaI96itrQcu8MiJ1LhxKZSg7skwuc9C9+HKtsE2OEbf7I2FLLndpYOzHK9V+ X-Received: by 2002:aca:3542:: with SMTP id c63mr10501616oia.135.1583742271434; Mon, 09 Mar 2020 01:24:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583742271; cv=none; d=google.com; s=arc-20160816; b=qkep/5pq5AMZVQVnnQcWszTkQzElrS5/B4HAUv/Up9SIYE5fBZuWmRecCTR7qDnAUl wZbT3P93x9i4lqONGj03C6GZQ3EYS8X4v7zyuFJh3WRwh859gHZMEyF5txcp1Q7U7ooA MFrOWRy64b/2CccNvodNGE9rDzhfgmBf3RBv7f3GRMrnTZbF/HR4jFxlu9BlSpK3oy3u L+IuJETXGplKKSkO9OglPqkLAz4/QEF8jOxrcuKKqTfc5NzHqq5uSKIgYRlM5zFhO9SW CxhBHsT9luNmb3ontlHa9zitnaRBVN6HLmevP/TZCKKP/HEzxlbmfSejwKwahZDCe6Gj Rulw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=fuKXWNLXzAQ93OcNIPOtwHxusFlri0lW0N/tdxvIBtA=; b=dG5uOt1Sq6YYCL7uuwf+ybCEklQCL94hWc7DyTQQJaIQfraYYaHzW6Q7berptsPq+u nSAYdTAQFKlkjpV7JG2Iuu5mkBAKV7GHorukeq1dyG6SRUbspKyV0RLm0WmOc9a+wPGm xnm3G10Si76GcWmiAMCz0SE8Jt/nxf6lxszowQQGx+DRyOLSpJ8v8iY1t1nn884Sw60K PxRMnEIBJlH+b+E275RJsWQgNlHNS1AWmWPnBdz42etc/Myuxa5lMBufbQVCeTCrJjHl J+QA3/Rwdbb4EMfSaOKvAN/14LZlRQ2KmZMNOZ+nkhU856W+xlOmzgxkL8x0MmBVU1H7 2TXg== 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 f20si5435523otl.313.2020.03.09.01.24.20; Mon, 09 Mar 2020 01:24:31 -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 S1726774AbgCIIXu (ORCPT + 99 others); Mon, 9 Mar 2020 04:23:50 -0400 Received: from mail.loongson.cn ([114.242.206.163]:55952 "EHLO loongson.cn" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726391AbgCIIXr (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--.12S2; Mon, 09 Mar 2020 16:23:27 +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 0/6] Add basic support for Loongson 7A1000 bridge chip Date: Mon, 9 Mar 2020 16:23:20 +0800 Message-Id: <1583742206-29163-1-git-send-email-yangtiezhu@loongson.cn> X-Mailer: git-send-email 2.1.0 X-CM-TRANSID: AQAAf9Dxb9_+_GVesb4YAA--.12S2 X-Coremail-Antispam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lh2x3gn0dqz5rrqw2lrqou0/ Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The Loongson 7A1000 bridge chip has been released for several years since the second half of 2017, but it is not supported by the Linux mainline kernel while it only works well with the Loongson internal kernel version. When I update the latest version of Linux mainline kernel on the Loongson 3A3000 CPU and 7A1000 bridge chip system, the boot process failed and I feel depressed. The 7A1000 bridge chip is used a lot with 3A3000 or 3A4000 CPU in the most Loongson desktop and sever products, it is important to support Loongson 7A1000 bridge chip by the Linux mainline kernel. This patch series adds the basic support for the Loongson 7A1000 bridge chip, when apply these patches based on linux-5.6-rc5, the boot process is successful and we can login normally used with the latest firmware and discrete graphics card, the next work to do is power management and some other controller device drivers. Additionally, when I git clone mips code [1], the speed is too slow and clone always failed, so this patch series is based on the latest linux-5.6-rc5 [2]. If you have any questions and suggestions, please let me know. Thanks, Tiezhu Yang [1] git clone https://git.kernel.org/pub/scm/linux/kernel/git/mips/linux.git [2] git clone https://github.com/torvalds/linux.git Tiezhu Yang (6): PCI: Add Loongson vendor ID and 7A1000 device IDs AHCI: Add support for Loongson 7A1000 SATA controller MIPS: Loongson: Use firmware arguments to get board name MIPS: Loongson: Add DMA support for 7A1000 MIPS: Loongson: Add PCI support for 7A1000 MIPS: Loongson: Add support for 7A1000 interrupt controller arch/mips/include/asm/mach-loongson64/boot_param.h | 2 + arch/mips/include/asm/mach-loongson64/ioaicu.h | 166 +++++++++++ arch/mips/include/asm/mach-loongson64/irq.h | 2 + arch/mips/include/asm/mach-loongson64/pci.h | 1 + arch/mips/loongson64/Makefile | 2 +- arch/mips/loongson64/dma.c | 49 +++- arch/mips/loongson64/env.c | 5 + arch/mips/loongson64/init.c | 13 + arch/mips/loongson64/ioaicu.c | 305 +++++++++++++++++++++ arch/mips/loongson64/irq.c | 20 +- arch/mips/loongson64/pci.c | 12 +- arch/mips/loongson64/smp.c | 11 +- arch/mips/pci/Makefile | 2 +- arch/mips/pci/ops-loongson3-ls7a.c | 132 +++++++++ drivers/ata/ahci.c | 8 + include/linux/pci_ids.h | 18 ++ 16 files changed, 733 insertions(+), 15 deletions(-) create mode 100644 arch/mips/include/asm/mach-loongson64/ioaicu.h create mode 100644 arch/mips/loongson64/ioaicu.c create mode 100644 arch/mips/pci/ops-loongson3-ls7a.c -- 2.1.0