Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'mips_5.7' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux

Pull MIPS updates from Thomas Bogendoerfer:

- loongson64 irq rework

- dmi support loongson

- replace setup_irq() by request_irq()

- jazz cleanups

- minor cleanups and fixes

* tag 'mips_5.7' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: (44 commits)
MIPS: ralink: mt7621: Fix soc_device introduction
MIPS: Exclude more dsemul code when CONFIG_MIPS_FP_SUPPORT=n
MIPS/tlbex: Fix LDDIR usage in setup_pw() for Loongson-3
MIPS: do not compile generic functions for CONFIG_CAVIUM_OCTEON_SOC
MAINTAINERS: Update Loongson64 entry
MIPS: Loongson64: Load built-in dtbs
MIPS: Loongson64: Add generic dts
dt-bindings: mips: Add loongson boards
MIPS: Loongson64: Drop legacy IRQ code
dt-bindings: interrupt-controller: Add Loongson-3 HTPIC
irqchip: Add driver for Loongson-3 HyperTransport PIC controller
dt-bindings: interrupt-controller: Add Loongson LIOINTC
irqchip: loongson-liointc: Workaround LPC IRQ Errata
irqchip: Add driver for Loongson I/O Local Interrupt Controller
docs: mips: remove no longer needed au1xxx_ide.rst documentation
MIPS: Alchemy: remove no longer used au1xxx_ide.h header
ide: remove no longer used au1xxx-ide driver
MIPS: Add support for Desktop Management Interface (DMI)
firmware: dmi: Add macro SMBIOS_ENTRY_POINT_SCAN_START
MIPS: ralink: mt7621: introduce 'soc_device' initialization
...

+1369 -1924
+59
Documentation/devicetree/bindings/interrupt-controller/loongson,htpic.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: "http://devicetree.org/schemas/interrupt-controller/loongson,htpic.yaml#" 5 + $schema: "http://devicetree.org/meta-schemas/core.yaml#" 6 + 7 + title: Loongson-3 HyperTransport Interrupt Controller 8 + 9 + maintainers: 10 + - Jiaxun Yang <jiaxun.yang@flygoat.com> 11 + 12 + allOf: 13 + - $ref: /schemas/interrupt-controller.yaml# 14 + 15 + description: | 16 + This interrupt controller is found in the Loongson-3 family of chips to transmit 17 + interrupts from PCH PIC connected on HyperTransport bus. 18 + 19 + properties: 20 + compatible: 21 + const: loongson,htpic-1.0 22 + 23 + reg: 24 + maxItems: 1 25 + 26 + interrupts: 27 + minItems: 1 28 + maxItems: 4 29 + description: | 30 + Four parent interrupts that receive chained interrupts. 31 + 32 + interrupt-controller: true 33 + 34 + '#interrupt-cells': 35 + const: 1 36 + 37 + required: 38 + - compatible 39 + - reg 40 + - interrupts 41 + - interrupt-controller 42 + - '#interrupt-cells' 43 + 44 + examples: 45 + - | 46 + #include <dt-bindings/interrupt-controller/irq.h> 47 + htintc: interrupt-controller@1fb000080 { 48 + compatible = "loongson,htintc-1.0"; 49 + reg = <0xfb000080 0x40>; 50 + interrupt-controller; 51 + #interrupt-cells = <1>; 52 + 53 + interrupt-parent = <&liointc>; 54 + interrupts = <24 IRQ_TYPE_LEVEL_HIGH>, 55 + <25 IRQ_TYPE_LEVEL_HIGH>, 56 + <26 IRQ_TYPE_LEVEL_HIGH>, 57 + <27 IRQ_TYPE_LEVEL_HIGH>; 58 + }; 59 + ...
+93
Documentation/devicetree/bindings/interrupt-controller/loongson,liointc.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: "http://devicetree.org/schemas/interrupt-controller/loongson,liointc.yaml#" 5 + $schema: "http://devicetree.org/meta-schemas/core.yaml#" 6 + 7 + title: Loongson Local I/O Interrupt Controller 8 + 9 + maintainers: 10 + - Jiaxun Yang <jiaxun.yang@flygoat.com> 11 + 12 + description: | 13 + This interrupt controller is found in the Loongson-3 family of chips as the primary 14 + package interrupt controller which can route local I/O interrupt to interrupt lines 15 + of cores. 16 + 17 + allOf: 18 + - $ref: /schemas/interrupt-controller.yaml# 19 + 20 + properties: 21 + compatible: 22 + oneOf: 23 + - const: loongson,liointc-1.0 24 + - const: loongson,liointc-1.0a 25 + 26 + reg: 27 + maxItems: 1 28 + 29 + interrupt-controller: true 30 + 31 + interrupts: 32 + description: 33 + Interrupt source of the CPU interrupts. 34 + minItems: 1 35 + maxItems: 4 36 + 37 + interrupt-names: 38 + description: List of names for the parent interrupts. 39 + items: 40 + - const: int0 41 + - const: int1 42 + - const: int2 43 + - const: int3 44 + minItems: 1 45 + maxItems: 4 46 + 47 + '#interrupt-cells': 48 + const: 2 49 + 50 + 'loongson,parent_int_map': 51 + description: | 52 + This property points how the children interrupts will be mapped into CPU 53 + interrupt lines. Each cell refers to a parent interrupt line from 0 to 3 54 + and each bit in the cell refers to a children interrupt fron 0 to 31. 55 + If a CPU interrupt line didn't connected with liointc, then keep it's 56 + cell with zero. 57 + allOf: 58 + - $ref: /schemas/types.yaml#/definitions/uint32-array 59 + - items: 60 + minItems: 4 61 + maxItems: 4 62 + 63 + 64 + required: 65 + - compatible 66 + - reg 67 + - interrupts 68 + - interrupt-controller 69 + - '#interrupt-cells' 70 + - 'loongson,parent_int_map' 71 + 72 + 73 + examples: 74 + - | 75 + iointc: interrupt-controller@3ff01400 { 76 + compatible = "loongson,liointc-1.0"; 77 + reg = <0x3ff01400 0x64>; 78 + 79 + interrupt-controller; 80 + #interrupt-cells = <2>; 81 + 82 + interrupt-parent = <&cpuintc>; 83 + interrupts = <2>, <3>; 84 + interrupt-names = "int0", "int1"; 85 + 86 + loongson,parent_int_map = <0xf0ffffff>, /* int0 */ 87 + <0x0f000000>, /* int1 */ 88 + <0x00000000>, /* int2 */ 89 + <0x00000000>; /* int3 */ 90 + 91 + }; 92 + 93 + ...
+27
Documentation/devicetree/bindings/mips/loongson/devices.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/mips/loongson/devices.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Loongson based Platforms Device Tree Bindings 8 + 9 + maintainers: 10 + - Jiaxun Yang <jiaxun.yang@flygoat.com> 11 + description: | 12 + Devices with a Loongson CPU shall have the following properties. 13 + 14 + properties: 15 + $nodename: 16 + const: '/' 17 + compatible: 18 + oneOf: 19 + 20 + - description: Generic Loongson3 Quad Core + RS780E 21 + items: 22 + - const: loongson,loongson3-4core-rs780e 23 + 24 + - description: Generic Loongson3 Octa Core + RS780E 25 + items: 26 + - const: loongson,loongson3-8core-rs780e 27 + ...
-130
Documentation/mips/au1xxx_ide.rst
··· 1 - .. include:: <isonum.txt> 2 - 3 - ====================== 4 - MIPS AU1XXX IDE driver 5 - ====================== 6 - 7 - Released 2005-07-15 8 - 9 - About 10 - ===== 11 - 12 - This file describes the 'drivers/ide/au1xxx-ide.c', related files and the 13 - services they provide. 14 - 15 - If you are short in patience and just want to know how to add your hard disc to 16 - the white or black list, go to the 'ADD NEW HARD DISC TO WHITE OR BLACK LIST' 17 - section. 18 - 19 - 20 - License 21 - ======= 22 - 23 - :Copyright: |copy| 2003-2005 AMD, Personal Connectivity Solutions 24 - 25 - This program is free software; you can redistribute it and/or modify it under 26 - the terms of the GNU General Public License as published by the Free Software 27 - Foundation; either version 2 of the License, or (at your option) any later 28 - version. 29 - 30 - THIS SOFTWARE IS PROVIDED ``AS IS`` AND ANY EXPRESS OR IMPLIED WARRANTIES, 31 - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 32 - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR 33 - BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 34 - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 35 - SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 36 - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 37 - CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 38 - ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 39 - POSSIBILITY OF SUCH DAMAGE. 40 - 41 - You should have received a copy of the GNU General Public License along with 42 - this program; if not, write to the Free Software Foundation, Inc., 43 - 675 Mass Ave, Cambridge, MA 02139, USA. 44 - 45 - Note: 46 - for more information, please refer "AMD Alchemy Au1200/Au1550 IDE 47 - Interface and Linux Device Driver" Application Note. 48 - 49 - 50 - Files, Configs and Compatibility 51 - ================================ 52 - 53 - Two files are introduced: 54 - 55 - a) 'arch/mips/include/asm/mach-au1x00/au1xxx_ide.h' 56 - contains : struct _auide_hwif 57 - 58 - - timing parameters for PIO mode 0/1/2/3/4 59 - - timing parameters for MWDMA 0/1/2 60 - 61 - b) 'drivers/ide/mips/au1xxx-ide.c' 62 - contains the functionality of the AU1XXX IDE driver 63 - 64 - Following extra configs variables are introduced: 65 - 66 - CONFIG_BLK_DEV_IDE_AU1XXX_PIO_DBDMA 67 - - enable the PIO+DBDMA mode 68 - CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA 69 - - enable the MWDMA mode 70 - 71 - 72 - Supported IDE Modes 73 - =================== 74 - 75 - The AU1XXX IDE driver supported all PIO modes - PIO mode 0/1/2/3/4 - and all 76 - MWDMA modes - MWDMA 0/1/2 -. There is no support for SWDMA and UDMA mode. 77 - 78 - To change the PIO mode use the program hdparm with option -p, e.g. 79 - 'hdparm -p0 [device]' for PIO mode 0. To enable the MWDMA mode use the option 80 - -X, e.g. 'hdparm -X32 [device]' for MWDMA mode 0. 81 - 82 - 83 - Performance Configurations 84 - ========================== 85 - 86 - If the used system doesn't need USB support enable the following kernel 87 - configs:: 88 - 89 - CONFIG_IDE=y 90 - CONFIG_BLK_DEV_IDE=y 91 - CONFIG_IDE_GENERIC=y 92 - CONFIG_BLK_DEV_IDEPCI=y 93 - CONFIG_BLK_DEV_GENERIC=y 94 - CONFIG_BLK_DEV_IDEDMA_PCI=y 95 - CONFIG_BLK_DEV_IDE_AU1XXX=y 96 - CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA=y 97 - CONFIG_BLK_DEV_IDEDMA=y 98 - 99 - Also define 'IDE_AU1XXX_BURSTMODE' in 'drivers/ide/mips/au1xxx-ide.c' to enable 100 - the burst support on DBDMA controller. 101 - 102 - If the used system need the USB support enable the following kernel configs for 103 - high IDE to USB throughput. 104 - 105 - :: 106 - 107 - CONFIG_IDE_GENERIC=y 108 - CONFIG_BLK_DEV_IDEPCI=y 109 - CONFIG_BLK_DEV_GENERIC=y 110 - CONFIG_BLK_DEV_IDEDMA_PCI=y 111 - CONFIG_BLK_DEV_IDE_AU1XXX=y 112 - CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA=y 113 - CONFIG_BLK_DEV_IDEDMA=y 114 - 115 - Also undefine 'IDE_AU1XXX_BURSTMODE' in 'drivers/ide/mips/au1xxx-ide.c' to 116 - disable the burst support on DBDMA controller. 117 - 118 - 119 - Acknowledgments 120 - =============== 121 - 122 - These drivers wouldn't have been done without the base of kernel 2.4.x AU1XXX 123 - IDE driver from AMD. 124 - 125 - Additional input also from: 126 - Matthias Lenk <matthias.lenk@amd.com> 127 - 128 - Happy hacking! 129 - 130 - Enrico Walther <enrico.walther@amd.com>
-2
Documentation/mips/index.rst
··· 10 10 11 11 ingenic-tcu 12 12 13 - au1xxx_ide 14 - 15 13 .. only:: subproject and html 16 14 17 15 Indices
+1
MAINTAINERS
··· 11202 11202 F: arch/mips/loongson64/ 11203 11203 F: arch/mips/include/asm/mach-loongson64/ 11204 11204 F: drivers/platform/mips/cpu_hwmon.c 11205 + F: drivers/irqchip/irq-loongson* 11205 11206 F: drivers/*/*loongson3* 11206 11207 F: drivers/*/*/*loongson3* 11207 11208
+28 -3
arch/mips/Kconfig
··· 486 486 select SYS_SUPPORTS_HIGHMEM 487 487 select SYS_SUPPORTS_LITTLE_ENDIAN 488 488 select SYS_SUPPORTS_ZBOOT 489 - select LOONGSON_MC146818 490 489 select ZONE_DMA32 491 490 select NUMA 491 + select COMMON_CLK 492 + select USE_OF 493 + select BUILTIN_DTB 492 494 help 493 495 This enables the support of Loongson-2/3 family of machines. 494 496 ··· 975 973 select SYS_HAS_EARLY_PRINTK 976 974 select SYS_HAS_CPU_CAVIUM_OCTEON 977 975 select HAVE_PCI 976 + select HAVE_PLAT_DELAY 977 + select HAVE_PLAT_FW_INIT_CMDLINE 978 + select HAVE_PLAT_MEMCPY 978 979 select ZONE_DMA32 979 980 select HOLES_IN_ZONE 980 981 select GPIOLIB ··· 1233 1228 config GENERIC_ISA_DMA_SUPPORT_BROKEN 1234 1229 bool 1235 1230 select GENERIC_ISA_DMA 1231 + 1232 + config HAVE_PLAT_DELAY 1233 + bool 1234 + 1235 + config HAVE_PLAT_FW_INIT_CMDLINE 1236 + bool 1237 + 1238 + config HAVE_PLAT_MEMCPY 1239 + bool 1236 1240 1237 1241 config ISA_DMA_API 1238 1242 bool ··· 2690 2676 Say Y to compile the kernel to support NUMA (Non-Uniform Memory 2691 2677 Access). This option improves performance on systems with more 2692 2678 than two nodes; on two node systems it is generally better to 2693 - leave it disabled; on single node systems disable this option 2679 + leave it disabled; on single node systems leave this option 2694 2680 disabled. 2695 2681 2696 2682 config SYS_SUPPORTS_NUMA ··· 2771 2757 help 2772 2758 Enable hardware performance counter support for perf events. If 2773 2759 disabled, perf events will use software events only. 2760 + 2761 + config DMI 2762 + bool "Enable DMI scanning" 2763 + depends on MACH_LOONGSON64 2764 + select DMI_SCAN_MACHINE_NON_EFI_FALLBACK 2765 + default y 2766 + help 2767 + Enabled scanning of DMI to identify machine quirks. Say Y 2768 + here unless you have verified that your setup is not 2769 + affected by entries in the DMI blacklist. Required by PNP 2770 + BIOS code. 2774 2771 2775 2772 config SMP 2776 2773 bool "Multi-Processing support" ··· 3095 3070 choice 3096 3071 prompt "Kernel command line type" if !CMDLINE_OVERRIDE 3097 3072 default MIPS_CMDLINE_FROM_DTB if USE_OF && !ATH79 && !MACH_INGENIC && \ 3098 - !MIPS_MALTA && \ 3073 + !MACH_LOONGSON64 && !MIPS_MALTA && \ 3099 3074 !CAVIUM_OCTEON_SOC 3100 3075 default MIPS_CMDLINE_FROM_BOOTLOADER 3101 3076
+3 -8
arch/mips/alchemy/common/time.c
··· 72 72 .cpumask = cpu_possible_mask, 73 73 }; 74 74 75 - static struct irqaction au1x_rtcmatch2_irqaction = { 76 - .handler = au1x_rtcmatch2_irq, 77 - .flags = IRQF_TIMER, 78 - .name = "timer", 79 - .dev_id = &au1x_rtcmatch2_clockdev, 80 - }; 81 - 82 75 static int __init alchemy_time_init(unsigned int m2int) 83 76 { 84 77 struct clock_event_device *cd = &au1x_rtcmatch2_clockdev; ··· 123 130 cd->min_delta_ns = clockevent_delta2ns(9, cd); 124 131 cd->min_delta_ticks = 9; /* ~0.28ms */ 125 132 clockevents_register_device(cd); 126 - setup_irq(m2int, &au1x_rtcmatch2_irqaction); 133 + if (request_irq(m2int, au1x_rtcmatch2_irq, IRQF_TIMER, "timer", 134 + &au1x_rtcmatch2_clockdev)) 135 + pr_err("Failed to register timer interrupt\n"); 127 136 128 137 printk(KERN_INFO "Alchemy clocksource installed\n"); 129 138
+8 -8
arch/mips/ar7/irq.c
··· 83 83 .irq_ack = ar7_ack_sec_irq, 84 84 }; 85 85 86 - static struct irqaction ar7_cascade_action = { 87 - .handler = no_action, 88 - .name = "AR7 cascade interrupt", 89 - .flags = IRQF_NO_THREAD, 90 - }; 91 - 92 86 static void __init ar7_irq_init(int base) 93 87 { 94 88 int i; ··· 110 116 handle_level_irq); 111 117 } 112 118 113 - setup_irq(2, &ar7_cascade_action); 114 - setup_irq(ar7_irq_base, &ar7_cascade_action); 119 + if (request_irq(2, no_action, IRQF_NO_THREAD, "AR7 cascade interrupt", 120 + NULL)) 121 + pr_err("Failed to request irq 2 (AR7 cascade interrupt)\n"); 122 + if (request_irq(ar7_irq_base, no_action, IRQF_NO_THREAD, 123 + "AR7 cascade interrupt", NULL)) { 124 + pr_err("Failed to request irq %d (AR7 cascade interrupt)\n", 125 + ar7_irq_base); 126 + } 115 127 set_c0_status(IE_IRQ0); 116 128 } 117 129
+3 -6
arch/mips/ath25/ar2315.c
··· 64 64 return IRQ_HANDLED; 65 65 } 66 66 67 - static struct irqaction ar2315_ahb_err_interrupt = { 68 - .handler = ar2315_ahb_err_handler, 69 - .name = "ar2315-ahb-error", 70 - }; 71 - 72 67 static void ar2315_misc_irq_handler(struct irq_desc *desc) 73 68 { 74 69 u32 pending = ar2315_rst_reg_read(AR2315_ISR) & ··· 154 159 panic("Failed to add IRQ domain"); 155 160 156 161 irq = irq_create_mapping(domain, AR2315_MISC_IRQ_AHB); 157 - setup_irq(irq, &ar2315_ahb_err_interrupt); 162 + if (request_irq(irq, ar2315_ahb_err_handler, 0, "ar2315-ahb-error", 163 + NULL)) 164 + pr_err("Failed to register ar2315-ahb-error interrupt\n"); 158 165 159 166 irq_set_chained_handler_and_data(AR2315_IRQ_MISC, 160 167 ar2315_misc_irq_handler, domain);
+3 -6
arch/mips/ath25/ar5312.c
··· 68 68 return IRQ_HANDLED; 69 69 } 70 70 71 - static struct irqaction ar5312_ahb_err_interrupt = { 72 - .handler = ar5312_ahb_err_handler, 73 - .name = "ar5312-ahb-error", 74 - }; 75 - 76 71 static void ar5312_misc_irq_handler(struct irq_desc *desc) 77 72 { 78 73 u32 pending = ar5312_rst_reg_read(AR5312_ISR) & ··· 149 154 panic("Failed to add IRQ domain"); 150 155 151 156 irq = irq_create_mapping(domain, AR5312_MISC_IRQ_AHB_PROC); 152 - setup_irq(irq, &ar5312_ahb_err_interrupt); 157 + if (request_irq(irq, ar5312_ahb_err_handler, 0, "ar5312-ahb-error", 158 + NULL)) 159 + pr_err("Failed to register ar5312-ahb-error interrupt\n"); 153 160 154 161 irq_set_chained_handler_and_data(AR5312_IRQ_MISC, 155 162 ar5312_misc_irq_handler, domain);
+1 -1
arch/mips/ath79/setup.c
··· 15 15 #include <linux/memblock.h> 16 16 #include <linux/err.h> 17 17 #include <linux/clk.h> 18 - #include <linux/clk-provider.h> 18 + #include <linux/of_clk.h> 19 19 #include <linux/of_fdt.h> 20 20 #include <linux/irqchip.h> 21 21
+16 -25
arch/mips/bcm63xx/irq.c
··· 399 399 .irq_set_type = bcm63xx_external_irq_set_type, 400 400 }; 401 401 402 - static struct irqaction cpu_ip2_cascade_action = { 403 - .handler = no_action, 404 - .name = "cascade_ip2", 405 - .flags = IRQF_NO_THREAD, 406 - }; 407 - 408 - #ifdef CONFIG_SMP 409 - static struct irqaction cpu_ip3_cascade_action = { 410 - .handler = no_action, 411 - .name = "cascade_ip3", 412 - .flags = IRQF_NO_THREAD, 413 - }; 414 - #endif 415 - 416 - static struct irqaction cpu_ext_cascade_action = { 417 - .handler = no_action, 418 - .name = "cascade_extirq", 419 - .flags = IRQF_NO_THREAD, 420 - }; 421 - 422 402 static void bcm63xx_init_irq(void) 423 403 { 424 404 int irq_bits; ··· 511 531 512 532 void __init arch_init_irq(void) 513 533 { 514 - int i; 534 + int i, irq; 515 535 516 536 bcm63xx_init_irq(); 517 537 mips_cpu_irq_init(); ··· 524 544 handle_edge_irq); 525 545 526 546 if (!is_ext_irq_cascaded) { 527 - for (i = 3; i < 3 + ext_irq_count; ++i) 528 - setup_irq(MIPS_CPU_IRQ_BASE + i, &cpu_ext_cascade_action); 547 + for (i = 3; i < 3 + ext_irq_count; ++i) { 548 + irq = MIPS_CPU_IRQ_BASE + i; 549 + if (request_irq(irq, no_action, IRQF_NO_THREAD, 550 + "cascade_extirq", NULL)) { 551 + pr_err("Failed to request irq %d (cascade_extirq)\n", 552 + irq); 553 + } 554 + } 529 555 } 530 556 531 - setup_irq(MIPS_CPU_IRQ_BASE + 2, &cpu_ip2_cascade_action); 557 + irq = MIPS_CPU_IRQ_BASE + 2; 558 + if (request_irq(irq, no_action, IRQF_NO_THREAD, "cascade_ip2", NULL)) 559 + pr_err("Failed to request irq %d (cascade_ip2)\n", irq); 532 560 #ifdef CONFIG_SMP 533 561 if (is_ext_irq_cascaded) { 534 - setup_irq(MIPS_CPU_IRQ_BASE + 3, &cpu_ip3_cascade_action); 562 + irq = MIPS_CPU_IRQ_BASE + 3; 563 + if (request_irq(irq, no_action, IRQF_NO_THREAD, "cascade_ip3", 564 + NULL)) 565 + pr_err("Failed to request irq %d (cascade_ip3)\n", irq); 535 566 bcm63xx_internal_irq_chip.irq_set_affinity = 536 567 bcm63xx_internal_set_affinity; 537 568
+1 -1
arch/mips/bmips/setup.c
··· 10 10 #include <linux/init.h> 11 11 #include <linux/bitops.h> 12 12 #include <linux/memblock.h> 13 - #include <linux/clk-provider.h> 14 13 #include <linux/ioport.h> 15 14 #include <linux/kernel.h> 16 15 #include <linux/io.h> 17 16 #include <linux/of.h> 17 + #include <linux/of_clk.h> 18 18 #include <linux/of_fdt.h> 19 19 #include <linux/of_platform.h> 20 20 #include <linux/libfdt.h>
+1
arch/mips/boot/dts/Makefile
··· 4 4 subdir-y += img 5 5 subdir-y += ingenic 6 6 subdir-y += lantiq 7 + subdir-y += loongson 7 8 subdir-y += mscc 8 9 subdir-y += mti 9 10 subdir-y += netlogic
+19
arch/mips/boot/dts/ingenic/ci20.dts
··· 4 4 #include "jz4780.dtsi" 5 5 #include <dt-bindings/clock/ingenic,tcu.h> 6 6 #include <dt-bindings/gpio/gpio.h> 7 + #include <dt-bindings/input/input.h> 7 8 #include <dt-bindings/interrupt-controller/irq.h> 8 9 #include <dt-bindings/regulator/active-semi,8865-regulator.h> 9 10 ··· 26 25 device_type = "memory"; 27 26 reg = <0x0 0x10000000 28 27 0x30000000 0x30000000>; 28 + }; 29 + 30 + gpio-keys { 31 + compatible = "gpio-keys"; 32 + 33 + sw1 { 34 + label = "ci20:sw1"; 35 + linux,code = <KEY_F13>; 36 + gpios = <&gpd 17 GPIO_ACTIVE_HIGH>; 37 + wakeup-source; 38 + }; 29 39 }; 30 40 31 41 leds { ··· 70 58 eth0_power: fixedregulator@0 { 71 59 compatible = "regulator-fixed"; 72 60 regulator-name = "eth0_power"; 61 + regulator-min-microvolt = <3300000>; 62 + regulator-max-microvolt = <3300000>; 73 63 gpio = <&gpb 25 GPIO_ACTIVE_LOW>; 74 64 enable-active-high; 65 + }; 66 + 67 + ir: ir { 68 + compatible = "gpio-ir-receiver"; 69 + gpios = <&gpe 3 GPIO_ACTIVE_LOW>; 75 70 }; 76 71 77 72 wlan0_power: fixedregulator@1 {
+4
arch/mips/boot/dts/loongson/Makefile
··· 1 + # SPDX_License_Identifier: GPL_2.0 2 + dtb-$(CONFIG_MACH_LOONGSON64) += loongson3_4core_rs780e.dtb loongson3_8core_rs780e.dtb 3 + 4 + obj-$(CONFIG_BUILTIN_DTB) += $(addsuffix .o, $(dtb-y))
+64
arch/mips/boot/dts/loongson/loongson3-package.dtsi
··· 1 + // SPDX-License-Identifier: GPL-2.0 2 + 3 + #include <dt-bindings/interrupt-controller/irq.h> 4 + 5 + / { 6 + #address-cells = <2>; 7 + #size-cells = <2>; 8 + 9 + cpuintc: interrupt-controller { 10 + #address-cells = <0>; 11 + #interrupt-cells = <1>; 12 + interrupt-controller; 13 + compatible = "mti,cpu-interrupt-controller"; 14 + }; 15 + 16 + package0: bus@1fe00000 { 17 + compatible = "simple-bus"; 18 + #address-cells = <2>; 19 + #size-cells = <1>; 20 + ranges = <0 0x1fe00000 0 0x1fe00000 0x100000 21 + 0 0x3ff00000 0 0x3ff00000 0x100000 22 + /* 3A HT Config Space */ 23 + 0xefd 0xfb000000 0xefd 0xfb000000 0x10000000 24 + /* 3B HT Config Space */ 25 + 0x1efd 0xfb000000 0x1efd 0xfb000000 0x10000000>; 26 + 27 + liointc: interrupt-controller@3ff01400 { 28 + compatible = "loongson,liointc-1.0"; 29 + reg = <0 0x3ff01400 0x64>; 30 + 31 + interrupt-controller; 32 + #interrupt-cells = <2>; 33 + 34 + interrupt-parent = <&cpuintc>; 35 + interrupts = <2>, <3>; 36 + interrupt-names = "int0", "int1"; 37 + 38 + loongson,parent_int_map = <0xf0ffffff>, /* int0 */ 39 + <0x0f000000>, /* int1 */ 40 + <0x00000000>, /* int2 */ 41 + <0x00000000>; /* int3 */ 42 + 43 + }; 44 + 45 + cpu_uart0: serial@1fe001e0 { 46 + compatible = "ns16550a"; 47 + reg = <0 0x1fe001e0 0x8>; 48 + clock-frequency = <33000000>; 49 + interrupt-parent = <&liointc>; 50 + interrupts = <10 IRQ_TYPE_LEVEL_HIGH>; 51 + no-loopback-test; 52 + }; 53 + 54 + cpu_uart1: serial@1fe001e8 { 55 + status = "disabled"; 56 + compatible = "ns16550a"; 57 + reg = <0 0x1fe001e8 0x8>; 58 + clock-frequency = <33000000>; 59 + interrupts = <10 IRQ_TYPE_LEVEL_HIGH>; 60 + interrupt-parent = <&liointc>; 61 + no-loopback-test; 62 + }; 63 + }; 64 + };
+25
arch/mips/boot/dts/loongson/loongson3_4core_rs780e.dts
··· 1 + // SPDX-License-Identifier: GPL-2.0 2 + 3 + /dts-v1/; 4 + 5 + #include "loongson3-package.dtsi" 6 + #include "rs780e-pch.dtsi" 7 + 8 + / { 9 + compatible = "loongson,loongson3-4core-rs780e"; 10 + }; 11 + 12 + &package0 { 13 + htpic: interrupt-controller@efdfb000080 { 14 + compatible = "loongson,htpic-1.0"; 15 + reg = <0xefd 0xfb000080 0x40>; 16 + interrupt-controller; 17 + #interrupt-cells = <1>; 18 + 19 + interrupt-parent = <&liointc>; 20 + interrupts = <24 IRQ_TYPE_LEVEL_HIGH>, 21 + <25 IRQ_TYPE_LEVEL_HIGH>, 22 + <26 IRQ_TYPE_LEVEL_HIGH>, 23 + <27 IRQ_TYPE_LEVEL_HIGH>; 24 + }; 25 + };
+25
arch/mips/boot/dts/loongson/loongson3_8core_rs780e.dts
··· 1 + // SPDX-License-Identifier: GPL-2.0 2 + 3 + /dts-v1/; 4 + 5 + #include "loongson3-package.dtsi" 6 + #include "rs780e-pch.dtsi" 7 + 8 + / { 9 + compatible = "loongson,loongson3-8core-rs780e"; 10 + }; 11 + 12 + &package0 { 13 + htpic: interrupt-controller@1efdfb000080 { 14 + compatible = "loongson,htpic-1.0"; 15 + reg = <0x1efd 0xfb000080 0x40>; 16 + interrupt-controller; 17 + #interrupt-cells = <1>; 18 + 19 + interrupt-parent = <&liointc>; 20 + interrupts = <24 IRQ_TYPE_LEVEL_HIGH>, 21 + <25 IRQ_TYPE_LEVEL_HIGH>, 22 + <26 IRQ_TYPE_LEVEL_HIGH>, 23 + <27 IRQ_TYPE_LEVEL_HIGH>; 24 + }; 25 + };
+26
arch/mips/boot/dts/loongson/rs780e-pch.dtsi
··· 1 + // SPDX-License-Identifier: GPL-2.0 2 + 3 + / { 4 + bus@10000000 { 5 + compatible = "simple-bus"; 6 + #address-cells = <2>; 7 + #size-cells = <2>; 8 + ranges = <0 0x10000000 0 0x10000000 0 0x10000000 9 + 0 0x40000000 0 0x40000000 0 0x40000000 10 + 0xfd 0xfe000000 0xfd 0xfe000000 0 0x2000000 /* PCI Config Space */>; 11 + 12 + isa { 13 + compatible = "isa"; 14 + #address-cells = <2>; 15 + #size-cells = <1>; 16 + ranges = <1 0 0 0 0x1000>; 17 + 18 + rtc0: rtc@70 { 19 + compatible = "motorola,mc146818"; 20 + reg = <1 0x70 0x8>; 21 + interrupts = <8>; 22 + interrupt-parent = <&htpic>; 23 + }; 24 + }; 25 + }; 26 + };
+3
arch/mips/cavium-octeon/octeon-irq.c
··· 2199 2199 } 2200 2200 2201 2201 cd = kzalloc(sizeof(*cd), GFP_KERNEL); 2202 + if (!cd) 2203 + return -ENOMEM; 2204 + 2202 2205 cd->host_data = host_data; 2203 2206 cd->bit = hw; 2204 2207
+10 -8
arch/mips/cobalt/irq.c
··· 45 45 spurious_interrupt(); 46 46 } 47 47 48 - static struct irqaction cascade = { 49 - .handler = no_action, 50 - .name = "cascade", 51 - .flags = IRQF_NO_THREAD, 52 - }; 53 - 54 48 void __init arch_init_irq(void) 55 49 { 56 50 mips_cpu_irq_init(); 57 51 gt641xx_irq_init(); 58 52 init_i8259_irqs(); 59 53 60 - setup_irq(GT641XX_CASCADE_IRQ, &cascade); 61 - setup_irq(I8259_CASCADE_IRQ, &cascade); 54 + if (request_irq(GT641XX_CASCADE_IRQ, no_action, IRQF_NO_THREAD, 55 + "cascade", NULL)) { 56 + pr_err("Failed to request irq %d (cascade)\n", 57 + GT641XX_CASCADE_IRQ); 58 + } 59 + if (request_irq(I8259_CASCADE_IRQ, no_action, IRQF_NO_THREAD, 60 + "cascade", NULL)) { 61 + pr_err("Failed to request irq %d (cascade)\n", 62 + I8259_CASCADE_IRQ); 63 + } 62 64 }
-1
arch/mips/configs/ar7_defconfig
··· 21 21 # CONFIG_BLK_DEV_BSG is not set 22 22 CONFIG_PARTITION_ADVANCED=y 23 23 CONFIG_BSD_DISKLABEL=y 24 - # CONFIG_IOSCHED_CFQ is not set 25 24 CONFIG_NET=y 26 25 CONFIG_PACKET=y 27 26 CONFIG_UNIX=y
-1
arch/mips/configs/ath25_defconfig
··· 22 22 CONFIG_MODULES=y 23 23 CONFIG_MODULE_UNLOAD=y 24 24 # CONFIG_BLK_DEV_BSG is not set 25 - # CONFIG_IOSCHED_CFQ is not set 26 25 # CONFIG_COMPACTION is not set 27 26 CONFIG_NET=y 28 27 CONFIG_PACKET=y
-1
arch/mips/configs/ath79_defconfig
··· 23 23 CONFIG_MODULES=y 24 24 CONFIG_MODULE_UNLOAD=y 25 25 # CONFIG_BLK_DEV_BSG is not set 26 - # CONFIG_IOSCHED_CFQ is not set 27 26 CONFIG_NET=y 28 27 CONFIG_PACKET=y 29 28 CONFIG_UNIX=y
-2
arch/mips/configs/bcm63xx_defconfig
··· 21 21 CONFIG_PCCARD=y 22 22 CONFIG_PCMCIA_BCM63XX=y 23 23 # CONFIG_BLK_DEV_BSG is not set 24 - # CONFIG_IOSCHED_DEADLINE is not set 25 - # CONFIG_IOSCHED_CFQ is not set 26 24 CONFIG_NET=y 27 25 CONFIG_UNIX=y 28 26 CONFIG_INET=y
-2
arch/mips/configs/bmips_be_defconfig
··· 12 12 # CONFIG_SECCOMP is not set 13 13 CONFIG_MIPS_O32_FP64_SUPPORT=y 14 14 # CONFIG_BLK_DEV_BSG is not set 15 - # CONFIG_IOSCHED_DEADLINE is not set 16 - # CONFIG_IOSCHED_CFQ is not set 17 15 CONFIG_NET=y 18 16 CONFIG_PACKET=y 19 17 CONFIG_PACKET_DIAG=y
-2
arch/mips/configs/bmips_stb_defconfig
··· 21 21 CONFIG_CPU_FREQ_GOV_SCHEDUTIL=y 22 22 CONFIG_BMIPS_CPUFREQ=y 23 23 # CONFIG_BLK_DEV_BSG is not set 24 - # CONFIG_IOSCHED_DEADLINE is not set 25 - # CONFIG_IOSCHED_CFQ is not set 26 24 CONFIG_NET=y 27 25 CONFIG_PACKET=y 28 26 CONFIG_PACKET_DIAG=y
+21
arch/mips/configs/ci20_defconfig
··· 1 1 # CONFIG_LOCALVERSION_AUTO is not set 2 + CONFIG_MODULES=y 2 3 CONFIG_KERNEL_XZ=y 3 4 CONFIG_SYSVIPC=y 4 5 CONFIG_POSIX_MQUEUE=y ··· 89 88 CONFIG_SPI=y 90 89 CONFIG_SPI_GPIO=y 91 90 CONFIG_GPIO_SYSFS=y 91 + CONFIG_KEYBOARD_GPIO=m 92 92 # CONFIG_HWMON is not set 93 93 CONFIG_WATCHDOG=y 94 94 CONFIG_JZ4740_WDT=y 95 95 CONFIG_REGULATOR=y 96 96 CONFIG_REGULATOR_DEBUG=y 97 97 CONFIG_REGULATOR_FIXED_VOLTAGE=y 98 + CONFIG_REGULATOR_ACT8865=y 98 99 # CONFIG_VGA_CONSOLE is not set 99 100 # CONFIG_HID is not set 100 101 # CONFIG_USB_SUPPORT is not set ··· 169 166 # CONFIG_FTRACE is not set 170 167 CONFIG_CMDLINE_BOOL=y 171 168 CONFIG_CMDLINE="earlycon console=ttyS4,115200 clk_ignore_unused" 169 + CONFIG_LEDS_CLASS=y 170 + CONFIG_LEDS_GPIO=y 171 + CONFIG_LEDS_TRIGGERS=y 172 + CONFIG_LEDS_TRIGGER_MTD=y 173 + CONFIG_LEDS_TRIGGER_TIMER=y 174 + CONFIG_LEDS_TRIGGER_ONESHOT=y 175 + CONFIG_LEDS_TRIGGER_ONESHOT=y 176 + CONFIG_LEDS_TRIGGER_HEARTBEAT=y 177 + CONFIG_LEDS_TRIGGER_BACKLIGHT=m 178 + CONFIG_LEDS_TRIGGER_CPU=y 179 + CONFIG_LEDS_TRIGGER_DEFAULT_ON=y 180 + CONFIG_LEDS_TRIGGER_TRANSIENT=y 181 + CONFIG_LEDS_TRIGGER_CAMERA=m 182 + CONFIG_LIRC=y 183 + CONFIG_MEDIA_SUPPORT=m 184 + CONFIG_RC_DEVICES=y 185 + CONFIG_IR_GPIO_CIR=m 186 + CONFIG_IR_GPIO_TX=m
-1
arch/mips/configs/db1xxx_defconfig
··· 28 28 CONFIG_FIRMWARE_MEMMAP=y 29 29 CONFIG_BLK_DEV_BSGLIB=y 30 30 CONFIG_PARTITION_ADVANCED=y 31 - CONFIG_DEFAULT_NOOP=y 32 31 CONFIG_CMA=y 33 32 CONFIG_CMA_DEBUG=y 34 33 CONFIG_NET=y
-1
arch/mips/configs/generic/board-ni169445.config
··· 19 19 CONFIG_MTD_NAND_ECC_SW_BCH=y 20 20 CONFIG_MTD_RAW_NAND=y 21 21 CONFIG_MTD_NAND_GPIO=y 22 - CONFIG_MTD_NAND_IDS=y 23 22 24 23 CONFIG_MTD_UBI=y 25 24 CONFIG_MTD_UBI_BLOCK=y
+12 -255
arch/mips/configs/jazz_defconfig
··· 1 1 CONFIG_SYSVIPC=y 2 2 CONFIG_POSIX_MQUEUE=y 3 + CONFIG_NO_HZ=y 4 + CONFIG_HIGH_RES_TIMERS=y 3 5 CONFIG_PREEMPT_VOLUNTARY=y 4 6 CONFIG_BSD_PROCESS_ACCT=y 5 - CONFIG_IKCONFIG=y 6 - CONFIG_IKCONFIG_PROC=y 7 7 CONFIG_LOG_BUF_SHIFT=14 8 8 CONFIG_RELAY=y 9 9 CONFIG_EXPERT=y 10 10 CONFIG_SLAB=y 11 11 CONFIG_MACH_JAZZ=y 12 12 CONFIG_OLIVETTI_M700=y 13 + CONFIG_MIPS_MAGNUM_4000=y 14 + CONFIG_CPU_LITTLE_ENDIAN=y 13 15 CONFIG_MODULES=y 14 16 CONFIG_MODULE_UNLOAD=y 15 17 CONFIG_MODVERSIONS=y ··· 20 18 CONFIG_NET=y 21 19 CONFIG_PACKET=m 22 20 CONFIG_UNIX=y 23 - CONFIG_NET_KEY=m 24 - CONFIG_NET_KEY_MIGRATE=y 25 21 CONFIG_INET=y 26 22 CONFIG_IP_MULTICAST=y 27 23 CONFIG_NET_IPIP=m 28 - CONFIG_IP_MROUTE=y 29 - CONFIG_IP_PIMSM_V1=y 30 - CONFIG_IP_PIMSM_V2=y 31 - CONFIG_INET_XFRM_MODE_TRANSPORT=m 32 - CONFIG_INET_XFRM_MODE_TUNNEL=m 33 - CONFIG_TCP_MD5SIG=y 34 - CONFIG_IPV6_ROUTER_PREF=y 35 - CONFIG_IPV6_ROUTE_INFO=y 36 24 CONFIG_INET6_AH=m 37 25 CONFIG_INET6_ESP=m 38 26 CONFIG_INET6_IPCOMP=m 39 - CONFIG_IPV6_TUNNEL=m 40 - CONFIG_NETWORK_SECMARK=y 41 - CONFIG_NETFILTER=y 42 - CONFIG_NF_CONNTRACK=m 43 - CONFIG_NF_CONNTRACK_SECMARK=y 44 - CONFIG_NF_CONNTRACK_EVENTS=y 45 - CONFIG_NF_CONNTRACK_AMANDA=m 46 - CONFIG_NF_CONNTRACK_FTP=m 47 - CONFIG_NF_CONNTRACK_H323=m 48 - CONFIG_NF_CONNTRACK_IRC=m 49 - CONFIG_NF_CONNTRACK_PPTP=m 50 - CONFIG_NF_CONNTRACK_SANE=m 51 - CONFIG_NF_CONNTRACK_SIP=m 52 - CONFIG_NF_CONNTRACK_TFTP=m 53 - CONFIG_NF_CT_NETLINK=m 54 - CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m 55 - CONFIG_NETFILTER_XT_TARGET_CONNMARK=m 56 - CONFIG_NETFILTER_XT_TARGET_MARK=m 57 - CONFIG_NETFILTER_XT_TARGET_NFLOG=m 58 - CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m 59 - CONFIG_NETFILTER_XT_TARGET_SECMARK=m 60 - CONFIG_NETFILTER_XT_TARGET_TCPMSS=m 61 - CONFIG_NETFILTER_XT_MATCH_COMMENT=m 62 - CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m 63 - CONFIG_NETFILTER_XT_MATCH_CONNMARK=m 64 - CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m 65 - CONFIG_NETFILTER_XT_MATCH_DCCP=m 66 - CONFIG_NETFILTER_XT_MATCH_ESP=m 67 - CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m 68 - CONFIG_NETFILTER_XT_MATCH_HELPER=m 69 - CONFIG_NETFILTER_XT_MATCH_LENGTH=m 70 - CONFIG_NETFILTER_XT_MATCH_LIMIT=m 71 - CONFIG_NETFILTER_XT_MATCH_MAC=m 72 - CONFIG_NETFILTER_XT_MATCH_MARK=m 73 - CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m 74 - CONFIG_NETFILTER_XT_MATCH_POLICY=m 75 - CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m 76 - CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m 77 - CONFIG_NETFILTER_XT_MATCH_QUOTA=m 78 - CONFIG_NETFILTER_XT_MATCH_REALM=m 79 - CONFIG_NETFILTER_XT_MATCH_STATE=m 80 - CONFIG_NETFILTER_XT_MATCH_STATISTIC=m 81 - CONFIG_NETFILTER_XT_MATCH_STRING=m 82 - CONFIG_NETFILTER_XT_MATCH_TCPMSS=m 83 - CONFIG_IP_NF_IPTABLES=m 84 - CONFIG_IP_NF_MATCH_AH=m 85 - CONFIG_IP_NF_MATCH_ECN=m 86 - CONFIG_IP_NF_MATCH_TTL=m 87 - CONFIG_IP_NF_FILTER=m 88 - CONFIG_IP_NF_TARGET_REJECT=m 89 - CONFIG_IP_NF_MANGLE=m 90 - CONFIG_IP_NF_TARGET_CLUSTERIP=m 91 - CONFIG_IP_NF_TARGET_ECN=m 92 - CONFIG_IP_NF_TARGET_TTL=m 93 - CONFIG_IP_NF_RAW=m 94 - CONFIG_IP_NF_ARPTABLES=m 95 - CONFIG_IP_NF_ARPFILTER=m 96 - CONFIG_IP_NF_ARP_MANGLE=m 97 - CONFIG_IP6_NF_IPTABLES=m 98 - CONFIG_IP6_NF_MATCH_AH=m 99 - CONFIG_IP6_NF_MATCH_EUI64=m 100 - CONFIG_IP6_NF_MATCH_FRAG=m 101 - CONFIG_IP6_NF_MATCH_OPTS=m 102 - CONFIG_IP6_NF_MATCH_HL=m 103 - CONFIG_IP6_NF_MATCH_IPV6HEADER=m 104 - CONFIG_IP6_NF_MATCH_MH=m 105 - CONFIG_IP6_NF_MATCH_RT=m 106 - CONFIG_IP6_NF_TARGET_HL=m 107 - CONFIG_IP6_NF_FILTER=m 108 - CONFIG_IP6_NF_TARGET_REJECT=m 109 - CONFIG_IP6_NF_MANGLE=m 110 - CONFIG_IP6_NF_RAW=m 111 - CONFIG_DECNET_NF_GRABULATOR=m 112 - CONFIG_BRIDGE_NF_EBTABLES=m 113 - CONFIG_BRIDGE_EBT_BROUTE=m 114 - CONFIG_BRIDGE_EBT_T_FILTER=m 115 - CONFIG_BRIDGE_EBT_T_NAT=m 116 - CONFIG_BRIDGE_EBT_802_3=m 117 - CONFIG_BRIDGE_EBT_AMONG=m 118 - CONFIG_BRIDGE_EBT_ARP=m 119 - CONFIG_BRIDGE_EBT_IP=m 120 - CONFIG_BRIDGE_EBT_LIMIT=m 121 - CONFIG_BRIDGE_EBT_MARK=m 122 - CONFIG_BRIDGE_EBT_PKTTYPE=m 123 - CONFIG_BRIDGE_EBT_STP=m 124 - CONFIG_BRIDGE_EBT_VLAN=m 125 - CONFIG_BRIDGE_EBT_ARPREPLY=m 126 - CONFIG_BRIDGE_EBT_DNAT=m 127 - CONFIG_BRIDGE_EBT_MARK_T=m 128 - CONFIG_BRIDGE_EBT_REDIRECT=m 129 - CONFIG_BRIDGE_EBT_SNAT=m 130 - CONFIG_BRIDGE_EBT_LOG=m 131 - CONFIG_BRIDGE=m 132 - CONFIG_DECNET=m 133 - CONFIG_NET_SCHED=y 134 - CONFIG_NET_SCH_CBQ=m 135 - CONFIG_NET_SCH_HTB=m 136 - CONFIG_NET_SCH_HFSC=m 137 - CONFIG_NET_SCH_PRIO=m 138 - CONFIG_NET_SCH_RED=m 139 - CONFIG_NET_SCH_SFQ=m 140 - CONFIG_NET_SCH_TEQL=m 141 - CONFIG_NET_SCH_TBF=m 142 - CONFIG_NET_SCH_GRED=m 143 - CONFIG_NET_SCH_DSMARK=m 144 - CONFIG_NET_SCH_NETEM=m 145 - CONFIG_NET_CLS_BASIC=m 146 - CONFIG_NET_CLS_TCINDEX=m 147 - CONFIG_NET_CLS_ROUTE4=m 148 - CONFIG_NET_CLS_FW=m 149 - CONFIG_NET_CLS_U32=m 150 - CONFIG_NET_CLS_RSVP=m 151 - CONFIG_NET_CLS_RSVP6=m 152 - CONFIG_HAMRADIO=y 153 - CONFIG_AX25=m 154 - CONFIG_NETROM=m 155 - CONFIG_ROSE=m 156 - CONFIG_MKISS=m 157 - CONFIG_6PACK=m 158 - CONFIG_BPQETHER=m 159 - CONFIG_CONNECTOR=m 160 27 CONFIG_PARPORT=m 161 28 CONFIG_PARPORT_PC=m 162 29 CONFIG_PARPORT_1284=y 30 + CONFIG_DEVTMPFS=y 163 31 CONFIG_BLK_DEV_FD=m 164 - CONFIG_PARIDE=m 165 - CONFIG_PARIDE_PD=m 166 - CONFIG_PARIDE_PCD=m 167 - CONFIG_PARIDE_PF=m 168 - CONFIG_PARIDE_PT=m 169 - CONFIG_PARIDE_PG=m 170 - CONFIG_PARIDE_ATEN=m 171 - CONFIG_PARIDE_BPCK=m 172 - CONFIG_PARIDE_BPCK6=m 173 - CONFIG_PARIDE_COMM=m 174 - CONFIG_PARIDE_DSTR=m 175 - CONFIG_PARIDE_FIT2=m 176 - CONFIG_PARIDE_FIT3=m 177 - CONFIG_PARIDE_EPAT=m 178 - CONFIG_PARIDE_EPIA=m 179 - CONFIG_PARIDE_FRIQ=m 180 - CONFIG_PARIDE_FRPW=m 181 - CONFIG_PARIDE_KBIC=m 182 - CONFIG_PARIDE_KTTI=m 183 - CONFIG_PARIDE_ON20=m 184 - CONFIG_PARIDE_ON26=m 185 32 CONFIG_BLK_DEV_LOOP=m 186 33 CONFIG_BLK_DEV_CRYPTOLOOP=m 187 34 CONFIG_BLK_DEV_NBD=m ··· 45 194 CONFIG_BLK_DEV_SR_VENDOR=y 46 195 CONFIG_SCSI_CONSTANTS=y 47 196 CONFIG_SCSI_SCAN_ASYNC=y 48 - CONFIG_SCSI_FC_ATTRS=y 49 - CONFIG_SCSI_SAS_ATTRS=m 50 197 CONFIG_ISCSI_TCP=m 51 198 CONFIG_SCSI_PPA=m 52 199 CONFIG_SCSI_IMM=m 53 200 CONFIG_JAZZ_ESP=y 54 - CONFIG_MD=y 55 - CONFIG_BLK_DEV_MD=m 56 - CONFIG_MD_LINEAR=m 57 - CONFIG_MD_RAID0=m 58 - CONFIG_MD_RAID1=m 59 - CONFIG_MD_RAID10=m 60 - CONFIG_MD_RAID456=m 61 - CONFIG_MD_MULTIPATH=m 62 - CONFIG_MD_FAULTY=m 63 - CONFIG_BLK_DEV_DM=m 64 - CONFIG_DM_SNAPSHOT=m 65 - CONFIG_DM_MIRROR=m 66 - CONFIG_DM_ZERO=m 67 - CONFIG_DM_MULTIPATH=m 201 + CONFIG_ATA=y 202 + CONFIG_PATA_LEGACY=y 68 203 CONFIG_NETDEVICES=y 69 204 CONFIG_BONDING=m 70 205 CONFIG_DUMMY=m ··· 58 221 CONFIG_TUN=m 59 222 CONFIG_MIPS_JAZZ_SONIC=y 60 223 CONFIG_NE2000=m 61 - CONFIG_PHYLIB=m 62 - CONFIG_CICADA_PHY=m 63 - CONFIG_DAVICOM_PHY=m 64 - CONFIG_LXT_PHY=m 65 - CONFIG_MARVELL_PHY=m 66 - CONFIG_QSEMI_PHY=m 67 - CONFIG_SMSC_PHY=m 68 - CONFIG_VITESSE_PHY=m 69 - CONFIG_PLIP=m 70 - CONFIG_INPUT_FF_MEMLESS=m 71 224 CONFIG_SERIO_PARKBD=m 72 225 CONFIG_SERIO_RAW=m 73 226 CONFIG_VT_HW_CONSOLE_BINDING=y 74 - CONFIG_SERIAL_8250=m 227 + CONFIG_SERIAL_8250=y 228 + CONFIG_SERIAL_8250_CONSOLE=y 75 229 CONFIG_SERIAL_8250_EXTENDED=y 76 230 CONFIG_SERIAL_8250_SHARE_IRQ=y 77 231 CONFIG_SERIAL_8250_DETECT_IRQ=y 78 232 CONFIG_SERIAL_8250_RSA=y 79 - CONFIG_PRINTER=m 80 - CONFIG_PPDEV=m 81 - # CONFIG_HW_RANDOM is not set 82 - CONFIG_W1=m 233 + CONFIG_FB=y 234 + CONFIG_FB_G364=y 235 + CONFIG_FRAMEBUFFER_CONSOLE=y 83 236 # CONFIG_HWMON is not set 84 237 CONFIG_EXT2_FS=m 85 238 CONFIG_EXT3_FS=y ··· 90 263 CONFIG_NTFS_FS=m 91 264 CONFIG_PROC_KCORE=y 92 265 CONFIG_TMPFS=y 93 - CONFIG_ADFS_FS=m 94 - CONFIG_AFFS_FS=m 95 - CONFIG_HFS_FS=m 96 - CONFIG_BEFS_FS=m 97 - CONFIG_BFS_FS=m 98 - CONFIG_EFS_FS=m 99 - CONFIG_CRAMFS=m 100 - CONFIG_VXFS_FS=m 101 - CONFIG_MINIX_FS=m 102 - CONFIG_HPFS_FS=m 103 - CONFIG_QNX4FS_FS=m 104 - CONFIG_ROMFS_FS=m 105 - CONFIG_SYSV_FS=m 106 266 CONFIG_UFS_FS=m 107 267 CONFIG_NFS_FS=m 108 268 CONFIG_NFSD=m 109 269 CONFIG_NFSD_V3=y 110 270 CONFIG_CIFS=m 111 - CONFIG_CODA_FS=m 112 - CONFIG_AFS_FS=m 113 - CONFIG_NLS_CODEPAGE_437=m 114 - CONFIG_NLS_CODEPAGE_737=m 115 - CONFIG_NLS_CODEPAGE_775=m 116 - CONFIG_NLS_CODEPAGE_850=m 117 - CONFIG_NLS_CODEPAGE_852=m 118 - CONFIG_NLS_CODEPAGE_855=m 119 - CONFIG_NLS_CODEPAGE_857=m 120 - CONFIG_NLS_CODEPAGE_860=m 121 - CONFIG_NLS_CODEPAGE_861=m 122 - CONFIG_NLS_CODEPAGE_862=m 123 - CONFIG_NLS_CODEPAGE_863=m 124 - CONFIG_NLS_CODEPAGE_864=m 125 - CONFIG_NLS_CODEPAGE_865=m 126 - CONFIG_NLS_CODEPAGE_866=m 127 - CONFIG_NLS_CODEPAGE_869=m 128 - CONFIG_NLS_CODEPAGE_936=m 129 - CONFIG_NLS_CODEPAGE_950=m 130 - CONFIG_NLS_CODEPAGE_932=m 131 - CONFIG_NLS_CODEPAGE_949=m 132 - CONFIG_NLS_CODEPAGE_874=m 133 - CONFIG_NLS_ISO8859_8=m 134 - CONFIG_NLS_CODEPAGE_1250=m 135 - CONFIG_NLS_CODEPAGE_1251=m 136 - CONFIG_NLS_ASCII=m 137 - CONFIG_NLS_ISO8859_1=m 138 - CONFIG_NLS_ISO8859_2=m 139 - CONFIG_NLS_ISO8859_3=m 140 - CONFIG_NLS_ISO8859_4=m 141 - CONFIG_NLS_ISO8859_5=m 142 - CONFIG_NLS_ISO8859_6=m 143 - CONFIG_NLS_ISO8859_7=m 144 - CONFIG_NLS_ISO8859_9=m 145 - CONFIG_NLS_ISO8859_13=m 146 - CONFIG_NLS_ISO8859_14=m 147 - CONFIG_NLS_ISO8859_15=m 148 - CONFIG_NLS_KOI8_R=m 149 - CONFIG_NLS_KOI8_U=m 150 - CONFIG_NLS_UTF8=m 151 - CONFIG_CRYPTO_LRW=m 152 - CONFIG_CRYPTO_PCBC=m 153 - CONFIG_CRYPTO_HMAC=y 154 - CONFIG_CRYPTO_XCBC=m 155 - CONFIG_CRYPTO_MICHAEL_MIC=m 156 - CONFIG_CRYPTO_TGR192=m 157 - CONFIG_CRYPTO_WP512=m 158 - CONFIG_CRYPTO_ANUBIS=m 159 - CONFIG_CRYPTO_BLOWFISH=m 160 - CONFIG_CRYPTO_CAMELLIA=m 161 - CONFIG_CRYPTO_CAST6=m 162 - CONFIG_CRYPTO_FCRYPT=m 163 - CONFIG_CRYPTO_KHAZAD=m 164 - CONFIG_CRYPTO_SERPENT=m 165 - CONFIG_CRYPTO_TEA=m 166 - CONFIG_CRYPTO_TWOFISH=m 167 - CONFIG_CRC_CCITT=m
-2
arch/mips/configs/lasat_defconfig
··· 16 16 # CONFIG_SECCOMP is not set 17 17 CONFIG_PCI=y 18 18 # CONFIG_BLK_DEV_BSG is not set 19 - # CONFIG_IOSCHED_DEADLINE is not set 20 - # CONFIG_IOSCHED_CFQ is not set 21 19 CONFIG_NET=y 22 20 CONFIG_PACKET=y 23 21 CONFIG_UNIX=y
+1 -1
arch/mips/configs/lemote2f_defconfig
··· 26 26 CONFIG_MODULE_UNLOAD=y 27 27 CONFIG_MODVERSIONS=y 28 28 CONFIG_BLK_DEV_INTEGRITY=y 29 - CONFIG_IOSCHED_DEADLINE=m 29 + CONFIG_MQ_IOSCHED_DEADLINE=m 30 30 CONFIG_BINFMT_MISC=m 31 31 CONFIG_NET=y 32 32 CONFIG_PACKET=y
+3 -2
arch/mips/configs/loongson3_defconfig
··· 38 38 CONFIG_MODULE_FORCE_UNLOAD=y 39 39 CONFIG_MODVERSIONS=y 40 40 CONFIG_PARTITION_ADVANCED=y 41 - CONFIG_IOSCHED_DEADLINE=m 42 - CONFIG_CFQ_GROUP_IOSCHED=y 41 + CONFIG_MQ_IOSCHED_DEADLINE=m 42 + CONFIG_IOSCHED_BFQ=y 43 + CONFIG_BFQ_GROUP_IOSCHED=y 43 44 CONFIG_BINFMT_MISC=m 44 45 CONFIG_KSM=y 45 46 CONFIG_NET=y
-2
arch/mips/configs/msp71xx_defconfig
··· 14 14 CONFIG_MODULES=y 15 15 CONFIG_MODULE_UNLOAD=y 16 16 CONFIG_MODVERSIONS=y 17 - # CONFIG_IOSCHED_DEADLINE is not set 18 - # CONFIG_IOSCHED_CFQ is not set 19 17 CONFIG_NET=y 20 18 CONFIG_UNIX=y 21 19 CONFIG_XFRM_USER=y
-2
arch/mips/configs/pnx8335_stb225_defconfig
··· 14 14 CONFIG_MODULES=y 15 15 CONFIG_MODULE_UNLOAD=y 16 16 # CONFIG_BLK_DEV_BSG is not set 17 - # CONFIG_IOSCHED_DEADLINE is not set 18 - # CONFIG_IOSCHED_CFQ is not set 19 17 CONFIG_NET=y 20 18 CONFIG_PACKET=y 21 19 CONFIG_UNIX=y
-1
arch/mips/configs/rb532_defconfig
··· 23 23 CONFIG_PARTITION_ADVANCED=y 24 24 CONFIG_MAC_PARTITION=y 25 25 CONFIG_BSD_DISKLABEL=y 26 - # CONFIG_IOSCHED_CFQ is not set 27 26 CONFIG_NET=y 28 27 CONFIG_PACKET=y 29 28 CONFIG_UNIX=y
-1
arch/mips/configs/rt305x_defconfig
··· 21 21 CONFIG_MODULE_UNLOAD=y 22 22 # CONFIG_BLK_DEV_BSG is not set 23 23 CONFIG_PARTITION_ADVANCED=y 24 - # CONFIG_IOSCHED_CFQ is not set 25 24 # CONFIG_COREDUMP is not set 26 25 # CONFIG_COMPACTION is not set 27 26 CONFIG_NET=y
-1
arch/mips/configs/xway_defconfig
··· 23 23 CONFIG_MODULE_UNLOAD=y 24 24 # CONFIG_BLK_DEV_BSG is not set 25 25 CONFIG_PARTITION_ADVANCED=y 26 - # CONFIG_IOSCHED_CFQ is not set 27 26 # CONFIG_COREDUMP is not set 28 27 # CONFIG_COMPACTION is not set 29 28 CONFIG_NET=y
+24 -35
arch/mips/dec/setup.c
··· 103 103 int cpu_fpu_mask = DEC_CPU_IRQ_MASK(DEC_CPU_INR_FPU); 104 104 int *fpu_kstat_irq; 105 105 106 - static struct irqaction ioirq = { 107 - .handler = no_action, 108 - .name = "cascade", 109 - .flags = IRQF_NO_THREAD, 110 - }; 111 - static struct irqaction fpuirq = { 112 - .handler = no_action, 113 - .name = "fpu", 114 - .flags = IRQF_NO_THREAD, 115 - }; 116 - 117 - static struct irqaction busirq = { 118 - .name = "bus error", 119 - .flags = IRQF_NO_THREAD, 120 - }; 121 - 122 - static struct irqaction haltirq = { 123 - .handler = dec_intr_halt, 124 - .name = "halt", 125 - .flags = IRQF_NO_THREAD, 126 - }; 127 - 106 + static irq_handler_t busirq_handler; 107 + static unsigned int busirq_flags = IRQF_NO_THREAD; 128 108 129 109 /* 130 110 * Bus error (DBE/IBE exceptions and bus interrupts) handling setup. ··· 114 134 switch (mips_machtype) { 115 135 case MACH_DS23100: /* DS2100/DS3100 Pmin/Pmax */ 116 136 board_be_handler = dec_kn01_be_handler; 117 - busirq.handler = dec_kn01_be_interrupt; 118 - busirq.flags |= IRQF_SHARED; 137 + busirq_handler = dec_kn01_be_interrupt; 138 + busirq_flags |= IRQF_SHARED; 119 139 dec_kn01_be_init(); 120 140 break; 121 141 case MACH_DS5000_1XX: /* DS5000/1xx 3min */ 122 142 case MACH_DS5000_XX: /* DS5000/xx Maxine */ 123 143 board_be_handler = dec_kn02xa_be_handler; 124 - busirq.handler = dec_kn02xa_be_interrupt; 144 + busirq_handler = dec_kn02xa_be_interrupt; 125 145 dec_kn02xa_be_init(); 126 146 break; 127 147 case MACH_DS5000_200: /* DS5000/200 3max */ 128 148 case MACH_DS5000_2X0: /* DS5000/240 3max+ */ 129 149 case MACH_DS5900: /* DS5900 bigmax */ 130 150 board_be_handler = dec_ecc_be_handler; 131 - busirq.handler = dec_ecc_be_interrupt; 151 + busirq_handler = dec_ecc_be_interrupt; 132 152 dec_ecc_be_init(); 133 153 break; 134 154 } ··· 744 764 int irq_fpu; 745 765 746 766 irq_fpu = dec_interrupt[DEC_IRQ_FPU]; 747 - setup_irq(irq_fpu, &fpuirq); 767 + if (request_irq(irq_fpu, no_action, IRQF_NO_THREAD, "fpu", 768 + NULL)) 769 + pr_err("Failed to register fpu interrupt\n"); 748 770 desc_fpu = irq_to_desc(irq_fpu); 749 771 fpu_kstat_irq = this_cpu_ptr(desc_fpu->kstat_irqs); 750 772 } 751 - if (dec_interrupt[DEC_IRQ_CASCADE] >= 0) 752 - setup_irq(dec_interrupt[DEC_IRQ_CASCADE], &ioirq); 753 - 773 + if (dec_interrupt[DEC_IRQ_CASCADE] >= 0) { 774 + if (request_irq(dec_interrupt[DEC_IRQ_CASCADE], no_action, 775 + IRQF_NO_THREAD, "cascade", NULL)) 776 + pr_err("Failed to register cascade interrupt\n"); 777 + } 754 778 /* Register the bus error interrupt. */ 755 - if (dec_interrupt[DEC_IRQ_BUS] >= 0 && busirq.handler) 756 - setup_irq(dec_interrupt[DEC_IRQ_BUS], &busirq); 757 - 779 + if (dec_interrupt[DEC_IRQ_BUS] >= 0 && busirq_handler) { 780 + if (request_irq(dec_interrupt[DEC_IRQ_BUS], busirq_handler, 781 + busirq_flags, "bus error", busirq_handler)) 782 + pr_err("Failed to register bus error interrupt\n"); 783 + } 758 784 /* Register the HALT interrupt. */ 759 - if (dec_interrupt[DEC_IRQ_HALT] >= 0) 760 - setup_irq(dec_interrupt[DEC_IRQ_HALT], &haltirq); 785 + if (dec_interrupt[DEC_IRQ_HALT] >= 0) { 786 + if (request_irq(dec_interrupt[DEC_IRQ_HALT], dec_intr_halt, 787 + IRQF_NO_THREAD, "halt", NULL)) 788 + pr_err("Failed to register halt interrupt\n"); 789 + } 761 790 } 762 791 763 792 asmlinkage unsigned int dec_irq_dispatch(unsigned int irq)
+10 -11
arch/mips/emma/markeins/irq.c
··· 153 153 handle_edge_irq, "edge"); 154 154 } 155 155 156 - static struct irqaction irq_cascade = { 157 - .handler = no_action, 158 - .flags = IRQF_NO_THREAD, 159 - .name = "cascade", 160 - .dev_id = NULL, 161 - .next = NULL, 162 - }; 163 - 164 156 /* 165 157 * the first level int-handler will jump here if it is a emma2rh irq 166 158 */ ··· 228 236 void __init arch_init_irq(void) 229 237 { 230 238 u32 reg; 239 + int irq; 231 240 232 241 /* by default, interrupts are disabled. */ 233 242 emma2rh_out32(EMMA2RH_BHIF_INT_EN_0, 0); ··· 265 272 mips_cpu_irq_init(); 266 273 267 274 /* setup cascade interrupts */ 268 - setup_irq(EMMA2RH_IRQ_BASE + EMMA2RH_SW_CASCADE, &irq_cascade); 269 - setup_irq(EMMA2RH_IRQ_BASE + EMMA2RH_GPIO_CASCADE, &irq_cascade); 270 - setup_irq(MIPS_CPU_IRQ_BASE + 2, &irq_cascade); 275 + irq = EMMA2RH_IRQ_BASE + EMMA2RH_SW_CASCADE; 276 + if (request_irq(irq, no_action, IRQF_NO_THREAD, "cascade", NULL)) 277 + pr_err("Failed to request irq %d (cascade)\n", irq); 278 + irq = EMMA2RH_IRQ_BASE + EMMA2RH_GPIO_CASCADE; 279 + if (request_irq(irq, no_action, IRQF_NO_THREAD, "cascade", NULL)) 280 + pr_err("Failed to request irq %d (cascade)\n", irq); 281 + irq = MIPS_CPU_IRQ_BASE + 2; 282 + if (request_irq(irq, no_action, IRQF_NO_THREAD, "cascade", NULL)) 283 + pr_err("Failed to request irq %d (cascade)\n", irq); 271 284 } 272 285 273 286 asmlinkage void plat_irq_dispatch(void)
+2
arch/mips/fw/lib/cmdline.c
··· 16 16 int *_fw_argv; 17 17 int *_fw_envp; 18 18 19 + #ifndef CONFIG_HAVE_PLAT_FW_INIT_CMDLINE 19 20 void __init fw_init_cmdline(void) 20 21 { 21 22 int i; ··· 42 41 strlcat(arcs_cmdline, " ", COMMAND_LINE_SIZE); 43 42 } 44 43 } 44 + #endif 45 45 46 46 char * __init fw_getcmdline(void) 47 47 {
+1 -1
arch/mips/generic/init.c
··· 5 5 */ 6 6 7 7 #include <linux/clk.h> 8 - #include <linux/clk-provider.h> 9 8 #include <linux/clocksource.h> 10 9 #include <linux/init.h> 11 10 #include <linux/irqchip.h> 11 + #include <linux/of_clk.h> 12 12 #include <linux/of_fdt.h> 13 13 14 14 #include <asm/bootinfo.h>
+20
arch/mips/include/asm/dmi.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 2 + #ifndef _ASM_DMI_H 3 + #define _ASM_DMI_H 4 + 5 + #include <linux/io.h> 6 + #include <linux/memblock.h> 7 + 8 + #define dmi_early_remap(x, l) ioremap_cache(x, l) 9 + #define dmi_early_unmap(x, l) iounmap(x) 10 + #define dmi_remap(x, l) ioremap_cache(x, l) 11 + #define dmi_unmap(x) iounmap(x) 12 + 13 + /* MIPS initialize DMI scan before SLAB is ready, so we use memblock here */ 14 + #define dmi_alloc(l) memblock_alloc_low(l, PAGE_SIZE) 15 + 16 + #if defined(CONFIG_MACH_LOONGSON64) 17 + #define SMBIOS_ENTRY_POINT_SCAN_START 0xFFFE000 18 + #endif 19 + 20 + #endif /* _ASM_DMI_H */
+3
arch/mips/include/asm/elf.h
··· 445 445 #define ELF_PLATFORM __elf_platform 446 446 extern const char *__elf_platform; 447 447 448 + #define ELF_BASE_PLATFORM __elf_base_platform 449 + extern const char *__elf_base_platform; 450 + 448 451 /* 449 452 * See comments in asm-alpha/elf.h, this is the same thing 450 453 * on the MIPS.
+1
arch/mips/include/asm/i8259.h
··· 36 36 extern void make_8259A_irq(unsigned int irq); 37 37 38 38 extern void init_i8259_irqs(void); 39 + extern struct irq_domain *__init_i8259_irqs(struct device_node *node); 39 40 40 41 /** 41 42 * i8159_set_poll() - Override the i8259 polling function
+1 -1
arch/mips/include/asm/mach-ar7/irq.h
··· 11 11 12 12 #define NR_IRQS 256 13 13 14 - #include_next <irq.h> 14 + #include <asm/mach-generic/irq.h> 15 15 16 16 #endif /* __ASM_AR7_IRQ_H */
+1 -1
arch/mips/include/asm/mach-ath79/irq.h
··· 27 27 #define ATH79_IP3_IRQ_COUNT 3 28 28 #define ATH79_IP3_IRQ(_x) (ATH79_IP3_IRQ_BASE + (_x)) 29 29 30 - #include_next <irq.h> 30 + #include <asm/mach-generic/irq.h> 31 31 32 32 #endif /* __ASM_MACH_ATH79_IRQ_H */
-178
arch/mips/include/asm/mach-au1x00/au1xxx_ide.h
··· 1 - /* 2 - * include/asm-mips/mach-au1x00/au1xxx_ide.h version 01.30.00 Aug. 02 2005 3 - * 4 - * BRIEF MODULE DESCRIPTION 5 - * AMD Alchemy Au1xxx IDE interface routines over the Static Bus 6 - * 7 - * Copyright (c) 2003-2005 AMD, Personal Connectivity Solutions 8 - * 9 - * This program is free software; you can redistribute it and/or modify it under 10 - * the terms of the GNU General Public License as published by the Free Software 11 - * Foundation; either version 2 of the License, or (at your option) any later 12 - * version. 13 - * 14 - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, 15 - * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 16 - * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR 17 - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 18 - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 19 - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 20 - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 21 - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 23 - * POSSIBILITY OF SUCH DAMAGE. 24 - * 25 - * You should have received a copy of the GNU General Public License along with 26 - * this program; if not, write to the Free Software Foundation, Inc., 27 - * 675 Mass Ave, Cambridge, MA 02139, USA. 28 - * 29 - * Note: for more information, please refer "AMD Alchemy Au1200/Au1550 IDE 30 - * Interface and Linux Device Driver" Application Note. 31 - */ 32 - 33 - #ifdef CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA 34 - #define DMA_WAIT_TIMEOUT 100 35 - #define NUM_DESCRIPTORS PRD_ENTRIES 36 - #else /* CONFIG_BLK_DEV_IDE_AU1XXX_PIO_DBDMA */ 37 - #define NUM_DESCRIPTORS 2 38 - #endif 39 - 40 - #ifndef AU1XXX_ATA_RQSIZE 41 - #define AU1XXX_ATA_RQSIZE 128 42 - #endif 43 - 44 - /* Disable Burstable-Support for DBDMA */ 45 - #ifndef CONFIG_BLK_DEV_IDE_AU1XXX_BURSTABLE_ON 46 - #define CONFIG_BLK_DEV_IDE_AU1XXX_BURSTABLE_ON 0 47 - #endif 48 - 49 - typedef struct { 50 - u32 tx_dev_id, rx_dev_id, target_dev_id; 51 - u32 tx_chan, rx_chan; 52 - void *tx_desc_head, *rx_desc_head; 53 - ide_hwif_t *hwif; 54 - #ifdef CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA 55 - ide_drive_t *drive; 56 - struct dbdma_cmd *dma_table_cpu; 57 - dma_addr_t dma_table_dma; 58 - #endif 59 - int irq; 60 - u32 regbase; 61 - int ddma_id; 62 - } _auide_hwif; 63 - 64 - /******************************************************************************/ 65 - /* PIO Mode timing calculation : */ 66 - /* */ 67 - /* Static Bus Spec ATA Spec */ 68 - /* Tcsoe = t1 */ 69 - /* Toecs = t9 */ 70 - /* Twcs = t9 */ 71 - /* Tcsh = t2i | t2 */ 72 - /* Tcsoff = t2i | t2 */ 73 - /* Twp = t2 */ 74 - /* Tcsw = t1 */ 75 - /* Tpm = 0 */ 76 - /* Ta = t1+t2 */ 77 - /******************************************************************************/ 78 - 79 - #define TCSOE_MASK (0x07 << 29) 80 - #define TOECS_MASK (0x07 << 26) 81 - #define TWCS_MASK (0x07 << 28) 82 - #define TCSH_MASK (0x0F << 24) 83 - #define TCSOFF_MASK (0x07 << 20) 84 - #define TWP_MASK (0x3F << 14) 85 - #define TCSW_MASK (0x0F << 10) 86 - #define TPM_MASK (0x0F << 6) 87 - #define TA_MASK (0x3F << 0) 88 - #define TS_MASK (1 << 8) 89 - 90 - /* Timing parameters PIO mode 0 */ 91 - #define SBC_IDE_PIO0_TCSOE (0x04 << 29) 92 - #define SBC_IDE_PIO0_TOECS (0x01 << 26) 93 - #define SBC_IDE_PIO0_TWCS (0x02 << 28) 94 - #define SBC_IDE_PIO0_TCSH (0x08 << 24) 95 - #define SBC_IDE_PIO0_TCSOFF (0x07 << 20) 96 - #define SBC_IDE_PIO0_TWP (0x10 << 14) 97 - #define SBC_IDE_PIO0_TCSW (0x04 << 10) 98 - #define SBC_IDE_PIO0_TPM (0x00 << 6) 99 - #define SBC_IDE_PIO0_TA (0x15 << 0) 100 - /* Timing parameters PIO mode 1 */ 101 - #define SBC_IDE_PIO1_TCSOE (0x03 << 29) 102 - #define SBC_IDE_PIO1_TOECS (0x01 << 26) 103 - #define SBC_IDE_PIO1_TWCS (0x01 << 28) 104 - #define SBC_IDE_PIO1_TCSH (0x06 << 24) 105 - #define SBC_IDE_PIO1_TCSOFF (0x06 << 20) 106 - #define SBC_IDE_PIO1_TWP (0x08 << 14) 107 - #define SBC_IDE_PIO1_TCSW (0x03 << 10) 108 - #define SBC_IDE_PIO1_TPM (0x00 << 6) 109 - #define SBC_IDE_PIO1_TA (0x0B << 0) 110 - /* Timing parameters PIO mode 2 */ 111 - #define SBC_IDE_PIO2_TCSOE (0x05 << 29) 112 - #define SBC_IDE_PIO2_TOECS (0x01 << 26) 113 - #define SBC_IDE_PIO2_TWCS (0x01 << 28) 114 - #define SBC_IDE_PIO2_TCSH (0x07 << 24) 115 - #define SBC_IDE_PIO2_TCSOFF (0x07 << 20) 116 - #define SBC_IDE_PIO2_TWP (0x1F << 14) 117 - #define SBC_IDE_PIO2_TCSW (0x05 << 10) 118 - #define SBC_IDE_PIO2_TPM (0x00 << 6) 119 - #define SBC_IDE_PIO2_TA (0x22 << 0) 120 - /* Timing parameters PIO mode 3 */ 121 - #define SBC_IDE_PIO3_TCSOE (0x05 << 29) 122 - #define SBC_IDE_PIO3_TOECS (0x01 << 26) 123 - #define SBC_IDE_PIO3_TWCS (0x01 << 28) 124 - #define SBC_IDE_PIO3_TCSH (0x0D << 24) 125 - #define SBC_IDE_PIO3_TCSOFF (0x0D << 20) 126 - #define SBC_IDE_PIO3_TWP (0x15 << 14) 127 - #define SBC_IDE_PIO3_TCSW (0x05 << 10) 128 - #define SBC_IDE_PIO3_TPM (0x00 << 6) 129 - #define SBC_IDE_PIO3_TA (0x1A << 0) 130 - /* Timing parameters PIO mode 4 */ 131 - #define SBC_IDE_PIO4_TCSOE (0x04 << 29) 132 - #define SBC_IDE_PIO4_TOECS (0x01 << 26) 133 - #define SBC_IDE_PIO4_TWCS (0x01 << 28) 134 - #define SBC_IDE_PIO4_TCSH (0x04 << 24) 135 - #define SBC_IDE_PIO4_TCSOFF (0x04 << 20) 136 - #define SBC_IDE_PIO4_TWP (0x0D << 14) 137 - #define SBC_IDE_PIO4_TCSW (0x03 << 10) 138 - #define SBC_IDE_PIO4_TPM (0x00 << 6) 139 - #define SBC_IDE_PIO4_TA (0x12 << 0) 140 - /* Timing parameters MDMA mode 0 */ 141 - #define SBC_IDE_MDMA0_TCSOE (0x03 << 29) 142 - #define SBC_IDE_MDMA0_TOECS (0x01 << 26) 143 - #define SBC_IDE_MDMA0_TWCS (0x01 << 28) 144 - #define SBC_IDE_MDMA0_TCSH (0x07 << 24) 145 - #define SBC_IDE_MDMA0_TCSOFF (0x07 << 20) 146 - #define SBC_IDE_MDMA0_TWP (0x0C << 14) 147 - #define SBC_IDE_MDMA0_TCSW (0x03 << 10) 148 - #define SBC_IDE_MDMA0_TPM (0x00 << 6) 149 - #define SBC_IDE_MDMA0_TA (0x0F << 0) 150 - /* Timing parameters MDMA mode 1 */ 151 - #define SBC_IDE_MDMA1_TCSOE (0x05 << 29) 152 - #define SBC_IDE_MDMA1_TOECS (0x01 << 26) 153 - #define SBC_IDE_MDMA1_TWCS (0x01 << 28) 154 - #define SBC_IDE_MDMA1_TCSH (0x05 << 24) 155 - #define SBC_IDE_MDMA1_TCSOFF (0x05 << 20) 156 - #define SBC_IDE_MDMA1_TWP (0x0F << 14) 157 - #define SBC_IDE_MDMA1_TCSW (0x05 << 10) 158 - #define SBC_IDE_MDMA1_TPM (0x00 << 6) 159 - #define SBC_IDE_MDMA1_TA (0x15 << 0) 160 - /* Timing parameters MDMA mode 2 */ 161 - #define SBC_IDE_MDMA2_TCSOE (0x04 << 29) 162 - #define SBC_IDE_MDMA2_TOECS (0x01 << 26) 163 - #define SBC_IDE_MDMA2_TWCS (0x01 << 28) 164 - #define SBC_IDE_MDMA2_TCSH (0x04 << 24) 165 - #define SBC_IDE_MDMA2_TCSOFF (0x04 << 20) 166 - #define SBC_IDE_MDMA2_TWP (0x0D << 14) 167 - #define SBC_IDE_MDMA2_TCSW (0x04 << 10) 168 - #define SBC_IDE_MDMA2_TPM (0x00 << 6) 169 - #define SBC_IDE_MDMA2_TA (0x12 << 0) 170 - 171 - #define SBC_IDE_TIMING(mode) \ 172 - (SBC_IDE_##mode##_TWCS | \ 173 - SBC_IDE_##mode##_TCSH | \ 174 - SBC_IDE_##mode##_TCSOFF | \ 175 - SBC_IDE_##mode##_TWP | \ 176 - SBC_IDE_##mode##_TCSW | \ 177 - SBC_IDE_##mode##_TPM | \ 178 - SBC_IDE_##mode##_TA)
+1 -1
arch/mips/include/asm/mach-emma2rh/irq.h
··· 10 10 11 11 #define NR_IRQS 256 12 12 13 - #include_next <irq.h> 13 + #include <asm/mach-generic/irq.h> 14 14 15 15 #endif /* __ASM_MACH_EMMA2RH_IRQ_H */
+1 -1
arch/mips/include/asm/mach-ip27/irq.h
··· 12 12 13 13 #define NR_IRQS 256 14 14 15 - #include_next <irq.h> 15 + #include <asm/mach-generic/irq.h> 16 16 17 17 #define IP27_HUB_PEND0_IRQ (MIPS_CPU_IRQ_BASE + 2) 18 18 #define IP27_HUB_PEND1_IRQ (MIPS_CPU_IRQ_BASE + 3)
+1 -1
arch/mips/include/asm/mach-ip30/irq.h
··· 76 76 */ 77 77 #define IP30_POWER_IRQ HEART_L2_INT_POWER_BTN 78 78 79 - #include_next <irq.h> 79 + #include <asm/mach-generic/irq.h> 80 80 81 81 #define IP30_HEART_L0_IRQ (MIPS_CPU_IRQ_BASE + 2) 82 82 #define IP30_HEART_L1_IRQ (MIPS_CPU_IRQ_BASE + 3)
+1 -1
arch/mips/include/asm/mach-lantiq/falcon/irq.h
··· 11 11 12 12 #define NR_IRQS 328 13 13 14 - #include_next <irq.h> 14 + #include <asm/mach-generic/irq.h> 15 15 16 16 #endif
+1 -1
arch/mips/include/asm/mach-lantiq/xway/irq.h
··· 11 11 12 12 #define NR_IRQS 256 13 13 14 - #include_next <irq.h> 14 + #include <asm/mach-generic/irq.h> 15 15 16 16 #endif
+1 -1
arch/mips/include/asm/mach-lasat/irq.h
··· 9 9 10 10 #define NR_IRQS 24 11 11 12 - #include_next <irq.h> 12 + #include <asm/mach-generic/irq.h> 13 13 14 14 #endif /* _ASM_MACH_LASAT_IRQ_H */
+2
arch/mips/include/asm/mach-loongson64/boot_param.h
··· 2 2 #ifndef __ASM_MACH_LOONGSON64_BOOT_PARAM_H_ 3 3 #define __ASM_MACH_LOONGSON64_BOOT_PARAM_H_ 4 4 5 + #include <linux/types.h> 6 + 5 7 #define SYSTEM_RAM_LOW 1 6 8 #define SYSTEM_RAM_HIGH 2 7 9 #define SYSTEM_RAM_RESERVED 3
+13
arch/mips/include/asm/mach-loongson64/builtin_dtbs.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0-or-later */ 2 + /* 3 + * Copyright (C) 2019 Jiaxun Yang <jiaxun.yang@flygoat.com> 4 + * 5 + * Built-in Generic dtbs for MACH_LOONGSON64 6 + */ 7 + 8 + #ifndef __ASM_MACH_LOONGSON64_BUILTIN_DTBS_H_ 9 + #define __ASM_MACH_LOONGSON64_BUILTIN_DTBS_H_ 10 + 11 + extern u32 __dtb_loongson3_4core_rs780e_begin[]; 12 + extern u32 __dtb_loongson3_8core_rs780e_begin[]; 13 + #endif
+1 -29
arch/mips/include/asm/mach-loongson64/irq.h
··· 7 7 /* cpu core interrupt numbers */ 8 8 #define MIPS_CPU_IRQ_BASE 56 9 9 10 - #define LOONGSON_UART_IRQ (MIPS_CPU_IRQ_BASE + 2) /* UART */ 11 - #define LOONGSON_BRIDGE_IRQ (MIPS_CPU_IRQ_BASE + 3) /* CASCADE */ 12 - #define LOONGSON_TIMER_IRQ (MIPS_CPU_IRQ_BASE + 7) /* CPU Timer */ 10 + #include <asm/mach-generic/irq.h> 13 11 14 - #define LOONGSON_HT1_CFG_BASE loongson_sysconf.ht_control_base 15 - #define LOONGSON_HT1_INT_VECTOR_BASE (LOONGSON_HT1_CFG_BASE + 0x80) 16 - #define LOONGSON_HT1_INT_EN_BASE (LOONGSON_HT1_CFG_BASE + 0xa0) 17 - #define LOONGSON_HT1_INT_VECTOR(n) \ 18 - LOONGSON3_REG32(LOONGSON_HT1_INT_VECTOR_BASE, 4 * (n)) 19 - #define LOONGSON_HT1_INTN_EN(n) \ 20 - LOONGSON3_REG32(LOONGSON_HT1_INT_EN_BASE, 4 * (n)) 21 - 22 - #define LOONGSON_INT_ROUTER_OFFSET 0x1400 23 - #define LOONGSON_INT_ROUTER_INTEN \ 24 - LOONGSON3_REG32(LOONGSON3_REG_BASE, LOONGSON_INT_ROUTER_OFFSET + 0x24) 25 - #define LOONGSON_INT_ROUTER_INTENSET \ 26 - LOONGSON3_REG32(LOONGSON3_REG_BASE, LOONGSON_INT_ROUTER_OFFSET + 0x28) 27 - #define LOONGSON_INT_ROUTER_INTENCLR \ 28 - LOONGSON3_REG32(LOONGSON3_REG_BASE, LOONGSON_INT_ROUTER_OFFSET + 0x2c) 29 - #define LOONGSON_INT_ROUTER_ENTRY(n) \ 30 - LOONGSON3_REG8(LOONGSON3_REG_BASE, LOONGSON_INT_ROUTER_OFFSET + n) 31 - #define LOONGSON_INT_ROUTER_LPC LOONGSON_INT_ROUTER_ENTRY(0x0a) 32 - #define LOONGSON_INT_ROUTER_HT1(n) LOONGSON_INT_ROUTER_ENTRY(n + 0x18) 33 - 34 - #define LOONGSON_INT_COREx_INTy(x, y) (1<<(x) | 1<<(y+4)) /* route to int y of core x */ 35 - 36 - extern void fixup_irqs(void); 37 - extern void loongson3_ipi_interrupt(struct pt_regs *regs); 38 - 39 - #include_next <irq.h> 40 12 #endif /* __ASM_MACH_LOONGSON64_IRQ_H_ */
+1
arch/mips/include/asm/mach-loongson64/loongson.h
··· 25 25 /* loongson-specific command line, env and memory initialization */ 26 26 extern void __init prom_init_memory(void); 27 27 extern void __init prom_init_env(void); 28 + extern void *loongson_fdt_blob; 28 29 29 30 /* irq operation functions */ 30 31 extern void mach_irq_dispatch(unsigned int pending);
+1 -1
arch/mips/include/asm/mach-malta/irq.h
··· 5 5 6 6 #define NR_IRQS 256 7 7 8 - #include_next <irq.h> 8 + #include <asm/mach-generic/irq.h> 9 9 10 10 #endif /* __ASM_MACH_MIPS_IRQ_H */
+1 -1
arch/mips/include/asm/mach-pic32/irq.h
··· 9 9 #define NR_IRQS 256 10 10 #define MIPS_CPU_IRQ_BASE 0 11 11 12 - #include_next <irq.h> 12 + #include <asm/mach-generic/irq.h> 13 13 14 14 #endif /* __ASM_MACH_PIC32_IRQ_H */
+1 -1
arch/mips/include/asm/mach-pistachio/irq.h
··· 10 10 11 11 #define NR_IRQS 256 12 12 13 - #include_next <irq.h> 13 + #include <asm/mach-generic/irq.h> 14 14 15 15 #endif /* __ASM_MACH_PISTACHIO_IRQ_H */
+1 -1
arch/mips/include/asm/mach-ralink/irq.h
··· 5 5 #define GIC_NUM_INTRS 64 6 6 #define NR_IRQS 256 7 7 8 - #include_next <irq.h> 8 + #include <asm/mach-generic/irq.h> 9 9 10 10 #endif
+1 -1
arch/mips/include/asm/mach-rm/mc146818rtc.h
··· 16 16 #define mc146818_decode_year(year) ((year) + 1980) 17 17 #endif 18 18 19 - #include_next <mc146818rtc.h> 19 + #include <asm/mach-generic/mc146818rtc.h> 20 20 21 21 #endif /* __ASM_MACH_RM_MC146818RTC_H */
+1 -1
arch/mips/include/asm/mach-vr41xx/irq.h
··· 4 4 5 5 #include <asm/vr41xx/irq.h> /* for MIPS_CPU_IRQ_BASE */ 6 6 7 - #include_next <irq.h> 7 + #include <asm/mach-generic/irq.h> 8 8 9 9 #endif /* __ASM_MACH_VR41XX_IRQ_H */
+1 -1
arch/mips/include/asm/mach-xilfpga/irq.h
··· 9 9 10 10 #define NR_IRQS 32 11 11 12 - #include_next <irq.h> 12 + #include <asm/mach-generic/irq.h> 13 13 14 14 #endif /* __MIPS_ASM_MACH_XILFPGA_IRQ_H__ */
+6 -6
arch/mips/include/asm/processor.h
··· 254 254 #ifdef CONFIG_MIPS_FP_SUPPORT 255 255 /* Saved fpu/fpu emulator stuff. */ 256 256 struct mips_fpu_struct fpu FPU_ALIGN; 257 - #endif 258 257 /* Assigned branch delay slot 'emulation' frame */ 259 258 atomic_t bd_emu_frame; 260 259 /* PC of the branch from a branch delay slot 'emulation' */ 261 260 unsigned long bd_emu_branch_pc; 262 261 /* PC to continue from following a branch delay slot 'emulation' */ 263 262 unsigned long bd_emu_cont_pc; 263 + #endif 264 264 #ifdef CONFIG_MIPS_MT_FPAFF 265 265 /* Emulated instruction count */ 266 266 unsigned long emulated_fp; ··· 303 303 .fpr = {{{0,},},}, \ 304 304 .fcr31 = 0, \ 305 305 .msacsr = 0, \ 306 - }, 306 + }, \ 307 + /* Delay slot emulation */ \ 308 + .bd_emu_frame = ATOMIC_INIT(BD_EMUFRAME_NONE), \ 309 + .bd_emu_branch_pc = 0, \ 310 + .bd_emu_cont_pc = 0, 307 311 #else 308 312 # define FPU_INIT 309 313 #endif ··· 339 335 * FPU affinity state (null if not FPAFF) \ 340 336 */ \ 341 337 FPAFF_INIT \ 342 - /* Delay slot emulation */ \ 343 - .bd_emu_frame = ATOMIC_INIT(BD_EMUFRAME_NONE), \ 344 - .bd_emu_branch_pc = 0, \ 345 - .bd_emu_cont_pc = 0, \ 346 338 /* \ 347 339 * Saved DSP stuff \ 348 340 */ \
+3 -1
arch/mips/include/asm/sni.h
··· 11 11 #ifndef __ASM_SNI_H 12 12 #define __ASM_SNI_H 13 13 14 + #include <linux/irqreturn.h> 15 + 14 16 extern unsigned int sni_brd_type; 15 17 16 18 #define SNI_BRD_10 2 ··· 241 239 242 240 /* common irq stuff */ 243 241 extern void (*sni_hwint)(void); 244 - extern struct irqaction sni_isa_irq; 242 + extern irqreturn_t sni_isa_irq_handler(int dummy, void *p); 245 243 246 244 #endif /* __ASM_SNI_H */
+3 -9
arch/mips/jazz/irq.c
··· 125 125 return IRQ_HANDLED; 126 126 } 127 127 128 - static struct irqaction r4030_timer_irqaction = { 129 - .handler = r4030_timer_interrupt, 130 - .flags = IRQF_TIMER, 131 - .name = "R4030 timer", 132 - }; 133 - 134 128 void __init plat_time_init(void) 135 129 { 136 130 struct clock_event_device *cd = &r4030_clockevent; 137 - struct irqaction *action = &r4030_timer_irqaction; 138 131 unsigned int cpu = smp_processor_id(); 139 132 140 133 BUG_ON(HZ != 100); 141 134 142 135 cd->cpumask = cpumask_of(cpu); 143 136 clockevents_register_device(cd); 144 - action->dev_id = cd; 145 - setup_irq(JAZZ_TIMER_IRQ, action); 137 + if (request_irq(JAZZ_TIMER_IRQ, r4030_timer_interrupt, IRQF_TIMER, 138 + "R4030 timer", cd)) 139 + pr_err("Failed to register R4030 timer interrupt\n"); 146 140 147 141 /* 148 142 * Set clock to 100Hz.
+1 -1
arch/mips/jz4740/time.c
··· 4 4 * JZ4740 platform time support 5 5 */ 6 6 7 - #include <linux/clk-provider.h> 8 7 #include <linux/clocksource.h> 8 + #include <linux/of_clk.h> 9 9 10 10 #include <asm/mach-jz4740/timer.h> 11 11
+3 -8
arch/mips/kernel/cevt-bcm1480.c
··· 91 91 } 92 92 93 93 static DEFINE_PER_CPU(struct clock_event_device, sibyte_hpt_clockevent); 94 - static DEFINE_PER_CPU(struct irqaction, sibyte_hpt_irqaction); 95 94 static DEFINE_PER_CPU(char [18], sibyte_hpt_name); 96 95 97 96 void sb1480_clockevent_init(void) 98 97 { 99 98 unsigned int cpu = smp_processor_id(); 100 99 unsigned int irq = K_BCM1480_INT_TIMER_0 + cpu; 101 - struct irqaction *action = &per_cpu(sibyte_hpt_irqaction, cpu); 102 100 struct clock_event_device *cd = &per_cpu(sibyte_hpt_clockevent, cpu); 103 101 unsigned char *name = per_cpu(sibyte_hpt_name, cpu); 102 + unsigned long flags = IRQF_PERCPU | IRQF_TIMER; 104 103 105 104 BUG_ON(cpu > 3); /* Only have 4 general purpose timers */ 106 105 ··· 132 133 133 134 bcm1480_unmask_irq(cpu, irq); 134 135 135 - action->handler = sibyte_counter_handler; 136 - action->flags = IRQF_PERCPU | IRQF_TIMER; 137 - action->name = name; 138 - action->dev_id = cd; 139 - 140 136 irq_set_affinity(irq, cpumask_of(cpu)); 141 - setup_irq(irq, action); 137 + if (request_irq(irq, sibyte_counter_handler, flags, name, cd)) 138 + pr_err("Failed to request irq %d (%s)\n", irq, name); 142 139 }
+2 -7
arch/mips/kernel/cevt-ds1287.c
··· 100 100 return IRQ_HANDLED; 101 101 } 102 102 103 - static struct irqaction ds1287_irqaction = { 104 - .handler = ds1287_interrupt, 105 - .flags = IRQF_PERCPU | IRQF_TIMER, 106 - .name = "ds1287", 107 - }; 108 - 109 103 int __init ds1287_clockevent_init(int irq) 110 104 { 105 + unsigned long flags = IRQF_PERCPU | IRQF_TIMER; 111 106 struct clock_event_device *cd; 112 107 113 108 cd = &ds1287_clockevent; ··· 117 122 118 123 clockevents_register_device(&ds1287_clockevent); 119 124 120 - return setup_irq(irq, &ds1287_irqaction); 125 + return request_irq(irq, ds1287_interrupt, flags, "ds1287", NULL); 121 126 }
+2 -7
arch/mips/kernel/cevt-gt641xx.c
··· 120 120 return IRQ_HANDLED; 121 121 } 122 122 123 - static struct irqaction gt641xx_timer0_irqaction = { 124 - .handler = gt641xx_timer0_interrupt, 125 - .flags = IRQF_PERCPU | IRQF_TIMER, 126 - .name = "gt641xx_timer0", 127 - }; 128 - 129 123 static int __init gt641xx_timer0_clockevent_init(void) 130 124 { 131 125 struct clock_event_device *cd; ··· 140 146 141 147 clockevents_register_device(&gt641xx_timer0_clockevent); 142 148 143 - return setup_irq(GT641XX_TIMER0_IRQ, &gt641xx_timer0_irqaction); 149 + return request_irq(GT641XX_TIMER0_IRQ, gt641xx_timer0_interrupt, 150 + IRQF_PERCPU | IRQF_TIMER, "gt641xx_timer0", NULL); 144 151 } 145 152 arch_initcall(gt641xx_timer0_clockevent_init);
+4 -1
arch/mips/kernel/cevt-r4k.c
··· 252 252 253 253 int r4k_clockevent_init(void) 254 254 { 255 + unsigned long flags = IRQF_PERCPU | IRQF_TIMER | IRQF_SHARED; 255 256 unsigned int cpu = smp_processor_id(); 256 257 struct clock_event_device *cd; 257 258 unsigned int irq, min_delta; ··· 292 291 293 292 cp0_timer_irq_installed = 1; 294 293 295 - setup_irq(irq, &c0_compare_irqaction); 294 + if (request_irq(irq, c0_compare_interrupt, flags, "timer", 295 + c0_compare_interrupt)) 296 + pr_err("Failed to request irq %d (timer)\n", irq); 296 297 297 298 return 0; 298 299 }
+3 -8
arch/mips/kernel/cevt-sb1250.c
··· 90 90 } 91 91 92 92 static DEFINE_PER_CPU(struct clock_event_device, sibyte_hpt_clockevent); 93 - static DEFINE_PER_CPU(struct irqaction, sibyte_hpt_irqaction); 94 93 static DEFINE_PER_CPU(char [18], sibyte_hpt_name); 95 94 96 95 void sb1250_clockevent_init(void) 97 96 { 98 97 unsigned int cpu = smp_processor_id(); 99 98 unsigned int irq = K_INT_TIMER_0 + cpu; 100 - struct irqaction *action = &per_cpu(sibyte_hpt_irqaction, cpu); 101 99 struct clock_event_device *cd = &per_cpu(sibyte_hpt_clockevent, cpu); 102 100 unsigned char *name = per_cpu(sibyte_hpt_name, cpu); 101 + unsigned long flags = IRQF_PERCPU | IRQF_TIMER; 103 102 104 103 /* Only have 4 general purpose timers, and we use last one as hpt */ 105 104 BUG_ON(cpu > 2); ··· 132 133 133 134 sb1250_unmask_irq(cpu, irq); 134 135 135 - action->handler = sibyte_counter_handler; 136 - action->flags = IRQF_PERCPU | IRQF_TIMER; 137 - action->name = name; 138 - action->dev_id = cd; 139 - 140 136 irq_set_affinity(irq, cpumask_of(cpu)); 141 - setup_irq(irq, action); 137 + if (request_irq(irq, sibyte_counter_handler, flags, name, cd)) 138 + pr_err("Failed to request irq %d (%s)\n", irq, name); 142 139 }
+3 -8
arch/mips/kernel/cevt-txx9.c
··· 174 174 return IRQ_HANDLED; 175 175 } 176 176 177 - static struct irqaction txx9tmr_irq = { 178 - .handler = txx9tmr_interrupt, 179 - .flags = IRQF_PERCPU | IRQF_TIMER, 180 - .name = "txx9tmr", 181 - .dev_id = &txx9_clock_event_device, 182 - }; 183 - 184 177 void __init txx9_clockevent_init(unsigned long baseaddr, int irq, 185 178 unsigned int imbusclk) 186 179 { ··· 195 202 cd->irq = irq; 196 203 cd->cpumask = cpumask_of(0), 197 204 clockevents_register_device(cd); 198 - setup_irq(irq, &txx9tmr_irq); 205 + if (request_irq(irq, txx9tmr_interrupt, IRQF_PERCPU | IRQF_TIMER, 206 + "txx9tmr", &txx9_clock_event_device)) 207 + pr_err("Failed to request irq %d (txx9tmr)\n", irq); 199 208 printk(KERN_INFO "TXx9: clockevent device at 0x%lx, irq %d\n", 200 209 baseaddr, irq); 201 210 }
+18
arch/mips/kernel/cpu-probe.c
··· 513 513 __elf_platform = plat; 514 514 } 515 515 516 + static inline void set_elf_base_platform(const char *plat) 517 + { 518 + if (__elf_base_platform == NULL) { 519 + __elf_base_platform = plat; 520 + } 521 + } 522 + 516 523 static inline void cpu_probe_vmbits(struct cpuinfo_mips *c) 517 524 { 518 525 #ifdef __NEED_VMBITS_PROBE ··· 534 527 switch (isa) { 535 528 case MIPS_CPU_ISA_M64R2: 536 529 c->isa_level |= MIPS_CPU_ISA_M32R2 | MIPS_CPU_ISA_M64R2; 530 + set_elf_base_platform("mips64r2"); 537 531 /* fall through */ 538 532 case MIPS_CPU_ISA_M64R1: 539 533 c->isa_level |= MIPS_CPU_ISA_M32R1 | MIPS_CPU_ISA_M64R1; 534 + set_elf_base_platform("mips64"); 540 535 /* fall through */ 541 536 case MIPS_CPU_ISA_V: 542 537 c->isa_level |= MIPS_CPU_ISA_V; 538 + set_elf_base_platform("mips5"); 543 539 /* fall through */ 544 540 case MIPS_CPU_ISA_IV: 545 541 c->isa_level |= MIPS_CPU_ISA_IV; 542 + set_elf_base_platform("mips4"); 546 543 /* fall through */ 547 544 case MIPS_CPU_ISA_III: 548 545 c->isa_level |= MIPS_CPU_ISA_II | MIPS_CPU_ISA_III; 546 + set_elf_base_platform("mips3"); 549 547 break; 550 548 551 549 /* R6 incompatible with everything else */ 552 550 case MIPS_CPU_ISA_M64R6: 553 551 c->isa_level |= MIPS_CPU_ISA_M32R6 | MIPS_CPU_ISA_M64R6; 552 + set_elf_base_platform("mips64r6"); 554 553 /* fall through */ 555 554 case MIPS_CPU_ISA_M32R6: 556 555 c->isa_level |= MIPS_CPU_ISA_M32R6; 556 + set_elf_base_platform("mips32r6"); 557 557 /* Break here so we don't add incompatible ISAs */ 558 558 break; 559 559 case MIPS_CPU_ISA_M32R2: 560 560 c->isa_level |= MIPS_CPU_ISA_M32R2; 561 + set_elf_base_platform("mips32r2"); 561 562 /* fall through */ 562 563 case MIPS_CPU_ISA_M32R1: 563 564 c->isa_level |= MIPS_CPU_ISA_M32R1; 565 + set_elf_base_platform("mips32"); 564 566 /* fall through */ 565 567 case MIPS_CPU_ISA_II: 566 568 c->isa_level |= MIPS_CPU_ISA_II; 569 + set_elf_base_platform("mips2"); 567 570 break; 568 571 } 569 572 } ··· 2130 2113 2131 2114 const char *__cpu_name[NR_CPUS]; 2132 2115 const char *__elf_platform; 2116 + const char *__elf_base_platform; 2133 2117 2134 2118 void cpu_probe(void) 2135 2119 {
+4 -7
arch/mips/kernel/i8253.c
··· 18 18 return IRQ_HANDLED; 19 19 } 20 20 21 - static struct irqaction irq0 = { 22 - .handler = timer_interrupt, 23 - .flags = IRQF_NOBALANCING | IRQF_TIMER, 24 - .name = "timer" 25 - }; 26 - 27 21 void __init setup_pit_timer(void) 28 22 { 23 + unsigned long flags = IRQF_NOBALANCING | IRQF_TIMER; 24 + 29 25 clockevent_i8253_init(true); 30 - setup_irq(0, &irq0); 26 + if (request_irq(0, timer_interrupt, flags, "timer", NULL)) 27 + pr_err("Failed to request irq 0 (timer)\n"); 31 28 } 32 29 33 30 static int __init init_pit_clocksource(void)
+8 -2
arch/mips/kernel/process.c
··· 75 75 lose_fpu(0); 76 76 clear_thread_flag(TIF_MSA_CTX_LIVE); 77 77 clear_used_math(); 78 + #ifdef CONFIG_MIPS_FP_SUPPORT 78 79 atomic_set(&current->thread.bd_emu_frame, BD_EMUFRAME_NONE); 80 + #endif 79 81 init_dsp(); 80 82 regs->cp0_epc = pc; 81 83 regs->regs[29] = sp; ··· 178 176 clear_tsk_thread_flag(p, TIF_FPUBOUND); 179 177 #endif /* CONFIG_MIPS_MT_FPAFF */ 180 178 179 + #ifdef CONFIG_MIPS_FP_SUPPORT 181 180 atomic_set(&p->thread.bd_emu_frame, BD_EMUFRAME_NONE); 181 + #endif 182 182 183 183 if (clone_flags & CLONE_SETTLS) 184 184 ti->tp_value = tls; ··· 654 650 { 655 651 unsigned long top = TASK_SIZE & PAGE_MASK; 656 652 657 - /* One page for branch delay slot "emulation" */ 658 - top -= PAGE_SIZE; 653 + if (IS_ENABLED(CONFIG_MIPS_FP_SUPPORT)) { 654 + /* One page for branch delay slot "emulation" */ 655 + top -= PAGE_SIZE; 656 + } 659 657 660 658 /* Space for the VDSO, data page & GIC user page */ 661 659 top -= PAGE_ALIGN(current->thread.abi->vdso->size);
+1 -7
arch/mips/kernel/rtlx-mt.c
··· 51 51 return IRQ_HANDLED; 52 52 } 53 53 54 - static struct irqaction rtlx_irq = { 55 - .handler = rtlx_interrupt, 56 - .name = "RTLX", 57 - }; 58 - 59 54 static int rtlx_irq_num = MIPS_CPU_IRQ_BASE + MIPS_CPU_RTLX_IRQ; 60 55 61 56 void _interrupt_sp(void) ··· 119 124 goto out_class; 120 125 } 121 126 122 - rtlx_irq.dev_id = rtlx; 123 - err = setup_irq(rtlx_irq_num, &rtlx_irq); 127 + err = request_irq(rtlx_irq_num, rtlx_interrupt, 0, "RTLX", rtlx); 124 128 if (err) 125 129 goto out_class; 126 130
+2
arch/mips/kernel/setup.c
··· 28 28 #include <linux/decompress/generic.h> 29 29 #include <linux/of_fdt.h> 30 30 #include <linux/of_reserved_mem.h> 31 + #include <linux/dmi.h> 31 32 32 33 #include <asm/addrspace.h> 33 34 #include <asm/bootinfo.h> ··· 800 799 #endif 801 800 802 801 arch_mem_init(cmdline_p); 802 + dmi_setup(); 803 803 804 804 resource_init(); 805 805 plat_smp_setup();
+12 -21
arch/mips/kernel/smp.c
··· 207 207 return IRQ_HANDLED; 208 208 } 209 209 210 - static struct irqaction irq_resched = { 211 - .handler = ipi_resched_interrupt, 212 - .flags = IRQF_PERCPU, 213 - .name = "IPI resched" 214 - }; 215 - 216 - static struct irqaction irq_call = { 217 - .handler = ipi_call_interrupt, 218 - .flags = IRQF_PERCPU, 219 - .name = "IPI call" 220 - }; 221 - 222 - static void smp_ipi_init_one(unsigned int virq, 223 - struct irqaction *action) 210 + static void smp_ipi_init_one(unsigned int virq, const char *name, 211 + irq_handler_t handler) 224 212 { 225 213 int ret; 226 214 227 215 irq_set_handler(virq, handle_percpu_irq); 228 - ret = setup_irq(virq, action); 216 + ret = request_irq(virq, handler, IRQF_PERCPU, name, NULL); 229 217 BUG_ON(ret); 230 218 } 231 219 ··· 266 278 int cpu; 267 279 268 280 for_each_cpu(cpu, mask) { 269 - smp_ipi_init_one(call_virq + cpu, &irq_call); 270 - smp_ipi_init_one(sched_virq + cpu, &irq_resched); 281 + smp_ipi_init_one(call_virq + cpu, "IPI call", 282 + ipi_call_interrupt); 283 + smp_ipi_init_one(sched_virq + cpu, "IPI resched", 284 + ipi_resched_interrupt); 271 285 } 272 286 } else { 273 - smp_ipi_init_one(call_virq, &irq_call); 274 - smp_ipi_init_one(sched_virq, &irq_resched); 287 + smp_ipi_init_one(call_virq, "IPI call", ipi_call_interrupt); 288 + smp_ipi_init_one(sched_virq, "IPI resched", 289 + ipi_resched_interrupt); 275 290 } 276 291 277 292 return 0; ··· 302 311 int cpu; 303 312 304 313 for_each_cpu(cpu, mask) { 305 - remove_irq(call_virq + cpu, &irq_call); 306 - remove_irq(sched_virq + cpu, &irq_resched); 314 + free_irq(call_virq + cpu, NULL); 315 + free_irq(sched_virq + cpu, NULL); 307 316 } 308 317 } 309 318 irq_destroy_ipi(call_virq, mask);
+15 -11
arch/mips/kernel/vdso.c
··· 71 71 72 72 static unsigned long vdso_base(void) 73 73 { 74 - unsigned long base; 74 + unsigned long base = STACK_TOP; 75 75 76 - /* Skip the delay slot emulation page */ 77 - base = STACK_TOP + PAGE_SIZE; 76 + if (IS_ENABLED(CONFIG_MIPS_FP_SUPPORT)) { 77 + /* Skip the delay slot emulation page */ 78 + base += PAGE_SIZE; 79 + } 78 80 79 81 if (current->flags & PF_RANDOMIZE) { 80 82 base += get_random_int() & (VDSO_RANDOMIZE_SIZE - 1); ··· 97 95 if (down_write_killable(&mm->mmap_sem)) 98 96 return -EINTR; 99 97 100 - /* Map delay slot emulation page */ 101 - base = mmap_region(NULL, STACK_TOP, PAGE_SIZE, 102 - VM_READ | VM_EXEC | 103 - VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC, 104 - 0, NULL); 105 - if (IS_ERR_VALUE(base)) { 106 - ret = base; 107 - goto out; 98 + if (IS_ENABLED(CONFIG_MIPS_FP_SUPPORT)) { 99 + /* Map delay slot emulation page */ 100 + base = mmap_region(NULL, STACK_TOP, PAGE_SIZE, 101 + VM_READ | VM_EXEC | 102 + VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC, 103 + 0, NULL); 104 + if (IS_ERR_VALUE(base)) { 105 + ret = base; 106 + goto out; 107 + } 108 108 } 109 109 110 110 /*
+3 -7
arch/mips/lasat/interrupt.c
··· 90 90 } 91 91 } 92 92 93 - static struct irqaction cascade = { 94 - .handler = no_action, 95 - .name = "cascade", 96 - .flags = IRQF_NO_THREAD, 97 - }; 98 - 99 93 void __init arch_init_irq(void) 100 94 { 95 + int irq = LASAT_CASCADE_IRQ; 101 96 int i; 102 97 103 98 if (IS_LASAT_200()) { ··· 114 119 for (i = LASAT_IRQ_BASE; i <= LASAT_IRQ_END; i++) 115 120 irq_set_chip_and_handler(i, &lasat_irq_type, handle_level_irq); 116 121 117 - setup_irq(LASAT_CASCADE_IRQ, &cascade); 122 + if (request_irq(irq, no_action, IRQF_NO_THREAD, "cascade", NULL)) 123 + pr_err("Failed to request irq %d (cascade)\n", irq); 118 124 }
+4
arch/mips/lib/delay.c
··· 24 24 #define GCC_DADDI_IMM_ASM() "r" 25 25 #endif 26 26 27 + #ifndef CONFIG_HAVE_PLAT_DELAY 28 + 27 29 void __delay(unsigned long loops) 28 30 { 29 31 __asm__ __volatile__ ( ··· 65 63 __delay((ns * 0x00000005ull * HZ * lpj) >> 32); 66 64 } 67 65 EXPORT_SYMBOL(__ndelay); 66 + 67 + #endif
+3
arch/mips/lib/memcpy.S
··· 598 598 nop 599 599 .endm 600 600 601 + #ifndef CONFIG_HAVE_PLAT_MEMCPY 601 602 .align 5 602 603 LEAF(memmove) 603 604 EXPORT_SYMBOL(memmove) ··· 665 664 EXPORT_SYMBOL(__copy_user) 666 665 /* Legacy Mode, user <-> user */ 667 666 __BUILD_COPY_USER LEGACY_MODE USEROP USEROP 667 + 668 + #endif 668 669 669 670 #ifdef CONFIG_EVA 670 671
+3 -6
arch/mips/loongson2ef/common/bonito-irq.c
··· 30 30 .irq_unmask = bonito_irq_enable, 31 31 }; 32 32 33 - static struct irqaction __maybe_unused dma_timeout_irqaction = { 34 - .handler = no_action, 35 - .name = "dma_timeout", 36 - }; 37 - 38 33 void bonito_irq_init(void) 39 34 { 40 35 u32 i; ··· 39 44 handle_level_irq); 40 45 41 46 #ifdef CONFIG_CPU_LOONGSON2E 42 - setup_irq(LOONGSON_IRQ_BASE + 10, &dma_timeout_irqaction); 47 + i = LOONGSON_IRQ_BASE + 10; 48 + if (request_irq(i, no_action, 0, "dma_timeout", NULL)) 49 + pr_err("Failed to request irq %d (dma_timeout)\n", i); 43 50 #endif 44 51 }
+3 -7
arch/mips/loongson2ef/common/cs5536/cs5536_mfgpt.c
··· 100 100 return IRQ_HANDLED; 101 101 } 102 102 103 - static struct irqaction irq5 = { 104 - .handler = timer_interrupt, 105 - .flags = IRQF_NOBALANCING | IRQF_TIMER, 106 - .name = "timer" 107 - }; 108 - 109 103 /* 110 104 * Initialize the conversion factor and the min/max deltas of the clock event 111 105 * structure and register the clock event source with the framework. ··· 128 134 129 135 clockevents_register_device(cd); 130 136 131 - setup_irq(CS5536_MFGPT_INTR, &irq5); 137 + if (request_irq(CS5536_MFGPT_INTR, timer_interrupt, 138 + IRQF_NOBALANCING | IRQF_TIMER, "timer", NULL)) 139 + pr_err("Failed to register timer interrupt\n"); 132 140 } 133 141 134 142 /*
+8 -8
arch/mips/loongson2ef/fuloong-2e/irq.c
··· 35 35 spurious_interrupt(); 36 36 } 37 37 38 - static struct irqaction cascade_irqaction = { 39 - .handler = no_action, 40 - .name = "cascade", 41 - .flags = IRQF_NO_THREAD, 42 - }; 43 - 44 38 void __init mach_init_irq(void) 45 39 { 40 + int irq; 41 + 46 42 /* init all controller 47 43 * 0-15 ------> i8259 interrupt 48 44 * 16-23 ------> mips cpu interrupt ··· 55 59 bonito_irq_init(); 56 60 57 61 /* bonito irq at IP2 */ 58 - setup_irq(MIPS_CPU_IRQ_BASE + 2, &cascade_irqaction); 62 + irq = MIPS_CPU_IRQ_BASE + 2; 63 + if (request_irq(irq, no_action, IRQF_NO_THREAD, "cascade", NULL)) 64 + pr_err("Failed to request irq %d (cascade)\n", irq); 59 65 /* 8259 irq at IP5 */ 60 - setup_irq(MIPS_CPU_IRQ_BASE + 5, &cascade_irqaction); 66 + irq = MIPS_CPU_IRQ_BASE + 5; 67 + if (request_irq(irq, no_action, IRQF_NO_THREAD, "cascade", NULL)) 68 + pr_err("Failed to request irq %d (cascade)\n", irq); 61 69 }
+6 -14
arch/mips/loongson2ef/lemote-2f/irq.c
··· 90 90 return IRQ_HANDLED; 91 91 } 92 92 93 - static struct irqaction ip6_irqaction = { 94 - .handler = ip6_action, 95 - .name = "cascade", 96 - .flags = IRQF_SHARED | IRQF_NO_THREAD, 97 - }; 98 - 99 - static struct irqaction cascade_irqaction = { 100 - .handler = no_action, 101 - .name = "cascade", 102 - .flags = IRQF_NO_THREAD | IRQF_NO_SUSPEND, 103 - }; 104 - 105 93 void __init mach_init_irq(void) 106 94 { 107 95 /* init all controller ··· 108 120 bonito_irq_init(); 109 121 110 122 /* setup north bridge irq (bonito) */ 111 - setup_irq(LOONGSON_NORTH_BRIDGE_IRQ, &ip6_irqaction); 123 + if (request_irq(LOONGSON_NORTH_BRIDGE_IRQ, ip6_action, 124 + IRQF_SHARED | IRQF_NO_THREAD, "cascade", ip6_action)) 125 + pr_err("Failed to register north bridge cascade interrupt\n"); 112 126 /* setup source bridge irq (i8259) */ 113 - setup_irq(LOONGSON_SOUTH_BRIDGE_IRQ, &cascade_irqaction); 127 + if (request_irq(LOONGSON_SOUTH_BRIDGE_IRQ, no_action, 128 + IRQF_NO_THREAD | IRQF_NO_SUSPEND, "cascade", NULL)) 129 + pr_err("Failed to register south bridge cascade interrupt\n"); 114 130 }
+10 -11
arch/mips/loongson32/common/irq.c
··· 149 149 150 150 } 151 151 152 - static struct irqaction cascade_irqaction = { 153 - .handler = no_action, 154 - .name = "cascade", 155 - .flags = IRQF_NO_THREAD, 156 - }; 157 - 158 152 static void __init ls1x_irq_init(int base) 159 153 { 160 154 int n; ··· 170 176 handle_level_irq); 171 177 } 172 178 173 - setup_irq(INT0_IRQ, &cascade_irqaction); 174 - setup_irq(INT1_IRQ, &cascade_irqaction); 175 - setup_irq(INT2_IRQ, &cascade_irqaction); 176 - setup_irq(INT3_IRQ, &cascade_irqaction); 179 + if (request_irq(INT0_IRQ, no_action, IRQF_NO_THREAD, "cascade", NULL)) 180 + pr_err("Failed to request irq %d (cascade)\n", INT0_IRQ); 181 + if (request_irq(INT1_IRQ, no_action, IRQF_NO_THREAD, "cascade", NULL)) 182 + pr_err("Failed to request irq %d (cascade)\n", INT1_IRQ); 183 + if (request_irq(INT2_IRQ, no_action, IRQF_NO_THREAD, "cascade", NULL)) 184 + pr_err("Failed to request irq %d (cascade)\n", INT2_IRQ); 185 + if (request_irq(INT3_IRQ, no_action, IRQF_NO_THREAD, "cascade", NULL)) 186 + pr_err("Failed to request irq %d (cascade)\n", INT3_IRQ); 177 187 #if defined(CONFIG_LOONGSON1_LS1C) 178 - setup_irq(INT4_IRQ, &cascade_irqaction); 188 + if (request_irq(INT4_IRQ, no_action, IRQF_NO_THREAD, "cascade", NULL)) 189 + pr_err("Failed to request irq %d (cascade)\n", INT4_IRQ); 179 190 #endif 180 191 } 181 192
+4 -8
arch/mips/loongson32/common/time.c
··· 176 176 .tick_resume = ls1x_clockevent_tick_resume, 177 177 }; 178 178 179 - static struct irqaction ls1x_pwmtimer_irqaction = { 180 - .name = "ls1x-pwmtimer", 181 - .handler = ls1x_clockevent_isr, 182 - .dev_id = &ls1x_clockevent, 183 - .flags = IRQF_PERCPU | IRQF_TIMER, 184 - }; 185 - 186 179 static void __init ls1x_time_init(void) 187 180 { 188 181 struct clock_event_device *cd = &ls1x_clockevent; ··· 199 206 if (ret) 200 207 panic(KERN_ERR "Failed to register clocksource: %d\n", ret); 201 208 202 - setup_irq(LS1X_TIMER_IRQ, &ls1x_pwmtimer_irqaction); 209 + if (request_irq(LS1X_TIMER_IRQ, ls1x_clockevent_isr, 210 + IRQF_PERCPU | IRQF_TIMER, "ls1x-pwmtimer", 211 + &ls1x_clockevent)) 212 + pr_err("Failed to register ls1x-pwmtimer interrupt\n"); 203 213 } 204 214 #endif /* CONFIG_CEVT_CSRC_LS1X */ 205 215
+1 -1
arch/mips/loongson64/Makefile
··· 2 2 # 3 3 # Makefile for Loongson-3 family machines 4 4 # 5 - obj-$(CONFIG_MACH_LOONGSON64) += irq.o cop2-ex.o platform.o acpi_init.o dma.o \ 5 + obj-$(CONFIG_MACH_LOONGSON64) += cop2-ex.o platform.o acpi_init.o dma.o \ 6 6 setup.o init.o env.o time.o reset.o \ 7 7 8 8 obj-$(CONFIG_SMP) += smp.o
+23
arch/mips/loongson64/env.c
··· 17 17 #include <asm/bootinfo.h> 18 18 #include <loongson.h> 19 19 #include <boot_param.h> 20 + #include <builtin_dtbs.h> 20 21 #include <workarounds.h> 21 22 22 23 u32 cpu_clock_freq; ··· 120 119 loongson_sysconf.nr_nodes = (loongson_sysconf.nr_cpus + 121 120 loongson_sysconf.cores_per_node - 1) / 122 121 loongson_sysconf.cores_per_node; 122 + 123 + if ((read_c0_prid() & PRID_IMP_MASK) == PRID_IMP_LOONGSON_64C) { 124 + switch (read_c0_prid() & PRID_REV_MASK) { 125 + case PRID_REV_LOONGSON3A_R1: 126 + case PRID_REV_LOONGSON3A_R2_0: 127 + case PRID_REV_LOONGSON3A_R2_1: 128 + case PRID_REV_LOONGSON3A_R3_0: 129 + case PRID_REV_LOONGSON3A_R3_1: 130 + loongson_fdt_blob = __dtb_loongson3_4core_rs780e_begin; 131 + break; 132 + case PRID_REV_LOONGSON3B_R1: 133 + case PRID_REV_LOONGSON3B_R2: 134 + loongson_fdt_blob = __dtb_loongson3_8core_rs780e_begin; 135 + break; 136 + default: 137 + break; 138 + } 139 + } 140 + 141 + 142 + if (!loongson_fdt_blob) 143 + pr_err("Failed to determine built-in Loongson64 dtb\n"); 123 144 124 145 loongson_sysconf.pci_mem_start_addr = eirq_source->pci_mem_start_addr; 125 146 loongson_sysconf.pci_mem_end_addr = eirq_source->pci_mem_end_addr;
+3 -7
arch/mips/loongson64/hpet.c
··· 187 187 return IRQ_NONE; 188 188 } 189 189 190 - static struct irqaction hpet_irq = { 191 - .handler = hpet_irq_handler, 192 - .flags = IRQF_NOBALANCING | IRQF_TIMER, 193 - .name = "hpet", 194 - }; 195 - 196 190 /* 197 191 * hpet address assignation and irq setting should be done in bios. 198 192 * but pmon don't do this, we just setup here directly. ··· 218 224 219 225 void __init setup_hpet_timer(void) 220 226 { 227 + unsigned long flags = IRQF_NOBALANCING | IRQF_TIMER; 221 228 unsigned int cpu = smp_processor_id(); 222 229 struct clock_event_device *cd; 223 230 ··· 242 247 cd->min_delta_ticks = HPET_MIN_PROG_DELTA; 243 248 244 249 clockevents_register_device(cd); 245 - setup_irq(HPET_T0_IRQ, &hpet_irq); 250 + if (request_irq(HPET_T0_IRQ, hpet_irq_handler, flags, "hpet", NULL)) 251 + pr_err("Failed to request irq %d (hpet)\n", HPET_T0_IRQ); 246 252 pr_info("hpet clock event device register\n"); 247 253 } 248 254
+6
arch/mips/loongson64/init.c
··· 4 4 * Author: Wu Zhangjin, wuzhangjin@gmail.com 5 5 */ 6 6 7 + #include <linux/irqchip.h> 7 8 #include <linux/memblock.h> 8 9 #include <asm/bootinfo.h> 9 10 #include <asm/traps.h> ··· 44 43 45 44 void __init prom_free_prom_memory(void) 46 45 { 46 + } 47 + 48 + void __init arch_init_irq(void) 49 + { 50 + irqchip_init(); 47 51 }
-162
arch/mips/loongson64/irq.c
··· 1 - // SPDX-License-Identifier: GPL-2.0 2 - #include <loongson.h> 3 - #include <irq.h> 4 - #include <linux/interrupt.h> 5 - #include <linux/init.h> 6 - 7 - #include <asm/irq_cpu.h> 8 - #include <asm/i8259.h> 9 - #include <asm/mipsregs.h> 10 - 11 - #include "smp.h" 12 - 13 - extern void loongson3_send_irq_by_ipi(int cpu, int irqs); 14 - 15 - unsigned int irq_cpu[16] = {[0 ... 15] = -1}; 16 - unsigned int ht_irq[] = {0, 1, 3, 4, 5, 6, 7, 8, 12, 14, 15}; 17 - unsigned int local_irq = 1<<0 | 1<<1 | 1<<2 | 1<<7 | 1<<8 | 1<<12; 18 - 19 - int plat_set_irq_affinity(struct irq_data *d, const struct cpumask *affinity, 20 - bool force) 21 - { 22 - unsigned int cpu; 23 - struct cpumask new_affinity; 24 - 25 - /* I/O devices are connected on package-0 */ 26 - cpumask_copy(&new_affinity, affinity); 27 - for_each_cpu(cpu, affinity) 28 - if (cpu_data[cpu].package > 0) 29 - cpumask_clear_cpu(cpu, &new_affinity); 30 - 31 - if (cpumask_empty(&new_affinity)) 32 - return -EINVAL; 33 - 34 - cpumask_copy(d->common->affinity, &new_affinity); 35 - 36 - return IRQ_SET_MASK_OK_NOCOPY; 37 - } 38 - 39 - static void ht_irqdispatch(void) 40 - { 41 - unsigned int i, irq; 42 - struct irq_data *irqd; 43 - struct cpumask affinity; 44 - 45 - irq = LOONGSON_HT1_INT_VECTOR(0); 46 - LOONGSON_HT1_INT_VECTOR(0) = irq; /* Acknowledge the IRQs */ 47 - 48 - for (i = 0; i < ARRAY_SIZE(ht_irq); i++) { 49 - if (!(irq & (0x1 << ht_irq[i]))) 50 - continue; 51 - 52 - /* handled by local core */ 53 - if (local_irq & (0x1 << ht_irq[i])) { 54 - do_IRQ(ht_irq[i]); 55 - continue; 56 - } 57 - 58 - irqd = irq_get_irq_data(ht_irq[i]); 59 - cpumask_and(&affinity, irqd->common->affinity, cpu_active_mask); 60 - if (cpumask_empty(&affinity)) { 61 - do_IRQ(ht_irq[i]); 62 - continue; 63 - } 64 - 65 - irq_cpu[ht_irq[i]] = cpumask_next(irq_cpu[ht_irq[i]], &affinity); 66 - if (irq_cpu[ht_irq[i]] >= nr_cpu_ids) 67 - irq_cpu[ht_irq[i]] = cpumask_first(&affinity); 68 - 69 - if (irq_cpu[ht_irq[i]] == 0) { 70 - do_IRQ(ht_irq[i]); 71 - continue; 72 - } 73 - 74 - /* balanced by other cores */ 75 - loongson3_send_irq_by_ipi(irq_cpu[ht_irq[i]], (0x1 << ht_irq[i])); 76 - } 77 - } 78 - 79 - #define UNUSED_IPS (CAUSEF_IP5 | CAUSEF_IP4 | CAUSEF_IP1 | CAUSEF_IP0) 80 - 81 - asmlinkage void plat_irq_dispatch(void) 82 - { 83 - unsigned int pending; 84 - 85 - pending = read_c0_cause() & read_c0_status() & ST0_IM; 86 - 87 - if (pending & CAUSEF_IP7) 88 - do_IRQ(LOONGSON_TIMER_IRQ); 89 - #if defined(CONFIG_SMP) 90 - if (pending & CAUSEF_IP6) 91 - loongson3_ipi_interrupt(NULL); 92 - #endif 93 - if (pending & CAUSEF_IP3) 94 - ht_irqdispatch(); 95 - if (pending & CAUSEF_IP2) 96 - do_IRQ(LOONGSON_UART_IRQ); 97 - if (pending & UNUSED_IPS) { 98 - pr_err("%s : spurious interrupt\n", __func__); 99 - spurious_interrupt(); 100 - } 101 - } 102 - 103 - static inline void mask_loongson_irq(struct irq_data *d) { } 104 - static inline void unmask_loongson_irq(struct irq_data *d) { } 105 - 106 - /* For MIPS IRQs which shared by all cores */ 107 - static struct irq_chip loongson_irq_chip = { 108 - .name = "Loongson", 109 - .irq_ack = mask_loongson_irq, 110 - .irq_mask = mask_loongson_irq, 111 - .irq_mask_ack = mask_loongson_irq, 112 - .irq_unmask = unmask_loongson_irq, 113 - .irq_eoi = unmask_loongson_irq, 114 - }; 115 - 116 - void irq_router_init(void) 117 - { 118 - int i; 119 - 120 - /* route LPC int to cpu core0 int 0 */ 121 - LOONGSON_INT_ROUTER_LPC = 122 - LOONGSON_INT_COREx_INTy(loongson_sysconf.boot_cpu_id, 0); 123 - /* route HT1 int0 ~ int7 to cpu core0 INT1*/ 124 - for (i = 0; i < 8; i++) 125 - LOONGSON_INT_ROUTER_HT1(i) = 126 - LOONGSON_INT_COREx_INTy(loongson_sysconf.boot_cpu_id, 1); 127 - /* enable HT1 interrupt */ 128 - LOONGSON_HT1_INTN_EN(0) = 0xffffffff; 129 - /* enable router interrupt intenset */ 130 - LOONGSON_INT_ROUTER_INTENSET = 131 - LOONGSON_INT_ROUTER_INTEN | (0xffff << 16) | 0x1 << 10; 132 - } 133 - 134 - void __init arch_init_irq(void) 135 - { 136 - struct irq_chip *chip; 137 - 138 - clear_c0_status(ST0_IM | ST0_BEV); 139 - 140 - irq_router_init(); 141 - mips_cpu_irq_init(); 142 - init_i8259_irqs(); 143 - chip = irq_get_chip(I8259A_IRQ_BASE); 144 - chip->irq_set_affinity = plat_set_irq_affinity; 145 - 146 - irq_set_chip_and_handler(LOONGSON_UART_IRQ, 147 - &loongson_irq_chip, handle_percpu_irq); 148 - irq_set_chip_and_handler(LOONGSON_BRIDGE_IRQ, 149 - &loongson_irq_chip, handle_percpu_irq); 150 - 151 - set_c0_status(STATUSF_IP2 | STATUSF_IP3 | STATUSF_IP6); 152 - } 153 - 154 - #ifdef CONFIG_HOTPLUG_CPU 155 - 156 - void fixup_irqs(void) 157 - { 158 - irq_cpu_offline(); 159 - clear_c0_status(ST0_IM); 160 - } 161 - 162 - #endif
+1 -1
arch/mips/loongson64/numa.c
··· 122 122 static void __init szmem(unsigned int node) 123 123 { 124 124 u32 i, mem_type; 125 - static unsigned long num_physpages = 0; 125 + static unsigned long num_physpages; 126 126 u64 node_id, node_psize, start_pfn, end_pfn, mem_start, mem_size; 127 127 128 128 /* Parse memory information and activate */
+16
arch/mips/loongson64/setup.c
··· 8 8 9 9 #include <asm/wbflush.h> 10 10 #include <asm/bootinfo.h> 11 + #include <linux/libfdt.h> 12 + #include <linux/of_fdt.h> 13 + 14 + #include <asm/prom.h> 11 15 12 16 #include <loongson.h> 17 + 18 + void *loongson_fdt_blob; 13 19 14 20 static void wbflush_loongson(void) 15 21 { ··· 33 27 34 28 void __init plat_mem_setup(void) 35 29 { 30 + if (loongson_fdt_blob) 31 + __dt_setup_arch(loongson_fdt_blob); 32 + } 33 + 34 + void __init device_tree_init(void) 35 + { 36 + if (!initial_boot_params) 37 + return; 38 + 39 + unflatten_and_copy_device_tree(); 36 40 }
+11 -17
arch/mips/loongson64/smp.c
··· 4 4 * Author: Chen Huacai, chenhc@lemote.com 5 5 */ 6 6 7 + #include <irq.h> 7 8 #include <linux/init.h> 8 9 #include <linux/cpu.h> 9 10 #include <linux/sched.h> ··· 25 24 #include "smp.h" 26 25 27 26 DEFINE_PER_CPU(int, cpu_state); 27 + 28 + #define LS_IPI_IRQ (MIPS_CPU_IRQ_BASE + 6) 28 29 29 30 static void *ipi_set0_regs[16]; 30 31 static void *ipi_clear0_regs[16]; ··· 305 302 ipi_write_action(cpu_logical_map(i), (u32)action); 306 303 } 307 304 308 - #define IPI_IRQ_OFFSET 6 309 305 310 - void loongson3_send_irq_by_ipi(int cpu, int irqs) 311 - { 312 - ipi_write_action(cpu_logical_map(cpu), irqs << IPI_IRQ_OFFSET); 313 - } 314 - 315 - void loongson3_ipi_interrupt(struct pt_regs *regs) 306 + static irqreturn_t loongson3_ipi_interrupt(int irq, void *dev_id) 316 307 { 317 308 int i, cpu = smp_processor_id(); 318 - unsigned int action, c0count, irqs; 309 + unsigned int action, c0count; 319 310 320 311 action = ipi_read_clear(cpu); 321 - irqs = action >> IPI_IRQ_OFFSET; 322 312 323 313 if (action & SMP_RESCHEDULE_YOURSELF) 324 314 scheduler_ipi(); ··· 331 335 __wbflush(); /* Let others see the result ASAP */ 332 336 } 333 337 334 - if (irqs) { 335 - int irq; 336 - while ((irq = ffs(irqs))) { 337 - do_IRQ(irq-1); 338 - irqs &= ~(1<<(irq-1)); 339 - } 340 - } 338 + return IRQ_HANDLED; 341 339 } 342 340 343 341 #define MAX_LOOPS 800 ··· 428 438 429 439 static void __init loongson3_prepare_cpus(unsigned int max_cpus) 430 440 { 441 + if (request_irq(LS_IPI_IRQ, loongson3_ipi_interrupt, 442 + IRQF_PERCPU | IRQF_NO_SUSPEND, "SMP_IPI", NULL)) 443 + pr_err("Failed to request IPI IRQ\n"); 431 444 init_cpu_present(cpu_possible_mask); 432 445 per_cpu(cpu_state, smp_processor_id()) = CPU_ONLINE; 433 446 } ··· 477 484 set_cpu_online(cpu, false); 478 485 calculate_cpu_foreign_map(); 479 486 local_irq_save(flags); 480 - fixup_irqs(); 487 + irq_cpu_offline(); 488 + clear_c0_status(ST0_IM); 481 489 local_irq_restore(flags); 482 490 local_flush_tlb_all(); 483 491
+9 -9
arch/mips/mm/c-octeon.c
··· 237 237 c->dcache.sets = dcache_size / (c->dcache.linesz * c->dcache.ways); 238 238 239 239 if (smp_processor_id() == 0) { 240 - pr_notice("Primary instruction cache %ldkB, %s, %d way, " 241 - "%d sets, linesize %d bytes.\n", 242 - icache_size >> 10, 243 - cpu_has_vtag_icache ? 240 + pr_info("Primary instruction cache %ldkB, %s, %d way, " 241 + "%d sets, linesize %d bytes.\n", 242 + icache_size >> 10, 243 + cpu_has_vtag_icache ? 244 244 "virtually tagged" : "physically tagged", 245 - c->icache.ways, c->icache.sets, c->icache.linesz); 245 + c->icache.ways, c->icache.sets, c->icache.linesz); 246 246 247 - pr_notice("Primary data cache %ldkB, %d-way, %d sets, " 248 - "linesize %d bytes.\n", 249 - dcache_size >> 10, c->dcache.ways, 250 - c->dcache.sets, c->dcache.linesz); 247 + pr_info("Primary data cache %ldkB, %d-way, %d sets, " 248 + "linesize %d bytes.\n", 249 + dcache_size >> 10, c->dcache.ways, 250 + c->dcache.sets, c->dcache.linesz); 251 251 } 252 252 } 253 253
+2 -2
arch/mips/mm/c-r3k.c
··· 316 316 _dma_cache_wback = r3k_dma_cache_wback_inv; 317 317 _dma_cache_inv = r3k_dma_cache_wback_inv; 318 318 319 - printk("Primary instruction cache %ldkB, linesize %ld bytes.\n", 319 + pr_info("Primary instruction cache %ldkB, linesize %ld bytes.\n", 320 320 icache_size >> 10, icache_lsize); 321 - printk("Primary data cache %ldkB, linesize %ld bytes.\n", 321 + pr_info("Primary data cache %ldkB, linesize %ld bytes.\n", 322 322 dcache_size >> 10, dcache_lsize); 323 323 324 324 build_clear_page();
+38 -9
arch/mips/mm/c-r4k.c
··· 901 901 __sync(); 902 902 } 903 903 904 + static void prefetch_cache_inv(unsigned long addr, unsigned long size) 905 + { 906 + unsigned int linesz = cpu_scache_line_size(); 907 + unsigned long addr0 = addr, addr1; 908 + 909 + addr0 &= ~(linesz - 1); 910 + addr1 = (addr0 + size - 1) & ~(linesz - 1); 911 + 912 + protected_writeback_scache_line(addr0); 913 + if (likely(addr1 != addr0)) 914 + protected_writeback_scache_line(addr1); 915 + else 916 + return; 917 + 918 + addr0 += linesz; 919 + if (likely(addr1 != addr0)) 920 + protected_writeback_scache_line(addr0); 921 + else 922 + return; 923 + 924 + addr1 -= linesz; 925 + if (likely(addr1 > addr0)) 926 + protected_writeback_scache_line(addr0); 927 + } 928 + 904 929 static void r4k_dma_cache_inv(unsigned long addr, unsigned long size) 905 930 { 906 931 /* Catch bad driver code */ ··· 933 908 return; 934 909 935 910 preempt_disable(); 911 + 912 + if (current_cpu_type() == CPU_BMIPS5000) 913 + prefetch_cache_inv(addr, size); 914 + 936 915 if (cpu_has_inclusive_pcaches) { 937 916 if (size >= scache_size) { 938 917 if (current_cpu_type() != CPU_LOONGSON64) ··· 1496 1467 c->icache.ways = 1; 1497 1468 } 1498 1469 1499 - printk("Primary instruction cache %ldkB, %s, %s, linesize %d bytes.\n", 1500 - icache_size >> 10, 1501 - c->icache.flags & MIPS_CACHE_VTAG ? "VIVT" : "VIPT", 1502 - way_string[c->icache.ways], c->icache.linesz); 1470 + pr_info("Primary instruction cache %ldkB, %s, %s, linesize %d bytes.\n", 1471 + icache_size >> 10, 1472 + c->icache.flags & MIPS_CACHE_VTAG ? "VIVT" : "VIPT", 1473 + way_string[c->icache.ways], c->icache.linesz); 1503 1474 1504 - printk("Primary data cache %ldkB, %s, %s, %s, linesize %d bytes\n", 1505 - dcache_size >> 10, way_string[c->dcache.ways], 1506 - (c->dcache.flags & MIPS_CACHE_PINDEX) ? "PIPT" : "VIPT", 1507 - (c->dcache.flags & MIPS_CACHE_ALIASES) ? 1475 + pr_info("Primary data cache %ldkB, %s, %s, %s, linesize %d bytes\n", 1476 + dcache_size >> 10, way_string[c->dcache.ways], 1477 + (c->dcache.flags & MIPS_CACHE_PINDEX) ? "PIPT" : "VIPT", 1478 + (c->dcache.flags & MIPS_CACHE_ALIASES) ? 1508 1479 "cache aliases" : "no aliases", 1509 - c->dcache.linesz); 1480 + c->dcache.linesz); 1510 1481 } 1511 1482 1512 1483 static void probe_vcache(void)
+2 -2
arch/mips/mm/c-tx39.c
··· 410 410 current_cpu_data.icache.waybit = 0; 411 411 current_cpu_data.dcache.waybit = 0; 412 412 413 - printk("Primary instruction cache %ldkB, linesize %d bytes\n", 413 + pr_info("Primary instruction cache %ldkB, linesize %d bytes\n", 414 414 icache_size >> 10, current_cpu_data.icache.linesz); 415 - printk("Primary data cache %ldkB, linesize %d bytes\n", 415 + pr_info("Primary data cache %ldkB, linesize %d bytes\n", 416 416 dcache_size >> 10, current_cpu_data.dcache.linesz); 417 417 418 418 build_clear_page();
+4 -1
arch/mips/mm/tlbex.c
··· 1480 1480 1481 1481 static void setup_pw(void) 1482 1482 { 1483 + unsigned int pwctl; 1483 1484 unsigned long pgd_i, pgd_w; 1484 1485 #ifndef __PAGETABLE_PMD_FOLDED 1485 1486 unsigned long pmd_i, pmd_w; ··· 1507 1506 1508 1507 pte_i = ilog2(_PAGE_GLOBAL); 1509 1508 pte_w = 0; 1509 + pwctl = 1 << 30; /* Set PWDirExt */ 1510 1510 1511 1511 #ifndef __PAGETABLE_PMD_FOLDED 1512 1512 write_c0_pwfield(pgd_i << 24 | pmd_i << 12 | pt_i << 6 | pte_i); ··· 1518 1516 #endif 1519 1517 1520 1518 #ifdef CONFIG_MIPS_HUGE_TLB_SUPPORT 1521 - write_c0_pwctl(1 << 6 | psn); 1519 + pwctl |= (1 << 6 | psn); 1522 1520 #endif 1521 + write_c0_pwctl(pwctl); 1523 1522 write_c0_kpgd((long)swapper_pg_dir); 1524 1523 kscratch_used_mask |= (1 << 7); /* KScratch6 is used for KPGD */ 1525 1524 }
+3 -7
arch/mips/mti-malta/malta-int.c
··· 144 144 return IRQ_HANDLED; 145 145 } 146 146 147 - static struct irqaction corehi_irqaction = { 148 - .handler = corehi_handler, 149 - .name = "CoreHi", 150 - .flags = IRQF_NO_THREAD, 151 - }; 152 - 153 147 static msc_irqmap_t msc_irqmap[] __initdata = { 154 148 {MSC01C_INT_TMR, MSC01_IRQ_EDGE, 0}, 155 149 {MSC01C_INT_PCI, MSC01_IRQ_LEVEL, 0}, ··· 217 223 corehi_irq = MIPS_CPU_IRQ_BASE + MIPSCPU_INT_COREHI; 218 224 } 219 225 220 - setup_irq(corehi_irq, &corehi_irqaction); 226 + if (request_irq(corehi_irq, corehi_handler, IRQF_NO_THREAD, "CoreHi", 227 + NULL)) 228 + pr_err("Failed to request irq %d (CoreHi)\n", corehi_irq); 221 229 }
+3 -8
arch/mips/netlogic/xlr/fmn.c
··· 110 110 return IRQ_HANDLED; 111 111 } 112 112 113 - struct irqaction fmn_irqaction = { 114 - .handler = fmn_message_handler, 115 - .flags = IRQF_PERCPU, 116 - .name = "fmn", 117 - }; 118 - 119 113 void xlr_percpu_fmn_init(void) 120 114 { 121 115 struct xlr_fmn_info *cpu_fmn_info; ··· 189 195 { 190 196 uint32_t flags; 191 197 192 - /* setup irq only once */ 193 - setup_irq(IRQ_FMN, &fmn_irqaction); 198 + /* request irq only once */ 199 + if (request_irq(IRQ_FMN, fmn_message_handler, IRQF_PERCPU, "fmn", NULL)) 200 + pr_err("Failed to request irq %d (fmn)\n", IRQ_FMN); 194 201 195 202 flags = nlm_cop2_enable_irqsave(); 196 203 nlm_fmn_setup_intr(IRQ_FMN, (1 << nlm_threads_per_core) - 1);
+2 -2
arch/mips/pic32/pic32mzda/time.c
··· 3 3 * Joshua Henderson <joshua.henderson@microchip.com> 4 4 * Copyright (C) 2015 Microchip Technology Inc. All rights reserved. 5 5 */ 6 - #include <linux/clk-provider.h> 7 6 #include <linux/clocksource.h> 8 7 #include <linux/init.h> 9 8 #include <linux/irqdomain.h> 10 9 #include <linux/of.h> 10 + #include <linux/of_clk.h> 11 11 #include <linux/of_irq.h> 12 12 13 13 #include <asm/time.h> ··· 23 23 24 24 static unsigned int pic32_xlate_core_timer_irq(void) 25 25 { 26 - static struct device_node *node; 26 + struct device_node *node; 27 27 unsigned int irq; 28 28 29 29 node = of_find_matching_node(NULL, pic32_infra_match);
+1 -1
arch/mips/pistachio/time.c
··· 6 6 */ 7 7 8 8 #include <linux/clk.h> 9 - #include <linux/clk-provider.h> 10 9 #include <linux/clocksource.h> 11 10 #include <linux/init.h> 12 11 #include <linux/of.h> 12 + #include <linux/of_clk.h> 13 13 14 14 #include <asm/mips-cps.h> 15 15 #include <asm/time.h>
+12 -16
arch/mips/pmcs-msp71xx/msp_irq.c
··· 107 107 do_IRQ(MSP_INT_SW1); 108 108 } 109 109 110 - static struct irqaction cic_cascade_msp = { 111 - .handler = no_action, 112 - .name = "MSP CIC cascade", 113 - .flags = IRQF_NO_THREAD, 114 - }; 115 - 116 - static struct irqaction per_cascade_msp = { 117 - .handler = no_action, 118 - .name = "MSP PER cascade", 119 - .flags = IRQF_NO_THREAD, 120 - }; 121 - 122 110 void __init arch_init_irq(void) 123 111 { 124 112 /* assume we'll be using vectored interrupt mode except in UP mode*/ ··· 130 142 #endif /* CONFIG_MIPS_MT_SMP */ 131 143 #endif /* CONFIG_MIPS_MT */ 132 144 /* setup the cascaded interrupts */ 133 - setup_irq(MSP_INT_CIC, &cic_cascade_msp); 134 - setup_irq(MSP_INT_PER, &per_cascade_msp); 145 + if (request_irq(MSP_INT_CIC, no_action, IRQF_NO_THREAD, 146 + "MSP CIC cascade", NULL)) 147 + pr_err("Failed to register MSP CIC cascade interrupt\n"); 148 + if (request_irq(MSP_INT_PER, no_action, IRQF_NO_THREAD, 149 + "MSP PER cascade", NULL)) 150 + pr_err("Failed to register MSP PER cascade interrupt\n"); 135 151 136 152 #else 137 153 /* ··· 145 153 msp_slp_irq_init(); 146 154 147 155 /* setup the cascaded SLP/PER interrupts */ 148 - setup_irq(MSP_INT_SLP, &cic_cascade_msp); 149 - setup_irq(MSP_INT_PER, &per_cascade_msp); 156 + if (request_irq(MSP_INT_SLP, no_action, IRQF_NO_THREAD, 157 + "MSP CIC cascade", NULL)) 158 + pr_err("Failed to register MSP CIC cascade interrupt\n"); 159 + if (request_irq(MSP_INT_PER, no_action, IRQF_NO_THREAD, 160 + "MSP PER cascade", NULL)) 161 + pr_err("Failed to register MSP PER cascade interrupt\n"); 150 162 #endif 151 163 }
+6 -16
arch/mips/pmcs-msp71xx/msp_smp.c
··· 38 38 return IRQ_HANDLED; 39 39 } 40 40 41 - static struct irqaction irq_resched = { 42 - .handler = ipi_resched_interrupt, 43 - .flags = IRQF_PERCPU, 44 - .name = "IPI_resched" 45 - }; 46 - 47 - static struct irqaction irq_call = { 48 - .handler = ipi_call_interrupt, 49 - .flags = IRQF_PERCPU, 50 - .name = "IPI_call" 51 - }; 52 - 53 - void __init arch_init_ipiirq(int irq, struct irqaction *action) 41 + void __init arch_init_ipiirq(int irq, const char *name, irq_handler_t handler) 54 42 { 55 - setup_irq(irq, action); 43 + if (request_irq(irq, handler, IRQF_PERCPU, name, NULL)) 44 + pr_err("Failed to request irq %d (%s)\n", irq, name); 56 45 irq_set_handler(irq, handle_percpu_irq); 57 46 } 58 47 ··· 49 60 { 50 61 set_vi_handler(MIPS_CPU_IPI_RESCHED_IRQ, ipi_resched_dispatch); 51 62 set_vi_handler(MIPS_CPU_IPI_CALL_IRQ, ipi_call_dispatch); 52 - arch_init_ipiirq(MIPS_CPU_IPI_RESCHED_IRQ, &irq_resched); 53 - arch_init_ipiirq(MIPS_CPU_IPI_CALL_IRQ, &irq_call); 63 + arch_init_ipiirq(MIPS_CPU_IPI_RESCHED_IRQ, "IPI_resched", 64 + ipi_resched_interrupt); 65 + arch_init_ipiirq(MIPS_CPU_IPI_CALL_IRQ, "IPI_call", ipi_call_interrupt); 54 66 } 55 67 #endif /* CONFIG_MIPS_MT_SMP */
+5 -3
arch/mips/pmcs-msp71xx/msp_time.c
··· 27 27 #define get_current_vpe() \ 28 28 ((read_c0_tcbind() >> TCBIND_CURVPE_SHIFT) & TCBIND_CURVPE) 29 29 30 - static struct irqaction timer_vpe1; 31 30 static int tim_installed; 32 31 33 32 void __init plat_time_init(void) ··· 76 77 77 78 unsigned int get_c0_compare_int(void) 78 79 { 80 + unsigned long flags = IRQF_PERCPU | IRQF_TIMER | IRQF_SHARED; 81 + 79 82 /* MIPS_MT modes may want timer for second VPE */ 80 83 if ((get_current_vpe()) && !tim_installed) { 81 - memcpy(&timer_vpe1, &c0_compare_irqaction, sizeof(timer_vpe1)); 82 - setup_irq(MSP_INT_VPE1_TIMER, &timer_vpe1); 84 + if (request_irq(MSP_INT_VPE1_TIMER, c0_compare_interrupt, flags, 85 + "timer", c0_compare_interrupt)) 86 + pr_err("Failed to register timer interrupt\n"); 83 87 tim_installed++; 84 88 } 85 89
+1
arch/mips/ralink/Kconfig
··· 52 52 select COMMON_CLK 53 53 select CLKSRC_MIPS_GIC 54 54 select HAVE_PCI if PCI_MT7621 55 + select SOC_BUS 55 56 endchoice 56 57 57 58 choice
+8 -10
arch/mips/ralink/cevt-rt3352.c
··· 82 82 }, 83 83 }; 84 84 85 - static struct irqaction systick_irqaction = { 86 - .handler = systick_interrupt, 87 - .flags = IRQF_PERCPU | IRQF_TIMER, 88 - .dev_id = &systick.dev, 89 - }; 90 - 91 85 static int systick_shutdown(struct clock_event_device *evt) 92 86 { 93 87 struct systick_device *sdev; ··· 89 95 sdev = container_of(evt, struct systick_device, dev); 90 96 91 97 if (sdev->irq_requested) 92 - free_irq(systick.dev.irq, &systick_irqaction); 98 + free_irq(systick.dev.irq, &systick.dev); 93 99 sdev->irq_requested = 0; 94 100 iowrite32(0, systick.membase + SYSTICK_CONFIG); 95 101 ··· 98 104 99 105 static int systick_set_oneshot(struct clock_event_device *evt) 100 106 { 107 + const char *name = systick.dev.name; 101 108 struct systick_device *sdev; 109 + int irq = systick.dev.irq; 102 110 103 111 sdev = container_of(evt, struct systick_device, dev); 104 112 105 - if (!sdev->irq_requested) 106 - setup_irq(systick.dev.irq, &systick_irqaction); 113 + if (!sdev->irq_requested) { 114 + if (request_irq(irq, systick_interrupt, 115 + IRQF_PERCPU | IRQF_TIMER, name, &systick.dev)) 116 + pr_err("Failed to request irq %d (%s)\n", irq, name); 117 + } 107 118 sdev->irq_requested = 1; 108 119 iowrite32(CFG_EXT_STK_EN | CFG_CNT_EN, 109 120 systick.membase + SYSTICK_CONFIG); ··· 124 125 if (!systick.membase) 125 126 return -ENXIO; 126 127 127 - systick_irqaction.name = np->name; 128 128 systick.dev.name = np->name; 129 129 clockevents_calc_mult_shift(&systick.dev, SYSTICK_FREQ, 60); 130 130 systick.dev.max_delta_ns = clockevent_delta2ns(0x7fff, &systick.dev);
+30
arch/mips/ralink/mt7621.c
··· 7 7 8 8 #include <linux/kernel.h> 9 9 #include <linux/init.h> 10 + #include <linux/slab.h> 11 + #include <linux/sys_soc.h> 10 12 11 13 #include <asm/mipsregs.h> 12 14 #include <asm/smp-ops.h> ··· 162 160 panic("Failed to remap core resources"); 163 161 } 164 162 163 + static void soc_dev_init(struct ralink_soc_info *soc_info, u32 rev) 164 + { 165 + struct soc_device *soc_dev; 166 + struct soc_device_attribute *soc_dev_attr; 167 + 168 + soc_dev_attr = kzalloc(sizeof(*soc_dev_attr), GFP_KERNEL); 169 + if (!soc_dev_attr) 170 + return; 171 + 172 + soc_dev_attr->soc_id = "mt7621"; 173 + soc_dev_attr->family = "Ralink"; 174 + 175 + if (((rev >> CHIP_REV_VER_SHIFT) & CHIP_REV_VER_MASK) == 1 && 176 + (rev & CHIP_REV_ECO_MASK) == 1) 177 + soc_dev_attr->revision = "E2"; 178 + else 179 + soc_dev_attr->revision = "E1"; 180 + 181 + soc_dev_attr->data = soc_info; 182 + 183 + soc_dev = soc_device_register(soc_dev_attr); 184 + if (IS_ERR(soc_dev)) { 185 + kfree(soc_dev_attr); 186 + return; 187 + } 188 + } 189 + 165 190 void prom_soc_init(struct ralink_soc_info *soc_info) 166 191 { 167 192 void __iomem *sysc = (void __iomem *) KSEG1ADDR(MT7621_SYSC_BASE); ··· 243 214 244 215 rt2880_pinmux_data = mt7621_pinmux_data; 245 216 217 + soc_dev_init(soc_info, rev); 246 218 247 219 if (!register_cps_smp_ops()) 248 220 return;
+1 -1
arch/mips/ralink/timer-gic.c
··· 8 8 #include <linux/init.h> 9 9 10 10 #include <linux/of.h> 11 - #include <linux/clk-provider.h> 11 + #include <linux/of_clk.h> 12 12 #include <linux/clocksource.h> 13 13 14 14 #include "common.h"
+2 -8
arch/mips/sgi-ip22/ip22-eisa.c
··· 92 92 return IRQ_NONE; 93 93 } 94 94 95 - static struct irqaction eisa_action = { 96 - .handler = ip22_eisa_intr, 97 - .name = "EISA", 98 - }; 99 - 100 95 int __init ip22_eisa_init(void) 101 96 { 102 97 int i, c; ··· 131 136 132 137 init_i8259_irqs(); 133 138 134 - /* Cannot use request_irq because of kmalloc not being ready at such 135 - * an early stage. Yes, I've been bitten... */ 136 - setup_irq(SGI_EISA_IRQ, &eisa_action); 139 + if (request_irq(SGI_EISA_IRQ, ip22_eisa_intr, 0, "EISA", NULL)) 140 + pr_err("Failed to request irq %d (EISA)\n", SGI_EISA_IRQ); 137 141 138 142 EISA_bus = 1; 139 143 return 0;
+15 -34
arch/mips/sgi-ip22/ip22-int.c
··· 159 159 irq_exit(); 160 160 } 161 161 162 - static struct irqaction local0_cascade = { 163 - .handler = no_action, 164 - .flags = IRQF_NO_THREAD, 165 - .name = "local0 cascade", 166 - }; 167 - 168 - static struct irqaction local1_cascade = { 169 - .handler = no_action, 170 - .flags = IRQF_NO_THREAD, 171 - .name = "local1 cascade", 172 - }; 173 - 174 - static struct irqaction buserr = { 175 - .handler = no_action, 176 - .flags = IRQF_NO_THREAD, 177 - .name = "Bus Error", 178 - }; 179 - 180 - static struct irqaction map0_cascade = { 181 - .handler = no_action, 182 - .flags = IRQF_NO_THREAD, 183 - .name = "mapable0 cascade", 184 - }; 185 - 186 162 #ifdef USE_LIO3_IRQ 187 - static struct irqaction map1_cascade = { 188 - .handler = no_action, 189 - .flags = IRQF_NO_THREAD, 190 - .name = "mapable1 cascade", 191 - }; 192 163 #define SGI_INTERRUPTS SGINT_END 193 164 #else 194 165 #define SGI_INTERRUPTS SGINT_LOCAL3 ··· 293 322 } 294 323 295 324 /* vector handler. this register the IRQ as non-sharable */ 296 - setup_irq(SGI_LOCAL_0_IRQ, &local0_cascade); 297 - setup_irq(SGI_LOCAL_1_IRQ, &local1_cascade); 298 - setup_irq(SGI_BUSERR_IRQ, &buserr); 325 + if (request_irq(SGI_LOCAL_0_IRQ, no_action, IRQF_NO_THREAD, 326 + "local0 cascade", NULL)) 327 + pr_err("Failed to register local0 cascade interrupt\n"); 328 + if (request_irq(SGI_LOCAL_1_IRQ, no_action, IRQF_NO_THREAD, 329 + "local1 cascade", NULL)) 330 + pr_err("Failed to register local1 cascade interrupt\n"); 331 + if (request_irq(SGI_BUSERR_IRQ, no_action, IRQF_NO_THREAD, 332 + "Bus Error", NULL)) 333 + pr_err("Failed to register Bus Error interrupt\n"); 299 334 300 335 /* cascade in cascade. i love Indy ;-) */ 301 - setup_irq(SGI_MAP_0_IRQ, &map0_cascade); 336 + if (request_irq(SGI_MAP_0_IRQ, no_action, IRQF_NO_THREAD, 337 + "mapable0 cascade", NULL)) 338 + pr_err("Failed to register mapable0 cascade interrupt\n"); 302 339 #ifdef USE_LIO3_IRQ 303 - setup_irq(SGI_MAP_1_IRQ, &map1_cascade); 340 + if (request_irq(SGI_MAP_1_IRQ, no_action, IRQF_NO_THREAD, 341 + "mapable1 cascade", NULL)) 342 + pr_err("Failed to register mapable1 cascade interrupt\n"); 304 343 #endif 305 344 306 345 #ifdef CONFIG_EISA
+6 -12
arch/mips/sgi-ip32/ip32-irq.c
··· 111 111 extern irqreturn_t crime_memerr_intr(int irq, void *dev_id); 112 112 extern irqreturn_t crime_cpuerr_intr(int irq, void *dev_id); 113 113 114 - static struct irqaction memerr_irq = { 115 - .handler = crime_memerr_intr, 116 - .name = "CRIME memory error", 117 - }; 118 - 119 - static struct irqaction cpuerr_irq = { 120 - .handler = crime_cpuerr_intr, 121 - .name = "CRIME CPU error", 122 - }; 123 - 124 114 /* 125 115 * This is for pure CRIME interrupts - ie not MACE. The advantage? 126 116 * We get to split the register in half and do faster lookups. ··· 487 497 break; 488 498 } 489 499 } 490 - setup_irq(CRIME_MEMERR_IRQ, &memerr_irq); 491 - setup_irq(CRIME_CPUERR_IRQ, &cpuerr_irq); 500 + if (request_irq(CRIME_MEMERR_IRQ, crime_memerr_intr, 0, 501 + "CRIME memory error", NULL)) 502 + pr_err("Failed to register CRIME memory error interrupt\n"); 503 + if (request_irq(CRIME_CPUERR_IRQ, crime_cpuerr_intr, 0, 504 + "CRIME CPU error", NULL)) 505 + pr_err("Failed to register CRIME CPU error interrupt\n"); 492 506 493 507 #define ALLINTS (IE_IRQ0 | IE_IRQ1 | IE_IRQ2 | IE_IRQ3 | IE_IRQ4 | IE_IRQ5) 494 508 change_c0_status(ST0_IM, ALLINTS);
+3 -1
arch/mips/sni/a20r.c
··· 222 222 irq_set_chip_and_handler(i, &a20r_irq_type, handle_level_irq); 223 223 sni_hwint = a20r_hwint; 224 224 change_c0_status(ST0_IM, IE_IRQ0); 225 - setup_irq(SNI_A20R_IRQ_BASE + 3, &sni_isa_irq); 225 + if (request_irq(SNI_A20R_IRQ_BASE + 3, sni_isa_irq_handler, 0, "ISA", 226 + NULL)) 227 + pr_err("Failed to register ISA interrupt\n"); 226 228 } 227 229 228 230 void sni_a20r_init(void)
+1 -7
arch/mips/sni/irq.c
··· 27 27 } 28 28 29 29 /* ISA irq handler */ 30 - static irqreturn_t sni_isa_irq_handler(int dummy, void *p) 30 + irqreturn_t sni_isa_irq_handler(int dummy, void *p) 31 31 { 32 32 int irq; 33 33 ··· 38 38 generic_handle_irq(irq); 39 39 return IRQ_HANDLED; 40 40 } 41 - 42 - struct irqaction sni_isa_irq = { 43 - .handler = sni_isa_irq_handler, 44 - .name = "ISA", 45 - .flags = IRQF_SHARED 46 - }; 47 41 48 42 /* 49 43 * On systems with i8259-style interrupt controllers we assume for
+6 -2
arch/mips/sni/pcit.c
··· 244 244 *(volatile u32 *)SNI_PCIT_INT_REG = 0; 245 245 sni_hwint = sni_pcit_hwint; 246 246 change_c0_status(ST0_IM, IE_IRQ1); 247 - setup_irq(SNI_PCIT_INT_START + 6, &sni_isa_irq); 247 + if (request_irq(SNI_PCIT_INT_START + 6, sni_isa_irq_handler, 0, "ISA", 248 + NULL)) 249 + pr_err("Failed to register ISA interrupt\n"); 248 250 } 249 251 250 252 void __init sni_pcit_cplus_irq_init(void) ··· 259 257 *(volatile u32 *)SNI_PCIT_INT_REG = 0x40000000; 260 258 sni_hwint = sni_pcit_hwint_cplus; 261 259 change_c0_status(ST0_IM, IE_IRQ0); 262 - setup_irq(MIPS_CPU_IRQ_BASE + 3, &sni_isa_irq); 260 + if (request_irq(MIPS_CPU_IRQ_BASE + 3, sni_isa_irq_handler, 0, "ISA", 261 + NULL)) 262 + pr_err("Failed to register ISA interrupt\n"); 263 263 } 264 264 265 265 void __init sni_pcit_init(void)
+9 -14
arch/mips/sni/rm200.c
··· 356 356 /* 357 357 * IRQ2 is cascade interrupt to second interrupt controller 358 358 */ 359 - static struct irqaction sni_rm200_irq2 = { 360 - .handler = no_action, 361 - .name = "cascade", 362 - .flags = IRQF_NO_THREAD, 363 - }; 364 359 365 360 static struct resource sni_rm200_pic1_resource = { 366 361 .name = "onboard ISA pic1", ··· 384 389 return IRQ_HANDLED; 385 390 } 386 391 387 - struct irqaction sni_rm200_i8259A_irq = { 388 - .handler = sni_rm200_i8259A_irq_handler, 389 - .name = "onboard ISA", 390 - .flags = IRQF_SHARED 391 - }; 392 - 393 392 void __init sni_rm200_i8259_irqs(void) 394 393 { 395 394 int i; ··· 406 417 irq_set_chip_and_handler(i, &sni_rm200_i8259A_chip, 407 418 handle_level_irq); 408 419 409 - setup_irq(RM200_I8259A_IRQ_BASE + PIC_CASCADE_IR, &sni_rm200_irq2); 420 + if (request_irq(RM200_I8259A_IRQ_BASE + PIC_CASCADE_IR, no_action, 421 + IRQF_NO_THREAD, "cascade", NULL)) 422 + pr_err("Failed to register cascade interrupt\n"); 410 423 } 411 424 412 425 ··· 472 481 irq_set_chip_and_handler(i, &rm200_irq_type, handle_level_irq); 473 482 sni_hwint = sni_rm200_hwint; 474 483 change_c0_status(ST0_IM, IE_IRQ0); 475 - setup_irq(SNI_RM200_INT_START + 0, &sni_rm200_i8259A_irq); 476 - setup_irq(SNI_RM200_INT_START + 1, &sni_isa_irq); 484 + if (request_irq(SNI_RM200_INT_START + 0, sni_rm200_i8259A_irq_handler, 485 + 0, "onboard ISA", NULL)) 486 + pr_err("Failed to register onboard ISA interrupt\n"); 487 + if (request_irq(SNI_RM200_INT_START + 1, sni_isa_irq_handler, 0, "ISA", 488 + NULL)) 489 + pr_err("Failed to register ISA interrupt\n"); 477 490 } 478 491 479 492 void __init sni_rm200_init(void)
+3 -9
arch/mips/sni/time.c
··· 55 55 return IRQ_HANDLED; 56 56 } 57 57 58 - static struct irqaction a20r_irqaction = { 59 - .handler = a20r_interrupt, 60 - .flags = IRQF_PERCPU | IRQF_TIMER, 61 - .name = "a20r-timer", 62 - }; 63 - 64 58 /* 65 59 * a20r platform uses 2 counters to divide the input frequency. 66 60 * Counter 2 output is connected to Counter 0 & 1 input. ··· 62 68 static void __init sni_a20r_timer_setup(void) 63 69 { 64 70 struct clock_event_device *cd = &a20r_clockevent_device; 65 - struct irqaction *action = &a20r_irqaction; 66 71 unsigned int cpu = smp_processor_id(); 67 72 68 73 cd->cpumask = cpumask_of(cpu); 69 74 clockevents_register_device(cd); 70 - action->dev_id = cd; 71 - setup_irq(SNI_A20R_IRQ_TIMER, &a20r_irqaction); 75 + if (request_irq(SNI_A20R_IRQ_TIMER, a20r_interrupt, 76 + IRQF_PERCPU | IRQF_TIMER, "a20r-timer", cd)) 77 + pr_err("Failed to register a20r-timer interrupt\n"); 72 78 } 73 79 74 80 #define SNI_8254_TICK_RATE 1193182UL
+2 -7
arch/mips/vr41xx/common/irq.c
··· 17 17 18 18 static irq_cascade_t irq_cascade[NR_IRQS] __cacheline_aligned; 19 19 20 - static struct irqaction cascade_irqaction = { 21 - .handler = no_action, 22 - .name = "cascade", 23 - .flags = IRQF_NO_THREAD, 24 - }; 25 - 26 20 int cascade_irq(unsigned int irq, int (*get_irq)(unsigned int)) 27 21 { 28 22 int retval = 0; ··· 30 36 irq_cascade[irq].get_irq = get_irq; 31 37 32 38 if (get_irq != NULL) { 33 - retval = setup_irq(irq, &cascade_irqaction); 39 + retval = request_irq(irq, no_action, IRQF_NO_THREAD, 40 + "cascade", NULL); 34 41 if (retval < 0) 35 42 irq_cascade[irq].get_irq = NULL; 36 43 }
+5 -1
drivers/firmware/dmi_scan.c
··· 11 11 #include <asm/dmi.h> 12 12 #include <asm/unaligned.h> 13 13 14 + #ifndef SMBIOS_ENTRY_POINT_SCAN_START 15 + #define SMBIOS_ENTRY_POINT_SCAN_START 0xF0000 16 + #endif 17 + 14 18 struct kobject *dmi_kobj; 15 19 EXPORT_SYMBOL_GPL(dmi_kobj); 16 20 ··· 667 663 return; 668 664 } 669 665 } else if (IS_ENABLED(CONFIG_DMI_SCAN_MACHINE_NON_EFI_FALLBACK)) { 670 - p = dmi_early_remap(0xF0000, 0x10000); 666 + p = dmi_early_remap(SMBIOS_ENTRY_POINT_SCAN_START, 0x10000); 671 667 if (p == NULL) 672 668 goto error; 673 669
+1 -19
drivers/ide/Kconfig
··· 662 662 CD-ROM on hda. This option changes this to more natural hda for 663 663 hard disk and hdc for CD-ROM. 664 664 665 - config BLK_DEV_IDE_AU1XXX 666 - bool "IDE for AMD Alchemy Au1200" 667 - depends on MIPS_ALCHEMY 668 - select IDE_XFER_MODE 669 - choice 670 - prompt "IDE Mode for AMD Alchemy Au1200" 671 - default BLK_DEV_IDE_AU1XXX_PIO_DBDMA 672 - depends on BLK_DEV_IDE_AU1XXX 673 - 674 - config BLK_DEV_IDE_AU1XXX_PIO_DBDMA 675 - bool "PIO+DbDMA IDE for AMD Alchemy Au1200" 676 - 677 - config BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA 678 - bool "MDMA2+DbDMA IDE for AMD Alchemy Au1200" 679 - depends on BLK_DEV_IDE_AU1XXX 680 - endchoice 681 - 682 665 config BLK_DEV_IDE_TX4938 683 666 tristate "TX4938 internal IDE support" 684 667 depends on SOC_TX4938 ··· 842 859 endif 843 860 844 861 config BLK_DEV_IDEDMA 845 - def_bool BLK_DEV_IDEDMA_SFF || \ 846 - BLK_DEV_IDEDMA_ICS || BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA 862 + def_bool BLK_DEV_IDEDMA_SFF || BLK_DEV_IDEDMA_ICS 847 863 select IDE_XFER_MODE 848 864 849 865 endif # IDE
-2
drivers/ide/Makefile
··· 107 107 obj-$(CONFIG_BLK_DEV_IDE_RAPIDE) += rapide.o 108 108 obj-$(CONFIG_BLK_DEV_PALMCHIP_BK3710) += palm_bk3710.o 109 109 110 - obj-$(CONFIG_BLK_DEV_IDE_AU1XXX) += au1xxx-ide.o 111 - 112 110 obj-$(CONFIG_BLK_DEV_IDE_TX4938) += tx4938ide.o 113 111 obj-$(CONFIG_BLK_DEV_IDE_TX4939) += tx4939ide.o
-597
drivers/ide/au1xxx-ide.c
··· 1 - /* 2 - * BRIEF MODULE DESCRIPTION 3 - * AMD Alchemy Au1xxx IDE interface routines over the Static Bus 4 - * 5 - * Copyright (c) 2003-2005 AMD, Personal Connectivity Solutions 6 - * 7 - * This program is free software; you can redistribute it and/or modify it under 8 - * the terms of the GNU General Public License as published by the Free Software 9 - * Foundation; either version 2 of the License, or (at your option) any later 10 - * version. 11 - * 12 - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, 13 - * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 14 - * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR 15 - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 16 - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 17 - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 18 - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 19 - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 20 - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 21 - * POSSIBILITY OF SUCH DAMAGE. 22 - * 23 - * You should have received a copy of the GNU General Public License along with 24 - * this program; if not, write to the Free Software Foundation, Inc., 25 - * 675 Mass Ave, Cambridge, MA 02139, USA. 26 - * 27 - * Note: for more information, please refer "AMD Alchemy Au1200/Au1550 IDE 28 - * Interface and Linux Device Driver" Application Note. 29 - */ 30 - #include <linux/types.h> 31 - #include <linux/module.h> 32 - #include <linux/kernel.h> 33 - #include <linux/delay.h> 34 - #include <linux/platform_device.h> 35 - #include <linux/init.h> 36 - #include <linux/ide.h> 37 - #include <linux/scatterlist.h> 38 - 39 - #include <asm/mach-au1x00/au1000.h> 40 - #include <asm/mach-au1x00/au1xxx_dbdma.h> 41 - #include <asm/mach-au1x00/au1xxx_ide.h> 42 - 43 - #define DRV_NAME "au1200-ide" 44 - #define DRV_AUTHOR "Enrico Walther <enrico.walther@amd.com> / Pete Popov <ppopov@embeddedalley.com>" 45 - 46 - #ifndef IDE_REG_SHIFT 47 - #define IDE_REG_SHIFT 5 48 - #endif 49 - 50 - /* enable the burstmode in the dbdma */ 51 - #define IDE_AU1XXX_BURSTMODE 1 52 - 53 - static _auide_hwif auide_hwif; 54 - 55 - #if defined(CONFIG_BLK_DEV_IDE_AU1XXX_PIO_DBDMA) 56 - 57 - static inline void auide_insw(unsigned long port, void *addr, u32 count) 58 - { 59 - _auide_hwif *ahwif = &auide_hwif; 60 - chan_tab_t *ctp; 61 - au1x_ddma_desc_t *dp; 62 - 63 - if (!au1xxx_dbdma_put_dest(ahwif->rx_chan, virt_to_phys(addr), 64 - count << 1, DDMA_FLAGS_NOIE)) { 65 - printk(KERN_ERR "%s failed %d\n", __func__, __LINE__); 66 - return; 67 - } 68 - ctp = *((chan_tab_t **)ahwif->rx_chan); 69 - dp = ctp->cur_ptr; 70 - while (dp->dscr_cmd0 & DSCR_CMD0_V) 71 - ; 72 - ctp->cur_ptr = au1xxx_ddma_get_nextptr_virt(dp); 73 - } 74 - 75 - static inline void auide_outsw(unsigned long port, void *addr, u32 count) 76 - { 77 - _auide_hwif *ahwif = &auide_hwif; 78 - chan_tab_t *ctp; 79 - au1x_ddma_desc_t *dp; 80 - 81 - if (!au1xxx_dbdma_put_source(ahwif->tx_chan, virt_to_phys(addr), 82 - count << 1, DDMA_FLAGS_NOIE)) { 83 - printk(KERN_ERR "%s failed %d\n", __func__, __LINE__); 84 - return; 85 - } 86 - ctp = *((chan_tab_t **)ahwif->tx_chan); 87 - dp = ctp->cur_ptr; 88 - while (dp->dscr_cmd0 & DSCR_CMD0_V) 89 - ; 90 - ctp->cur_ptr = au1xxx_ddma_get_nextptr_virt(dp); 91 - } 92 - 93 - static void au1xxx_input_data(ide_drive_t *drive, struct ide_cmd *cmd, 94 - void *buf, unsigned int len) 95 - { 96 - auide_insw(drive->hwif->io_ports.data_addr, buf, (len + 1) / 2); 97 - } 98 - 99 - static void au1xxx_output_data(ide_drive_t *drive, struct ide_cmd *cmd, 100 - void *buf, unsigned int len) 101 - { 102 - auide_outsw(drive->hwif->io_ports.data_addr, buf, (len + 1) / 2); 103 - } 104 - #endif 105 - 106 - static void au1xxx_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive) 107 - { 108 - int mem_sttime = 0, mem_stcfg = au_readl(MEM_STCFG2); 109 - 110 - switch (drive->pio_mode - XFER_PIO_0) { 111 - case 0: 112 - mem_sttime = SBC_IDE_TIMING(PIO0); 113 - 114 - /* set configuration for RCS2# */ 115 - mem_stcfg |= TS_MASK; 116 - mem_stcfg &= ~TCSOE_MASK; 117 - mem_stcfg &= ~TOECS_MASK; 118 - mem_stcfg |= SBC_IDE_PIO0_TCSOE | SBC_IDE_PIO0_TOECS; 119 - break; 120 - 121 - case 1: 122 - mem_sttime = SBC_IDE_TIMING(PIO1); 123 - 124 - /* set configuration for RCS2# */ 125 - mem_stcfg |= TS_MASK; 126 - mem_stcfg &= ~TCSOE_MASK; 127 - mem_stcfg &= ~TOECS_MASK; 128 - mem_stcfg |= SBC_IDE_PIO1_TCSOE | SBC_IDE_PIO1_TOECS; 129 - break; 130 - 131 - case 2: 132 - mem_sttime = SBC_IDE_TIMING(PIO2); 133 - 134 - /* set configuration for RCS2# */ 135 - mem_stcfg &= ~TS_MASK; 136 - mem_stcfg &= ~TCSOE_MASK; 137 - mem_stcfg &= ~TOECS_MASK; 138 - mem_stcfg |= SBC_IDE_PIO2_TCSOE | SBC_IDE_PIO2_TOECS; 139 - break; 140 - 141 - case 3: 142 - mem_sttime = SBC_IDE_TIMING(PIO3); 143 - 144 - /* set configuration for RCS2# */ 145 - mem_stcfg &= ~TS_MASK; 146 - mem_stcfg &= ~TCSOE_MASK; 147 - mem_stcfg &= ~TOECS_MASK; 148 - mem_stcfg |= SBC_IDE_PIO3_TCSOE | SBC_IDE_PIO3_TOECS; 149 - 150 - break; 151 - 152 - case 4: 153 - mem_sttime = SBC_IDE_TIMING(PIO4); 154 - 155 - /* set configuration for RCS2# */ 156 - mem_stcfg &= ~TS_MASK; 157 - mem_stcfg &= ~TCSOE_MASK; 158 - mem_stcfg &= ~TOECS_MASK; 159 - mem_stcfg |= SBC_IDE_PIO4_TCSOE | SBC_IDE_PIO4_TOECS; 160 - break; 161 - } 162 - 163 - au_writel(mem_sttime,MEM_STTIME2); 164 - au_writel(mem_stcfg,MEM_STCFG2); 165 - } 166 - 167 - static void auide_set_dma_mode(ide_hwif_t *hwif, ide_drive_t *drive) 168 - { 169 - int mem_sttime = 0, mem_stcfg = au_readl(MEM_STCFG2); 170 - 171 - switch (drive->dma_mode) { 172 - #ifdef CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA 173 - case XFER_MW_DMA_2: 174 - mem_sttime = SBC_IDE_TIMING(MDMA2); 175 - 176 - /* set configuration for RCS2# */ 177 - mem_stcfg &= ~TS_MASK; 178 - mem_stcfg &= ~TCSOE_MASK; 179 - mem_stcfg &= ~TOECS_MASK; 180 - mem_stcfg |= SBC_IDE_MDMA2_TCSOE | SBC_IDE_MDMA2_TOECS; 181 - 182 - break; 183 - case XFER_MW_DMA_1: 184 - mem_sttime = SBC_IDE_TIMING(MDMA1); 185 - 186 - /* set configuration for RCS2# */ 187 - mem_stcfg &= ~TS_MASK; 188 - mem_stcfg &= ~TCSOE_MASK; 189 - mem_stcfg &= ~TOECS_MASK; 190 - mem_stcfg |= SBC_IDE_MDMA1_TCSOE | SBC_IDE_MDMA1_TOECS; 191 - 192 - break; 193 - case XFER_MW_DMA_0: 194 - mem_sttime = SBC_IDE_TIMING(MDMA0); 195 - 196 - /* set configuration for RCS2# */ 197 - mem_stcfg |= TS_MASK; 198 - mem_stcfg &= ~TCSOE_MASK; 199 - mem_stcfg &= ~TOECS_MASK; 200 - mem_stcfg |= SBC_IDE_MDMA0_TCSOE | SBC_IDE_MDMA0_TOECS; 201 - 202 - break; 203 - #endif 204 - } 205 - 206 - au_writel(mem_sttime,MEM_STTIME2); 207 - au_writel(mem_stcfg,MEM_STCFG2); 208 - } 209 - 210 - /* 211 - * Multi-Word DMA + DbDMA functions 212 - */ 213 - 214 - #ifdef CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA 215 - static int auide_build_dmatable(ide_drive_t *drive, struct ide_cmd *cmd) 216 - { 217 - ide_hwif_t *hwif = drive->hwif; 218 - _auide_hwif *ahwif = &auide_hwif; 219 - struct scatterlist *sg; 220 - int i = cmd->sg_nents, count = 0; 221 - int iswrite = !!(cmd->tf_flags & IDE_TFLAG_WRITE); 222 - 223 - /* Save for interrupt context */ 224 - ahwif->drive = drive; 225 - 226 - /* fill the descriptors */ 227 - sg = hwif->sg_table; 228 - while (i && sg_dma_len(sg)) { 229 - u32 cur_addr; 230 - u32 cur_len; 231 - 232 - cur_addr = sg_dma_address(sg); 233 - cur_len = sg_dma_len(sg); 234 - 235 - while (cur_len) { 236 - u32 flags = DDMA_FLAGS_NOIE; 237 - unsigned int tc = (cur_len < 0xfe00)? cur_len: 0xfe00; 238 - 239 - if (++count >= PRD_ENTRIES) { 240 - printk(KERN_WARNING "%s: DMA table too small\n", 241 - drive->name); 242 - return 0; 243 - } 244 - 245 - /* Lets enable intr for the last descriptor only */ 246 - if (1==i) 247 - flags = DDMA_FLAGS_IE; 248 - else 249 - flags = DDMA_FLAGS_NOIE; 250 - 251 - if (iswrite) { 252 - if (!au1xxx_dbdma_put_source(ahwif->tx_chan, 253 - sg_phys(sg), tc, flags)) { 254 - printk(KERN_ERR "%s failed %d\n", 255 - __func__, __LINE__); 256 - } 257 - } else { 258 - if (!au1xxx_dbdma_put_dest(ahwif->rx_chan, 259 - sg_phys(sg), tc, flags)) { 260 - printk(KERN_ERR "%s failed %d\n", 261 - __func__, __LINE__); 262 - } 263 - } 264 - 265 - cur_addr += tc; 266 - cur_len -= tc; 267 - } 268 - sg = sg_next(sg); 269 - i--; 270 - } 271 - 272 - if (count) 273 - return 1; 274 - 275 - return 0; /* revert to PIO for this request */ 276 - } 277 - 278 - static int auide_dma_end(ide_drive_t *drive) 279 - { 280 - return 0; 281 - } 282 - 283 - static void auide_dma_start(ide_drive_t *drive ) 284 - { 285 - } 286 - 287 - 288 - static int auide_dma_setup(ide_drive_t *drive, struct ide_cmd *cmd) 289 - { 290 - if (auide_build_dmatable(drive, cmd) == 0) 291 - return 1; 292 - 293 - return 0; 294 - } 295 - 296 - static int auide_dma_test_irq(ide_drive_t *drive) 297 - { 298 - /* If dbdma didn't execute the STOP command yet, the 299 - * active bit is still set 300 - */ 301 - drive->waiting_for_dma++; 302 - if (drive->waiting_for_dma >= DMA_WAIT_TIMEOUT) { 303 - printk(KERN_WARNING "%s: timeout waiting for ddma to complete\n", 304 - drive->name); 305 - return 1; 306 - } 307 - udelay(10); 308 - return 0; 309 - } 310 - 311 - static void auide_dma_host_set(ide_drive_t *drive, int on) 312 - { 313 - } 314 - 315 - static void auide_ddma_tx_callback(int irq, void *param) 316 - { 317 - } 318 - 319 - static void auide_ddma_rx_callback(int irq, void *param) 320 - { 321 - } 322 - #endif /* end CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA */ 323 - 324 - static void auide_init_dbdma_dev(dbdev_tab_t *dev, u32 dev_id, u32 tsize, 325 - u32 devwidth, u32 flags, u32 regbase) 326 - { 327 - dev->dev_id = dev_id; 328 - dev->dev_physaddr = CPHYSADDR(regbase); 329 - dev->dev_intlevel = 0; 330 - dev->dev_intpolarity = 0; 331 - dev->dev_tsize = tsize; 332 - dev->dev_devwidth = devwidth; 333 - dev->dev_flags = flags; 334 - } 335 - 336 - #ifdef CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA 337 - static const struct ide_dma_ops au1xxx_dma_ops = { 338 - .dma_host_set = auide_dma_host_set, 339 - .dma_setup = auide_dma_setup, 340 - .dma_start = auide_dma_start, 341 - .dma_end = auide_dma_end, 342 - .dma_test_irq = auide_dma_test_irq, 343 - .dma_lost_irq = ide_dma_lost_irq, 344 - }; 345 - 346 - static int auide_ddma_init(ide_hwif_t *hwif, const struct ide_port_info *d) 347 - { 348 - _auide_hwif *auide = &auide_hwif; 349 - dbdev_tab_t source_dev_tab, target_dev_tab; 350 - u32 dev_id, tsize, devwidth, flags; 351 - 352 - dev_id = hwif->ddma_id; 353 - 354 - tsize = 8; /* 1 */ 355 - devwidth = 32; /* 16 */ 356 - 357 - #ifdef IDE_AU1XXX_BURSTMODE 358 - flags = DEV_FLAGS_SYNC | DEV_FLAGS_BURSTABLE; 359 - #else 360 - flags = DEV_FLAGS_SYNC; 361 - #endif 362 - 363 - /* setup dev_tab for tx channel */ 364 - auide_init_dbdma_dev(&source_dev_tab, dev_id, tsize, devwidth, 365 - DEV_FLAGS_OUT | flags, auide->regbase); 366 - auide->tx_dev_id = au1xxx_ddma_add_device( &source_dev_tab ); 367 - 368 - auide_init_dbdma_dev(&source_dev_tab, dev_id, tsize, devwidth, 369 - DEV_FLAGS_IN | flags, auide->regbase); 370 - auide->rx_dev_id = au1xxx_ddma_add_device( &source_dev_tab ); 371 - 372 - /* We also need to add a target device for the DMA */ 373 - auide_init_dbdma_dev(&target_dev_tab, (u32)DSCR_CMD0_ALWAYS, tsize, 374 - devwidth, DEV_FLAGS_ANYUSE, auide->regbase); 375 - auide->target_dev_id = au1xxx_ddma_add_device(&target_dev_tab); 376 - 377 - /* Get a channel for TX */ 378 - auide->tx_chan = au1xxx_dbdma_chan_alloc(auide->target_dev_id, 379 - auide->tx_dev_id, 380 - auide_ddma_tx_callback, 381 - (void*)auide); 382 - 383 - /* Get a channel for RX */ 384 - auide->rx_chan = au1xxx_dbdma_chan_alloc(auide->rx_dev_id, 385 - auide->target_dev_id, 386 - auide_ddma_rx_callback, 387 - (void*)auide); 388 - 389 - auide->tx_desc_head = (void*)au1xxx_dbdma_ring_alloc(auide->tx_chan, 390 - NUM_DESCRIPTORS); 391 - auide->rx_desc_head = (void*)au1xxx_dbdma_ring_alloc(auide->rx_chan, 392 - NUM_DESCRIPTORS); 393 - 394 - /* FIXME: check return value */ 395 - (void)ide_allocate_dma_engine(hwif); 396 - 397 - au1xxx_dbdma_start( auide->tx_chan ); 398 - au1xxx_dbdma_start( auide->rx_chan ); 399 - 400 - return 0; 401 - } 402 - #else 403 - static int auide_ddma_init(ide_hwif_t *hwif, const struct ide_port_info *d) 404 - { 405 - _auide_hwif *auide = &auide_hwif; 406 - dbdev_tab_t source_dev_tab; 407 - int flags; 408 - 409 - #ifdef IDE_AU1XXX_BURSTMODE 410 - flags = DEV_FLAGS_SYNC | DEV_FLAGS_BURSTABLE; 411 - #else 412 - flags = DEV_FLAGS_SYNC; 413 - #endif 414 - 415 - /* setup dev_tab for tx channel */ 416 - auide_init_dbdma_dev(&source_dev_tab, (u32)DSCR_CMD0_ALWAYS, 8, 32, 417 - DEV_FLAGS_OUT | flags, auide->regbase); 418 - auide->tx_dev_id = au1xxx_ddma_add_device( &source_dev_tab ); 419 - 420 - auide_init_dbdma_dev(&source_dev_tab, (u32)DSCR_CMD0_ALWAYS, 8, 32, 421 - DEV_FLAGS_IN | flags, auide->regbase); 422 - auide->rx_dev_id = au1xxx_ddma_add_device( &source_dev_tab ); 423 - 424 - /* Get a channel for TX */ 425 - auide->tx_chan = au1xxx_dbdma_chan_alloc(DSCR_CMD0_ALWAYS, 426 - auide->tx_dev_id, 427 - NULL, 428 - (void*)auide); 429 - 430 - /* Get a channel for RX */ 431 - auide->rx_chan = au1xxx_dbdma_chan_alloc(auide->rx_dev_id, 432 - DSCR_CMD0_ALWAYS, 433 - NULL, 434 - (void*)auide); 435 - 436 - auide->tx_desc_head = (void*)au1xxx_dbdma_ring_alloc(auide->tx_chan, 437 - NUM_DESCRIPTORS); 438 - auide->rx_desc_head = (void*)au1xxx_dbdma_ring_alloc(auide->rx_chan, 439 - NUM_DESCRIPTORS); 440 - 441 - au1xxx_dbdma_start( auide->tx_chan ); 442 - au1xxx_dbdma_start( auide->rx_chan ); 443 - 444 - return 0; 445 - } 446 - #endif 447 - 448 - static void auide_setup_ports(struct ide_hw *hw, _auide_hwif *ahwif) 449 - { 450 - int i; 451 - unsigned long *ata_regs = hw->io_ports_array; 452 - 453 - /* FIXME? */ 454 - for (i = 0; i < 8; i++) 455 - *ata_regs++ = ahwif->regbase + (i << IDE_REG_SHIFT); 456 - 457 - /* set the Alternative Status register */ 458 - *ata_regs = ahwif->regbase + (14 << IDE_REG_SHIFT); 459 - } 460 - 461 - #ifdef CONFIG_BLK_DEV_IDE_AU1XXX_PIO_DBDMA 462 - static const struct ide_tp_ops au1xxx_tp_ops = { 463 - .exec_command = ide_exec_command, 464 - .read_status = ide_read_status, 465 - .read_altstatus = ide_read_altstatus, 466 - .write_devctl = ide_write_devctl, 467 - 468 - .dev_select = ide_dev_select, 469 - .tf_load = ide_tf_load, 470 - .tf_read = ide_tf_read, 471 - 472 - .input_data = au1xxx_input_data, 473 - .output_data = au1xxx_output_data, 474 - }; 475 - #endif 476 - 477 - static const struct ide_port_ops au1xxx_port_ops = { 478 - .set_pio_mode = au1xxx_set_pio_mode, 479 - .set_dma_mode = auide_set_dma_mode, 480 - }; 481 - 482 - static const struct ide_port_info au1xxx_port_info = { 483 - .init_dma = auide_ddma_init, 484 - #ifdef CONFIG_BLK_DEV_IDE_AU1XXX_PIO_DBDMA 485 - .tp_ops = &au1xxx_tp_ops, 486 - #endif 487 - .port_ops = &au1xxx_port_ops, 488 - #ifdef CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA 489 - .dma_ops = &au1xxx_dma_ops, 490 - #endif 491 - .host_flags = IDE_HFLAG_POST_SET_MODE | 492 - IDE_HFLAG_NO_IO_32BIT | 493 - IDE_HFLAG_UNMASK_IRQS, 494 - .pio_mask = ATA_PIO4, 495 - #ifdef CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA 496 - .mwdma_mask = ATA_MWDMA2, 497 - #endif 498 - .chipset = ide_au1xxx, 499 - }; 500 - 501 - static int au_ide_probe(struct platform_device *dev) 502 - { 503 - _auide_hwif *ahwif = &auide_hwif; 504 - struct resource *res; 505 - struct ide_host *host; 506 - int ret = 0; 507 - struct ide_hw hw, *hws[] = { &hw }; 508 - 509 - #if defined(CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA) 510 - char *mode = "MWDMA2"; 511 - #elif defined(CONFIG_BLK_DEV_IDE_AU1XXX_PIO_DBDMA) 512 - char *mode = "PIO+DDMA(offload)"; 513 - #endif 514 - 515 - memset(&auide_hwif, 0, sizeof(_auide_hwif)); 516 - ahwif->irq = platform_get_irq(dev, 0); 517 - 518 - res = platform_get_resource(dev, IORESOURCE_MEM, 0); 519 - 520 - if (res == NULL) { 521 - pr_debug("%s %d: no base address\n", DRV_NAME, dev->id); 522 - ret = -ENODEV; 523 - goto out; 524 - } 525 - if (ahwif->irq < 0) { 526 - pr_debug("%s %d: no IRQ\n", DRV_NAME, dev->id); 527 - ret = -ENODEV; 528 - goto out; 529 - } 530 - 531 - if (!request_mem_region(res->start, resource_size(res), dev->name)) { 532 - pr_debug("%s: request_mem_region failed\n", DRV_NAME); 533 - ret = -EBUSY; 534 - goto out; 535 - } 536 - 537 - ahwif->regbase = (u32)ioremap(res->start, resource_size(res)); 538 - if (ahwif->regbase == 0) { 539 - ret = -ENOMEM; 540 - goto out; 541 - } 542 - 543 - res = platform_get_resource(dev, IORESOURCE_DMA, 0); 544 - if (!res) { 545 - pr_debug("%s: no DDMA ID resource\n", DRV_NAME); 546 - ret = -ENODEV; 547 - goto out; 548 - } 549 - ahwif->ddma_id = res->start; 550 - 551 - memset(&hw, 0, sizeof(hw)); 552 - auide_setup_ports(&hw, ahwif); 553 - hw.irq = ahwif->irq; 554 - hw.dev = &dev->dev; 555 - 556 - ret = ide_host_add(&au1xxx_port_info, hws, 1, &host); 557 - if (ret) 558 - goto out; 559 - 560 - auide_hwif.hwif = host->ports[0]; 561 - 562 - platform_set_drvdata(dev, host); 563 - 564 - printk(KERN_INFO "Au1xxx IDE(builtin) configured for %s\n", mode ); 565 - 566 - out: 567 - return ret; 568 - } 569 - 570 - static int au_ide_remove(struct platform_device *dev) 571 - { 572 - struct resource *res; 573 - struct ide_host *host = platform_get_drvdata(dev); 574 - _auide_hwif *ahwif = &auide_hwif; 575 - 576 - ide_host_remove(host); 577 - 578 - iounmap((void *)ahwif->regbase); 579 - 580 - res = platform_get_resource(dev, IORESOURCE_MEM, 0); 581 - release_mem_region(res->start, resource_size(res)); 582 - 583 - return 0; 584 - } 585 - 586 - static struct platform_driver au1200_ide_driver = { 587 - .driver = { 588 - .name = "au1200-ide", 589 - }, 590 - .probe = au_ide_probe, 591 - .remove = au_ide_remove, 592 - }; 593 - 594 - module_platform_driver(au1200_ide_driver); 595 - 596 - MODULE_LICENSE("GPL"); 597 - MODULE_DESCRIPTION("AU1200 IDE driver");
+19
drivers/irqchip/Kconfig
··· 513 513 Say yes here to add support for the IRQ combiner devices embedded 514 514 in Samsung Exynos chips. 515 515 516 + config LOONGSON_LIOINTC 517 + bool "Loongson Local I/O Interrupt Controller" 518 + depends on MACH_LOONGSON64 519 + default y 520 + select IRQ_DOMAIN 521 + select GENERIC_IRQ_CHIP 522 + help 523 + Support for the Loongson Local I/O Interrupt Controller. 524 + 525 + config LOONGSON_HTPIC 526 + bool "Loongson3 HyperTransport PIC Controller" 527 + depends on MACH_LOONGSON64 528 + default y 529 + select IRQ_DOMAIN 530 + select GENERIC_IRQ_CHIP 531 + select I8259 532 + help 533 + Support for the Loongson-3 HyperTransport PIC Controller. 534 + 516 535 endmenu
+2
drivers/irqchip/Makefile
··· 105 105 obj-$(CONFIG_LS1X_IRQ) += irq-ls1x.o 106 106 obj-$(CONFIG_TI_SCI_INTR_IRQCHIP) += irq-ti-sci-intr.o 107 107 obj-$(CONFIG_TI_SCI_INTA_IRQCHIP) += irq-ti-sci-inta.o 108 + obj-$(CONFIG_LOONGSON_LIOINTC) += irq-loongson-liointc.o 109 + obj-$(CONFIG_LOONGSON_HTPIC) += irq-loongson-htpic.o
+149
drivers/irqchip/irq-loongson-htpic.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 2 + /* 3 + * Copyright (C) 2020, Jiaxun Yang <jiaxun.yang@flygoat.com> 4 + * Loongson HTPIC IRQ support 5 + */ 6 + 7 + #include <linux/init.h> 8 + #include <linux/of_address.h> 9 + #include <linux/of_irq.h> 10 + #include <linux/irqchip.h> 11 + #include <linux/irqchip/chained_irq.h> 12 + #include <linux/irq.h> 13 + #include <linux/io.h> 14 + #include <linux/syscore_ops.h> 15 + 16 + #include <asm/i8259.h> 17 + 18 + #define HTPIC_MAX_PARENT_IRQ 4 19 + #define HTINT_NUM_VECTORS 8 20 + #define HTINT_EN_OFF 0x20 21 + 22 + struct loongson_htpic { 23 + void __iomem *base; 24 + struct irq_domain *domain; 25 + }; 26 + 27 + static struct loongson_htpic *htpic; 28 + 29 + static void htpic_irq_dispatch(struct irq_desc *desc) 30 + { 31 + struct loongson_htpic *priv = irq_desc_get_handler_data(desc); 32 + struct irq_chip *chip = irq_desc_get_chip(desc); 33 + uint32_t pending; 34 + 35 + chained_irq_enter(chip, desc); 36 + pending = readl(priv->base); 37 + /* Ack all IRQs at once, otherwise IRQ flood might happen */ 38 + writel(pending, priv->base); 39 + 40 + if (!pending) 41 + spurious_interrupt(); 42 + 43 + while (pending) { 44 + int bit = __ffs(pending); 45 + 46 + if (unlikely(bit > 15)) { 47 + spurious_interrupt(); 48 + break; 49 + } 50 + 51 + generic_handle_irq(irq_linear_revmap(priv->domain, bit)); 52 + pending &= ~BIT(bit); 53 + } 54 + chained_irq_exit(chip, desc); 55 + } 56 + 57 + static void htpic_reg_init(void) 58 + { 59 + int i; 60 + 61 + for (i = 0; i < HTINT_NUM_VECTORS; i++) { 62 + uint32_t val; 63 + 64 + /* Disable all HT Vectors */ 65 + writel(0x0, htpic->base + HTINT_EN_OFF + i * 0x4); 66 + val = readl(htpic->base + i * 0x4); 67 + /* Ack all possible pending IRQs */ 68 + writel(GENMASK(31, 0), htpic->base + i * 0x4); 69 + } 70 + 71 + /* Enable 16 vectors for PIC */ 72 + writel(0xffff, htpic->base + HTINT_EN_OFF); 73 + } 74 + 75 + static void htpic_resume(void) 76 + { 77 + htpic_reg_init(); 78 + } 79 + 80 + struct syscore_ops htpic_syscore_ops = { 81 + .resume = htpic_resume, 82 + }; 83 + 84 + int __init htpic_of_init(struct device_node *node, struct device_node *parent) 85 + { 86 + unsigned int parent_irq[4]; 87 + int i, err; 88 + int num_parents = 0; 89 + 90 + if (htpic) { 91 + pr_err("loongson-htpic: Only one HTPIC is allowed in the system\n"); 92 + return -ENODEV; 93 + } 94 + 95 + htpic = kzalloc(sizeof(*htpic), GFP_KERNEL); 96 + if (!htpic) { 97 + err = -ENOMEM; 98 + goto out_free; 99 + } 100 + 101 + htpic->base = of_iomap(node, 0); 102 + if (!htpic->base) { 103 + err = -ENODEV; 104 + goto out_free; 105 + } 106 + 107 + htpic->domain = __init_i8259_irqs(node); 108 + if (!htpic->domain) { 109 + pr_err("loongson-htpic: Failed to initialize i8259 IRQs\n"); 110 + err = -ENOMEM; 111 + goto out_iounmap; 112 + } 113 + 114 + /* Interrupt may come from any of the 4 interrupt line */ 115 + for (i = 0; i < HTPIC_MAX_PARENT_IRQ; i++) { 116 + parent_irq[i] = irq_of_parse_and_map(node, i); 117 + if (parent_irq[i] <= 0) 118 + break; 119 + 120 + num_parents++; 121 + } 122 + 123 + if (!num_parents) { 124 + pr_err("loongson-htpic: Failed to get parent irqs\n"); 125 + err = -ENODEV; 126 + goto out_remove_domain; 127 + } 128 + 129 + htpic_reg_init(); 130 + 131 + for (i = 0; i < num_parents; i++) { 132 + irq_set_chained_handler_and_data(parent_irq[i], 133 + htpic_irq_dispatch, htpic); 134 + } 135 + 136 + register_syscore_ops(&htpic_syscore_ops); 137 + 138 + return 0; 139 + 140 + out_remove_domain: 141 + irq_domain_remove(htpic->domain); 142 + out_iounmap: 143 + iounmap(htpic->base); 144 + out_free: 145 + kfree(htpic); 146 + return err; 147 + } 148 + 149 + IRQCHIP_DECLARE(loongson_htpic, "loongson,htpic-1.0", htpic_of_init);
+271
drivers/irqchip/irq-loongson-liointc.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 2 + /* 3 + * Copyright (C) 2020, Jiaxun Yang <jiaxun.yang@flygoat.com> 4 + * Loongson Local IO Interrupt Controller support 5 + */ 6 + 7 + #include <linux/errno.h> 8 + #include <linux/init.h> 9 + #include <linux/types.h> 10 + #include <linux/interrupt.h> 11 + #include <linux/ioport.h> 12 + #include <linux/irqchip.h> 13 + #include <linux/of_address.h> 14 + #include <linux/of_irq.h> 15 + #include <linux/io.h> 16 + #include <linux/smp.h> 17 + #include <linux/irqchip/chained_irq.h> 18 + 19 + #include <boot_param.h> 20 + 21 + #define LIOINTC_CHIP_IRQ 32 22 + #define LIOINTC_NUM_PARENT 4 23 + 24 + #define LIOINTC_INTC_CHIP_START 0x20 25 + 26 + #define LIOINTC_REG_INTC_STATUS (LIOINTC_INTC_CHIP_START + 0x20) 27 + #define LIOINTC_REG_INTC_EN_STATUS (LIOINTC_INTC_CHIP_START + 0x04) 28 + #define LIOINTC_REG_INTC_ENABLE (LIOINTC_INTC_CHIP_START + 0x08) 29 + #define LIOINTC_REG_INTC_DISABLE (LIOINTC_INTC_CHIP_START + 0x0c) 30 + #define LIOINTC_REG_INTC_POL (LIOINTC_INTC_CHIP_START + 0x10) 31 + #define LIOINTC_REG_INTC_EDGE (LIOINTC_INTC_CHIP_START + 0x14) 32 + 33 + #define LIOINTC_SHIFT_INTx 4 34 + 35 + #define LIOINTC_ERRATA_IRQ 10 36 + 37 + struct liointc_handler_data { 38 + struct liointc_priv *priv; 39 + u32 parent_int_map; 40 + }; 41 + 42 + struct liointc_priv { 43 + struct irq_chip_generic *gc; 44 + struct liointc_handler_data handler[LIOINTC_NUM_PARENT]; 45 + u8 map_cache[LIOINTC_CHIP_IRQ]; 46 + bool has_lpc_irq_errata; 47 + }; 48 + 49 + static void liointc_chained_handle_irq(struct irq_desc *desc) 50 + { 51 + struct liointc_handler_data *handler = irq_desc_get_handler_data(desc); 52 + struct irq_chip *chip = irq_desc_get_chip(desc); 53 + struct irq_chip_generic *gc = handler->priv->gc; 54 + u32 pending; 55 + 56 + chained_irq_enter(chip, desc); 57 + 58 + pending = readl(gc->reg_base + LIOINTC_REG_INTC_STATUS); 59 + 60 + if (!pending) { 61 + /* Always blame LPC IRQ if we have that bug */ 62 + if (handler->priv->has_lpc_irq_errata && 63 + (handler->parent_int_map & ~gc->mask_cache & 64 + BIT(LIOINTC_ERRATA_IRQ))) 65 + pending = BIT(LIOINTC_ERRATA_IRQ); 66 + else 67 + spurious_interrupt(); 68 + } 69 + 70 + while (pending) { 71 + int bit = __ffs(pending); 72 + 73 + generic_handle_irq(irq_find_mapping(gc->domain, bit)); 74 + pending &= ~BIT(bit); 75 + } 76 + 77 + chained_irq_exit(chip, desc); 78 + } 79 + 80 + static void liointc_set_bit(struct irq_chip_generic *gc, 81 + unsigned int offset, 82 + u32 mask, bool set) 83 + { 84 + if (set) 85 + writel(readl(gc->reg_base + offset) | mask, 86 + gc->reg_base + offset); 87 + else 88 + writel(readl(gc->reg_base + offset) & ~mask, 89 + gc->reg_base + offset); 90 + } 91 + 92 + static int liointc_set_type(struct irq_data *data, unsigned int type) 93 + { 94 + struct irq_chip_generic *gc = irq_data_get_irq_chip_data(data); 95 + u32 mask = data->mask; 96 + unsigned long flags; 97 + 98 + irq_gc_lock_irqsave(gc, flags); 99 + switch (type) { 100 + case IRQ_TYPE_LEVEL_HIGH: 101 + liointc_set_bit(gc, LIOINTC_REG_INTC_EDGE, mask, false); 102 + liointc_set_bit(gc, LIOINTC_REG_INTC_POL, mask, true); 103 + break; 104 + case IRQ_TYPE_LEVEL_LOW: 105 + liointc_set_bit(gc, LIOINTC_REG_INTC_EDGE, mask, false); 106 + liointc_set_bit(gc, LIOINTC_REG_INTC_POL, mask, false); 107 + break; 108 + case IRQ_TYPE_EDGE_RISING: 109 + liointc_set_bit(gc, LIOINTC_REG_INTC_EDGE, mask, true); 110 + liointc_set_bit(gc, LIOINTC_REG_INTC_POL, mask, true); 111 + break; 112 + case IRQ_TYPE_EDGE_FALLING: 113 + liointc_set_bit(gc, LIOINTC_REG_INTC_EDGE, mask, true); 114 + liointc_set_bit(gc, LIOINTC_REG_INTC_POL, mask, false); 115 + break; 116 + default: 117 + return -EINVAL; 118 + } 119 + irq_gc_unlock_irqrestore(gc, flags); 120 + 121 + irqd_set_trigger_type(data, type); 122 + return 0; 123 + } 124 + 125 + static void liointc_resume(struct irq_chip_generic *gc) 126 + { 127 + struct liointc_priv *priv = gc->private; 128 + unsigned long flags; 129 + int i; 130 + 131 + irq_gc_lock_irqsave(gc, flags); 132 + /* Disable all at first */ 133 + writel(0xffffffff, gc->reg_base + LIOINTC_REG_INTC_DISABLE); 134 + /* Revert map cache */ 135 + for (i = 0; i < LIOINTC_CHIP_IRQ; i++) 136 + writeb(priv->map_cache[i], gc->reg_base + i); 137 + /* Revert mask cache */ 138 + writel(~gc->mask_cache, gc->reg_base + LIOINTC_REG_INTC_ENABLE); 139 + irq_gc_unlock_irqrestore(gc, flags); 140 + } 141 + 142 + static const char * const parent_names[] = {"int0", "int1", "int2", "int3"}; 143 + 144 + int __init liointc_of_init(struct device_node *node, 145 + struct device_node *parent) 146 + { 147 + struct irq_chip_generic *gc; 148 + struct irq_domain *domain; 149 + struct irq_chip_type *ct; 150 + struct liointc_priv *priv; 151 + void __iomem *base; 152 + u32 of_parent_int_map[LIOINTC_NUM_PARENT]; 153 + int parent_irq[LIOINTC_NUM_PARENT]; 154 + bool have_parent = FALSE; 155 + int sz, i, err = 0; 156 + 157 + priv = kzalloc(sizeof(*priv), GFP_KERNEL); 158 + if (!priv) 159 + return -ENOMEM; 160 + 161 + base = of_iomap(node, 0); 162 + if (!base) { 163 + err = -ENODEV; 164 + goto out_free_priv; 165 + } 166 + 167 + for (i = 0; i < LIOINTC_NUM_PARENT; i++) { 168 + parent_irq[i] = of_irq_get_byname(node, parent_names[i]); 169 + if (parent_irq[i] > 0) 170 + have_parent = TRUE; 171 + } 172 + if (!have_parent) { 173 + err = -ENODEV; 174 + goto out_iounmap; 175 + } 176 + 177 + sz = of_property_read_variable_u32_array(node, 178 + "loongson,parent_int_map", 179 + &of_parent_int_map[0], 180 + LIOINTC_NUM_PARENT, 181 + LIOINTC_NUM_PARENT); 182 + if (sz < 4) { 183 + pr_err("loongson-liointc: No parent_int_map\n"); 184 + err = -ENODEV; 185 + goto out_iounmap; 186 + } 187 + 188 + for (i = 0; i < LIOINTC_NUM_PARENT; i++) 189 + priv->handler[i].parent_int_map = of_parent_int_map[i]; 190 + 191 + /* Setup IRQ domain */ 192 + domain = irq_domain_add_linear(node, 32, 193 + &irq_generic_chip_ops, priv); 194 + if (!domain) { 195 + pr_err("loongson-liointc: cannot add IRQ domain\n"); 196 + err = -EINVAL; 197 + goto out_iounmap; 198 + } 199 + 200 + err = irq_alloc_domain_generic_chips(domain, 32, 1, 201 + node->full_name, handle_level_irq, 202 + IRQ_NOPROBE, 0, 0); 203 + if (err) { 204 + pr_err("loongson-liointc: unable to register IRQ domain\n"); 205 + goto out_free_domain; 206 + } 207 + 208 + 209 + /* Disable all IRQs */ 210 + writel(0xffffffff, base + LIOINTC_REG_INTC_DISABLE); 211 + /* Set to level triggered */ 212 + writel(0x0, base + LIOINTC_REG_INTC_EDGE); 213 + 214 + /* Generate parent INT part of map cache */ 215 + for (i = 0; i < LIOINTC_NUM_PARENT; i++) { 216 + u32 pending = priv->handler[i].parent_int_map; 217 + 218 + while (pending) { 219 + int bit = __ffs(pending); 220 + 221 + priv->map_cache[bit] = BIT(i) << LIOINTC_SHIFT_INTx; 222 + pending &= ~BIT(bit); 223 + } 224 + } 225 + 226 + for (i = 0; i < LIOINTC_CHIP_IRQ; i++) { 227 + /* Generate core part of map cache */ 228 + priv->map_cache[i] |= BIT(loongson_sysconf.boot_cpu_id); 229 + writeb(priv->map_cache[i], base + i); 230 + } 231 + 232 + gc = irq_get_domain_generic_chip(domain, 0); 233 + gc->private = priv; 234 + gc->reg_base = base; 235 + gc->domain = domain; 236 + gc->resume = liointc_resume; 237 + 238 + ct = gc->chip_types; 239 + ct->regs.enable = LIOINTC_REG_INTC_ENABLE; 240 + ct->regs.disable = LIOINTC_REG_INTC_DISABLE; 241 + ct->chip.irq_unmask = irq_gc_unmask_enable_reg; 242 + ct->chip.irq_mask = irq_gc_mask_disable_reg; 243 + ct->chip.irq_mask_ack = irq_gc_mask_disable_reg; 244 + ct->chip.irq_set_type = liointc_set_type; 245 + 246 + gc->mask_cache = 0xffffffff; 247 + priv->gc = gc; 248 + 249 + for (i = 0; i < LIOINTC_NUM_PARENT; i++) { 250 + if (parent_irq[i] <= 0) 251 + continue; 252 + 253 + priv->handler[i].priv = priv; 254 + irq_set_chained_handler_and_data(parent_irq[i], 255 + liointc_chained_handle_irq, &priv->handler[i]); 256 + } 257 + 258 + return 0; 259 + 260 + out_free_domain: 261 + irq_domain_remove(domain); 262 + out_iounmap: 263 + iounmap(base); 264 + out_free_priv: 265 + kfree(priv); 266 + 267 + return err; 268 + } 269 + 270 + IRQCHIP_DECLARE(loongson_liointc_1_0, "loongson,liointc-1.0", liointc_of_init); 271 + IRQCHIP_DECLARE(loongson_liointc_1_0a, "loongson,liointc-1.0a", liointc_of_init);
+3 -26
drivers/video/fbdev/g364fb.c
··· 108 108 static int g364fb_setcolreg(u_int regno, u_int red, u_int green, 109 109 u_int blue, u_int transp, 110 110 struct fb_info *info); 111 - static int g364fb_cursor(struct fb_info *info, struct fb_cursor *cursor); 112 111 static int g364fb_blank(int blank, struct fb_info *info); 113 112 114 113 static const struct fb_ops g364fb_ops = { ··· 118 119 .fb_fillrect = cfb_fillrect, 119 120 .fb_copyarea = cfb_copyarea, 120 121 .fb_imageblit = cfb_imageblit, 121 - .fb_cursor = g364fb_cursor, 122 122 }; 123 - 124 - int g364fb_cursor(struct fb_info *info, struct fb_cursor *cursor) 125 - { 126 - 127 - switch (cursor->enable) { 128 - case CM_ERASE: 129 - *(unsigned int *) CTLA_REG |= CURS_TOGGLE; 130 - break; 131 - 132 - case CM_MOVE: 133 - case CM_DRAW: 134 - *(unsigned int *) CTLA_REG &= ~CURS_TOGGLE; 135 - *(unsigned int *) CURS_POS_REG = 136 - ((x * fontwidth(p)) << 12) | ((y * fontheight(p)) - 137 - info->var.yoffset); 138 - break; 139 - } 140 - return 0; 141 - } 142 123 143 124 /* 144 125 * Pan or Wrap the Display ··· 173 194 */ 174 195 int __init g364fb_init(void) 175 196 { 176 - volatile unsigned int *pal_ptr = 177 - (volatile unsigned int *) CLR_PAL_REG; 178 197 volatile unsigned int *curs_pal_ptr = 179 198 (volatile unsigned int *) CURS_PAL_REG; 180 - int mem, i, j; 199 + int mem, i; 181 200 182 201 if (fb_get_options("g364fb", NULL)) 183 202 return -ENODEV; ··· 207 230 */ 208 231 *(unsigned short *) (CURS_PAT_REG + 14 * 64) = 0xffff; 209 232 *(unsigned short *) (CURS_PAT_REG + 15 * 64) = 0xffff; 210 - fb_var.xres_virtual = fbvar.xres; 211 - fb_fix.line_length = (xres / 8) * fb_var.bits_per_pixel; 233 + fb_var.xres_virtual = fb_var.xres; 234 + fb_fix.line_length = fb_var.xres_virtual * fb_var.bits_per_pixel / 8; 212 235 fb_fix.smem_start = 0x40000000; /* physical address */ 213 236 /* get size of video memory; this is special for the JAZZ hardware */ 214 237 mem = (r4030_read_reg32(JAZZ_R4030_CONFIG) >> 8) & 3;