12a05eb9fSJustin Hibbits /*- 22a05eb9fSJustin Hibbits * Copyright (c) 2020 Justin Hibbits 32a05eb9fSJustin Hibbits * 42a05eb9fSJustin Hibbits * Redistribution and use in source and binary forms, with or without 52a05eb9fSJustin Hibbits * modification, are permitted provided that the following conditions 62a05eb9fSJustin Hibbits * are met: 72a05eb9fSJustin Hibbits * 82a05eb9fSJustin Hibbits * 1. Redistributions of source code must retain the above copyright 92a05eb9fSJustin Hibbits * notice, this list of conditions and the following disclaimer. 10*478d3cf5SJustin Hibbits * 2. Redistributions in binary form must reproduce the above copyright 11*478d3cf5SJustin Hibbits * notice, this list of conditions and the following disclaimer in the 122a05eb9fSJustin Hibbits * documentation and/or other materials provided with the distribution. 132a05eb9fSJustin Hibbits * 142a05eb9fSJustin Hibbits * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 152a05eb9fSJustin Hibbits * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 162a05eb9fSJustin Hibbits * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 172a05eb9fSJustin Hibbits * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 182a05eb9fSJustin Hibbits * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 192a05eb9fSJustin Hibbits * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 202a05eb9fSJustin Hibbits * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 212a05eb9fSJustin Hibbits * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 222a05eb9fSJustin Hibbits * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 232a05eb9fSJustin Hibbits * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 242a05eb9fSJustin Hibbits */ 252a05eb9fSJustin Hibbits 262a05eb9fSJustin Hibbits #ifndef AMIGAONE_CPLD_H 272a05eb9fSJustin Hibbits #define AMIGAONE_CPLD_H 282a05eb9fSJustin Hibbits 292a05eb9fSJustin Hibbits #include <sys/ioccom.h> 302a05eb9fSJustin Hibbits 312a05eb9fSJustin Hibbits /* 322a05eb9fSJustin Hibbits * Write 'words' to 'offset' offset in dual-port RAM, then write cmd to mailbox. 332a05eb9fSJustin Hibbits */ 342a05eb9fSJustin Hibbits struct cpld_cmd_data { 352a05eb9fSJustin Hibbits unsigned int cmd; 362a05eb9fSJustin Hibbits unsigned int len; 372a05eb9fSJustin Hibbits unsigned int offset; 382a05eb9fSJustin Hibbits void *words; 392a05eb9fSJustin Hibbits }; 402a05eb9fSJustin Hibbits 412a05eb9fSJustin Hibbits #define IOCCPLDSEND _IOW('c', 2, struct cpld_cmd_data) 422a05eb9fSJustin Hibbits #define IOCCPLDRECV _IOW('c', 3, struct cpld_cmd_data) 432a05eb9fSJustin Hibbits 442a05eb9fSJustin Hibbits #endif /* AMIGAONE_CPLD_H */ 45