6106e64aac
This commit moves the headers residing in `repos/base/include/spec/*/drivers` to `repos/base/include/drivers/defs` or repos/base/include/drivers/uart` respectively. The first one contains definitions about board-specific MMIO iand RAM addresses, or IRQ lines. While the latter contains device driver code for UART devices. Those definitions are used by driver implementations in `repos/base-hw`, `repos/os`, and `repos/dde-linux`, which now need to include them more explicitely. This work is a step in the direction of reducing 'SPEC' identifiers overall. Ref #2403
30 lines
754 B
C++
30 lines
754 B
C++
/*
|
|
* \brief Freescale's TrustZone aware interrupt controller
|
|
* \author Stefan Kalkowski
|
|
* \date 2012-10-24
|
|
*/
|
|
|
|
/*
|
|
* Copyright (C) 2012-2013 Genode Labs GmbH
|
|
*
|
|
* This file is part of the Genode OS framework, which is distributed
|
|
* under the terms of the GNU Affero General Public License version 3.
|
|
*/
|
|
|
|
#include <board.h>
|
|
|
|
Hw::Pic::Pic() : Genode::Mmio(Board::IRQ_CONTROLLER_BASE)
|
|
{
|
|
for (unsigned i = 0; i < NR_OF_IRQ; i++) {
|
|
write<Intsec::Nonsecure>(!Board::secure_irq(i), i);
|
|
if (!Board::secure_irq(i)) write<Priority>(0x80, i);
|
|
write<Enclear::Clear_enable>(1, i);
|
|
}
|
|
write<Priomask::Mask>(0xff);
|
|
Intctrl::access_t v = 0;
|
|
Intctrl::Enable::set(v, 1);
|
|
Intctrl::Nsen::set(v, 1);
|
|
Intctrl::Nsen_mask::set(v, 1);
|
|
write<Intctrl>(v);
|
|
}
|