riscv_aplic.c (c13b8e9973635f34f3ce4356af27a311c993729c) | riscv_aplic.c (9323e79f10e5f5d8fffc3b307776173ca11faeae) |
---|---|
1/* 2 * RISC-V APLIC (Advanced Platform Level Interrupt Controller) 3 * 4 * Copyright (c) 2021 Western Digital Corporation or its affiliates. 5 * 6 * This program is free software; you can redistribute it and/or modify it 7 * under the terms and conditions of the GNU General Public License, 8 * version 2 or later, as published by the Free Software Foundation. --- 632 unchanged lines hidden (view full) --- 641 uint32_t irq, word, idc = UINT32_MAX; 642 643 /* Writes must be 4 byte words */ 644 if ((addr & 0x3) != 0) { 645 goto err; 646 } 647 648 if (addr == APLIC_DOMAINCFG) { | 1/* 2 * RISC-V APLIC (Advanced Platform Level Interrupt Controller) 3 * 4 * Copyright (c) 2021 Western Digital Corporation or its affiliates. 5 * 6 * This program is free software; you can redistribute it and/or modify it 7 * under the terms and conditions of the GNU General Public License, 8 * version 2 or later, as published by the Free Software Foundation. --- 632 unchanged lines hidden (view full) --- 641 uint32_t irq, word, idc = UINT32_MAX; 642 643 /* Writes must be 4 byte words */ 644 if ((addr & 0x3) != 0) { 645 goto err; 646 } 647 648 if (addr == APLIC_DOMAINCFG) { |
649 /* Only IE bit writeable at the moment */ | 649 /* Only IE bit writable at the moment */ |
650 value &= APLIC_DOMAINCFG_IE; 651 aplic->domaincfg = value; 652 } else if ((APLIC_SOURCECFG_BASE <= addr) && 653 (addr < (APLIC_SOURCECFG_BASE + (aplic->num_irqs - 1) * 4))) { 654 irq = ((addr - APLIC_SOURCECFG_BASE) >> 2) + 1; 655 if (!aplic->num_children && (value & APLIC_SOURCECFG_D)) { 656 value = 0; 657 } --- 321 unchanged lines hidden --- | 650 value &= APLIC_DOMAINCFG_IE; 651 aplic->domaincfg = value; 652 } else if ((APLIC_SOURCECFG_BASE <= addr) && 653 (addr < (APLIC_SOURCECFG_BASE + (aplic->num_irqs - 1) * 4))) { 654 irq = ((addr - APLIC_SOURCECFG_BASE) >> 2) + 1; 655 if (!aplic->num_children && (value & APLIC_SOURCECFG_D)) { 656 value = 0; 657 } --- 321 unchanged lines hidden --- |