1/* $NetBSD: pl061reg.h,v 1.1 2018/06/15 19:52:01 jakllsch Exp $ */ 2 3/* 4 * Copyright (c) 2018 Jonathan A. Kollasch 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions 9 * are met: 10 * 1. Redistributions of source code must retain the above copyright 11 * notice, this list of conditions and the following disclaimer. 12 * 2. Redistributions in binary form must reproduce the above copyright 13 * notice, this list of conditions and the following disclaimer in the 14 * documentation and/or other materials provided with the distribution. 15 * 16 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 17 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 18 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 19 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 20 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 21 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 22 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 23 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 25 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 26 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 */ 28 29#ifndef _IC_PL061REG_H 30#define _IC_PL061REG_H 31 32#define PL061_GPIODATA_REG(m) (0x000 + (m) * 4) 33#define PL061_GPIODIR_REG 0x400 34#define PL061_GPIOIS_REG 0x404 35#define PL061_GPIOIBE_REG 0x408 36#define PL061_GPIOIEV_REG 0x40c 37#define PL061_GPIOIE_REG 0x410 38#define PL061_GPIORIS_REG 0x414 39#define PL061_GPIOMIS_REG 0x418 40#define PL061_GPIOIC_REG 0x41c 41#define PL061_GPIOAFSEL_REG 0x420 42#define PL061_GPIOPeriphID(n) (0xfe0 + (n) * 4) 43#define PL061_GPIOCellID(n) (0xff0 + (n) * 4) 44 45#endif /* _IC_PL061REG_H */ 46