cd3a5852d6
This commit enables compile-time warnings displayed whenever a deprecated API header is included, and adjusts the existing #include directives accordingly. Issue #1987
49 lines
1.3 KiB
C
49 lines
1.3 KiB
C
/*
|
|
* \brief Gpio driver for the i.MX53
|
|
* \author Nikolay Golikov <nik@ksyslabs.org>
|
|
* \author Stefan Kalkowski <stefan.kalkowski@genode-labs.com>
|
|
* \date 2012-12-06
|
|
*/
|
|
|
|
/*
|
|
* Copyright (C) 2012 Ksys Labs LLC
|
|
* 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 General Public License version 2.
|
|
*/
|
|
|
|
#ifndef _DRIVERS__GPIO__SPEC__IMX53__GPIO_H_
|
|
#define _DRIVERS__GPIO__SPEC__IMX53__GPIO_H_
|
|
|
|
/* Genode includes */
|
|
#include <base/attached_io_mem_dataspace.h>
|
|
#include <util/mmio.h>
|
|
|
|
struct Gpio_reg : Genode::Attached_io_mem_dataspace, Genode::Mmio
|
|
{
|
|
Gpio_reg(Genode::addr_t const mmio_base,
|
|
Genode::size_t const mmio_size)
|
|
: Genode::Attached_io_mem_dataspace(mmio_base, mmio_size),
|
|
Genode::Mmio((Genode::addr_t)local_addr<void>()) { }
|
|
|
|
struct Data : Register_array<0x0, 32, 32, 1> {};
|
|
struct Dir : Register_array<0x4, 32, 32, 1> {};
|
|
struct Pad_stat : Register_array<0x8, 32, 32, 1> {};
|
|
struct Int_conf : Register_array<0xc, 32, 32, 2>
|
|
{
|
|
enum {
|
|
LOW_LEVEL,
|
|
HIGH_LEVEL,
|
|
RIS_EDGE,
|
|
FAL_EDGE
|
|
};
|
|
};
|
|
|
|
struct Int_mask : Register_array<0x14, 32, 32, 1> {};
|
|
struct Int_stat : Register_array<0x18, 32, 32, 1> {};
|
|
struct Edge_sel : Register_array<0x1c, 32, 32, 1> {};
|
|
};
|
|
|
|
#endif /* _DRIVERS__GPIO__SPEC__IMX53__GPIO_H_ */
|