[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 09/12] acpi: move aml builder code for parallel device
From: |
Paolo Bonzini |
Subject: |
Re: [PATCH v2 09/12] acpi: move aml builder code for parallel device |
Date: |
Mon, 6 Apr 2020 13:39:34 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 |
On 06/04/20 12:26, Gerd Hoffmann wrote:
> - if (isa->iobase != 0x0378) {
> + for (i = 0; i < ARRAY_SIZE(isa_parallel_io); i++) {
> + if (isa->iobase == isa_parallel_io[i]) {
> + uid = i + 1;
> + }
> + }
> + if (!uid) {
> return;
> }
>
> @@ -583,8 +589,9 @@ static void parallel_isa_build_aml(ISADevice *isadev, Aml
> *scope)
> aml_append(crs, aml_io(AML_DECODE16, 0x0378, 0x0378, 0x08, 0x08));
FWIW this should be replaced with iso->iobase if you want to support
multiple parallel ports (we probably should since the patch has been
written already :)).
Paolo
> aml_append(crs, aml_irq_no_flags(7));
>
> - dev = aml_device("LPT");
> + dev = aml_device("LPT%d", uid);
> aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0400")));
> + aml_append(dev, aml_name_decl("_UID", aml_int(uid)));
> aml_append(dev, aml_name_decl("_STA", aml_int(0xf)));
> aml_append(dev, aml_name_decl("_CRS", crs));
>
- Re: [PATCH v2 07/12] acpi: move aml builder code for rtc device, (continued)
[PATCH v2 08/12] acpi: move aml builder code for serial device, Gerd Hoffmann, 2020/04/03
[PATCH v2 05/12] acpi: parallel: don't use _STA method, Gerd Hoffmann, 2020/04/03
[PATCH v2 09/12] acpi: move aml builder code for parallel device, Gerd Hoffmann, 2020/04/03
[PATCH v2 10/12] acpi: move aml builder code for floppy device, Gerd Hoffmann, 2020/04/03
[PATCH v2 11/12] acpi: move aml builder code for i8042 (kbd+mouse) device, Gerd Hoffmann, 2020/04/03
Re: [PATCH v2 00/12] acpi: i386 tweaks, no-reply, 2020/04/03
Re: [PATCH v2 00/12] acpi: i386 tweaks, no-reply, 2020/04/03