[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH qemu v7 2/5] spapr/spapr: Make vty_getchars public
From: |
Alexey Kardashevskiy |
Subject: |
[PATCH qemu v7 2/5] spapr/spapr: Make vty_getchars public |
Date: |
Thu, 20 Feb 2020 17:16:19 +1100 |
A serial device fetches the data from the chardev backend as soon as
input happens and stores it in its internal device specific buffer, every
char device implements it again. Since there is no unified interface to
read such buffer, we will have to read characters directly from
VIO_SPAPR_VTY_DEVICE. The OF client is going to need this.
Signed-off-by: Alexey Kardashevskiy <address@hidden>
---
include/hw/ppc/spapr_vio.h | 1 +
hw/char/spapr_vty.c | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/hw/ppc/spapr_vio.h b/include/hw/ppc/spapr_vio.h
index bed7df60e35c..77e9b73bdfe0 100644
--- a/include/hw/ppc/spapr_vio.h
+++ b/include/hw/ppc/spapr_vio.h
@@ -130,6 +130,7 @@ int spapr_vio_send_crq(SpaprVioDevice *dev, uint8_t *crq);
SpaprVioDevice *vty_lookup(SpaprMachineState *spapr, target_ulong reg);
void vty_putchars(SpaprVioDevice *sdev, uint8_t *buf, int len);
+int vty_getchars(SpaprVioDevice *sdev, uint8_t *buf, int max);
void spapr_vty_create(SpaprVioBus *bus, Chardev *chardev);
void spapr_vlan_create(SpaprVioBus *bus, NICInfo *nd);
void spapr_vscsi_create(SpaprVioBus *bus);
diff --git a/hw/char/spapr_vty.c b/hw/char/spapr_vty.c
index ecb94f5673ca..1c00da75b4f1 100644
--- a/hw/char/spapr_vty.c
+++ b/hw/char/spapr_vty.c
@@ -52,7 +52,7 @@ static void vty_receive(void *opaque, const uint8_t *buf, int
size)
}
}
-static int vty_getchars(SpaprVioDevice *sdev, uint8_t *buf, int max)
+int vty_getchars(SpaprVioDevice *sdev, uint8_t *buf, int max)
{
SpaprVioVty *dev = VIO_SPAPR_VTY_DEVICE(sdev);
int n = 0;
--
2.17.1
- [PATCH qemu v7 0/5] spapr: Kill SLOF, Alexey Kardashevskiy, 2020/02/20
- [PATCH qemu v7 1/5] ppc/spapr: Move GPRs setup to one place, Alexey Kardashevskiy, 2020/02/20
- [PATCH qemu v7 3/5] spapr/cas: Separate CAS handling from rebuilding the FDT, Alexey Kardashevskiy, 2020/02/20
- [PATCH qemu v7 5/5] spapr/vof: Add basic support for MBR/GPT/GRUB, Alexey Kardashevskiy, 2020/02/20
- [PATCH qemu v7 4/5] spapr: Implement Open Firmware client interface, Alexey Kardashevskiy, 2020/02/20
- [PATCH qemu v7 2/5] spapr/spapr: Make vty_getchars public,
Alexey Kardashevskiy <=
- Re: [PATCH qemu v7 0/5] spapr: Kill SLOF, Paolo Bonzini, 2020/02/20
- Re: [PATCH qemu v7 0/5] spapr: Kill SLOF, Alexey Kardashevskiy, 2020/02/20
- Re: [PATCH qemu v7 0/5] spapr: Kill SLOF, Paolo Bonzini, 2020/02/21
- Re: [PATCH qemu v7 0/5] spapr: Kill SLOF, Alexey Kardashevskiy, 2020/02/25
- Re: [PATCH qemu v7 0/5] spapr: Kill SLOF, Paolo Bonzini, 2020/02/26
- Re: [PATCH qemu v7 0/5] spapr: Kill SLOF, Alexey Kardashevskiy, 2020/02/26
- Re: [PATCH qemu v7 0/5] spapr: Kill SLOF, Paolo Bonzini, 2020/02/27