1248557Sray/*- 2248557Sray * Copyright (C) 2008-2011 MARVELL INTERNATIONAL LTD. 3250357Sray * Copyright (c) 2012, 2013 The FreeBSD Foundation 4248557Sray * All rights reserved. 5248557Sray * 6248557Sray * Developed by Semihalf. 7248557Sray * 8248557Sray * Portions of this software were developed by Oleksandr Rybalko 9248557Sray * under sponsorship from the FreeBSD Foundation. 10248557Sray * 11248557Sray * Redistribution and use in source and binary forms, with or without 12248557Sray * modification, are permitted provided that the following conditions 13248557Sray * are met: 14248557Sray * 1. Redistributions of source code must retain the above copyright 15248557Sray * notice, this list of conditions and the following disclaimer. 16248557Sray * 2. Redistributions in binary form must reproduce the above copyright 17248557Sray * notice, this list of conditions and the following disclaimer in the 18248557Sray * documentation and/or other materials provided with the distribution. 19248557Sray * 3. Neither the name of MARVELL nor the names of contributors 20248557Sray * may be used to endorse or promote products derived from this software 21248557Sray * without specific prior written permission. 22248557Sray * 23248557Sray * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND 24248557Sray * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 25248557Sray * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 26248557Sray * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE 27248557Sray * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 28248557Sray * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 29248557Sray * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30248557Sray * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31248557Sray * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32248557Sray * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33248557Sray * SUCH DAMAGE. 34248557Sray */ 35248557Sray 36248557Sray#include <sys/cdefs.h> 37248557Sray__FBSDID("$FreeBSD: stable/11/sys/arm/freescale/imx/imx_common.c 314506 2017-03-01 19:55:04Z ian $"); 38248557Sray 39248557Sray#include <sys/param.h> 40248557Sray#include <sys/systm.h> 41248557Sray#include <sys/bus.h> 42248557Sray#include <sys/kernel.h> 43248557Sray#include <sys/malloc.h> 44248557Sray#include <sys/kdb.h> 45248557Sray#include <sys/reboot.h> 46248557Sray 47248557Sray#include <dev/fdt/fdt_common.h> 48248557Sray#include <dev/ofw/openfirm.h> 49248557Sray 50248557Sray#include <machine/bus.h> 51248557Sray#include <machine/vmparam.h> 52248557Sray 53298068Sandrew#ifndef INTRNG 54248557Sraystatic int 55248557Srayfdt_intc_decode_ic(phandle_t node, pcell_t *intr, int *interrupt, int *trig, 56248557Sray int *pol) 57248557Sray{ 58248557Sray 59248557Sray *interrupt = fdt32_to_cpu(intr[0]); 60248557Sray *trig = INTR_TRIGGER_CONFORM; 61248557Sray *pol = INTR_POLARITY_CONFORM; 62248557Sray 63248557Sray return (0); 64248557Sray} 65248557Sray 66248557Srayfdt_pic_decode_t fdt_pic_table[] = { 67248557Sray &fdt_intc_decode_ic, 68248557Sray NULL 69248557Sray}; 70298068Sandrew#endif /* INTRNG */ 71