]>
git.proxmox.com Git - mirror_qemu.git/blob - include/hw/misc/grlib_ahb_apb_pnp.h
4 * Copyright (C) 2019 AdaCore
7 * Frederic Konrad <frederic.konrad@adacore.com>
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation, either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License along
20 * with this program; if not, see <http://www.gnu.org/licenses/>.
24 #ifndef GRLIB_AHB_APB_PNP_H
25 #define GRLIB_AHB_APB_PNP_H
26 #include "qom/object.h"
28 #define TYPE_GRLIB_AHB_PNP "grlib,ahbpnp"
29 typedef struct AHBPnp AHBPnp
;
30 #define GRLIB_AHB_PNP(obj) \
31 OBJECT_CHECK(AHBPnp, (obj), TYPE_GRLIB_AHB_PNP)
33 #define TYPE_GRLIB_APB_PNP "grlib,apbpnp"
34 typedef struct APBPnp APBPnp
;
35 #define GRLIB_APB_PNP(obj) \
36 OBJECT_CHECK(APBPnp, (obj), TYPE_GRLIB_APB_PNP)
38 void grlib_ahb_pnp_add_entry(AHBPnp
*dev
, uint32_t address
, uint32_t mask
,
39 uint8_t vendor
, uint16_t device
, int slave
,
41 void grlib_apb_pnp_add_entry(APBPnp
*dev
, uint32_t address
, uint32_t mask
,
42 uint8_t vendor
, uint16_t device
, uint8_t version
,
43 uint8_t irq
, int type
);
46 #define GRLIB_VENDOR_GAISLER (0x01)
48 #define GRLIB_LEON3_DEV (0x03)
49 #define GRLIB_APBMST_DEV (0x06)
50 #define GRLIB_APBUART_DEV (0x0C)
51 #define GRLIB_IRQMP_DEV (0x0D)
52 #define GRLIB_GPTIMER_DEV (0x11)
54 #define GRLIB_CPU_AREA (0x00)
55 #define GRLIB_APBIO_AREA (0x01)
56 #define GRLIB_AHBMEM_AREA (0x02)
58 #define GRLIB_AHB_MASTER (0x00)
59 #define GRLIB_AHB_SLAVE (0x01)
61 #endif /* GRLIB_AHB_APB_PNP_H */