Merge remote-tracking branch 'remotes/palmer/tags/riscv-for-master-4.1-sf1-v3' into...
[qemu/ar7.git] / include / hw / misc / cbus.h
blobc899943e035b8c6e404cfa87365797ff4f330335
1 /*
2 * CBUS three-pin bus and the Retu / Betty / Tahvo / Vilma / Avilma /
3 * Hinku / Vinku / Ahne / Pihi chips used in various Nokia platforms.
4 * Based on reverse-engineering of a linux driver.
6 * Copyright (C) 2008 Nokia Corporation
7 * Written by Andrzej Zaborowski
9 * This work is licensed under the terms of the GNU GPL, version 2 or later.
10 * See the COPYING file in the top-level directory.
13 #ifndef HW_MISC_CBUS_H
14 #define HW_MISC_CBUS_H
16 #include "hw/irq.h"
18 typedef struct {
19 qemu_irq clk;
20 qemu_irq dat;
21 qemu_irq sel;
22 } CBus;
24 CBus *cbus_init(qemu_irq dat_out);
25 void cbus_attach(CBus *bus, void *slave_opaque);
27 void *retu_init(qemu_irq irq, int vilma);
28 void *tahvo_init(qemu_irq irq, int betty);
30 void retu_key_event(void *retu, int state);
32 #endif