All of lore.kernel.org
 help / color / mirror / Atom feed
From: BALATON Zoltan <balaton@eik.bme.hu>
To: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Cc: qemu-devel@nongnu.org, qemu-ppc@nongnu.org
Subject: Re: [PATCH 07/10] hw/ppc/mac.h: Move macio specific atuff out from shared header
Date: Sun, 25 Sep 2022 11:23:46 +0200 (CEST)	[thread overview]
Message-ID: <8f173f3-6e4-a919-36c2-e74340e32046@eik.bme.hu> (raw)
In-Reply-To: <c4b2659e-fece-87c4-dba9-83c90d9b7a8e@ilande.co.uk>

On Sun, 25 Sep 2022, Mark Cave-Ayland wrote:
> On 17/09/2022 00:07, BALATON Zoltan wrote:
> Typo in subject: s/atuff/stuff/
>> Move the parts specific to and only used by macio out from the shared
>> mac.h into macio.c where they better belong.
>> 
>> Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
>> ---
>>   hw/misc/macio/macio.c | 26 ++++++++++++++++++++++++--
>>   hw/ppc/mac.h          | 23 -----------------------
>>   2 files changed, 24 insertions(+), 25 deletions(-)
>> 
>> diff --git a/hw/misc/macio/macio.c b/hw/misc/macio/macio.c
>> index c1fad43f6c..eca5983a4d 100644
>> --- a/hw/misc/macio/macio.c
>> +++ b/hw/misc/macio/macio.c
>> @@ -37,8 +37,30 @@
>>   #include "hw/intc/heathrow_pic.h"
>>   #include "trace.h"
>>   -/* Note: this code is strongly inspirated from the corresponding code
>> - * in PearPC */
>> +#define ESCC_CLOCK 3686400
>> +
>> +/* Old World IRQs */
>> +#define OLDWORLD_CUDA_IRQ      0x12
>> +#define OLDWORLD_ESCCB_IRQ     0x10
>> +#define OLDWORLD_ESCCA_IRQ     0xf
>> +#define OLDWORLD_IDE0_IRQ      0xd
>> +#define OLDWORLD_IDE0_DMA_IRQ  0x2
>> +#define OLDWORLD_IDE1_IRQ      0xe
>> +#define OLDWORLD_IDE1_DMA_IRQ  0x3
>> +
>> +/* New World IRQs */
>> +#define NEWWORLD_CUDA_IRQ      0x19
>> +#define NEWWORLD_PMU_IRQ       0x19
>> +#define NEWWORLD_ESCCB_IRQ     0x24
>> +#define NEWWORLD_ESCCA_IRQ     0x25
>> +#define NEWWORLD_IDE0_IRQ      0xd
>> +#define NEWWORLD_IDE0_DMA_IRQ  0x2
>> +#define NEWWORLD_IDE1_IRQ      0xe
>> +#define NEWWORLD_IDE1_DMA_IRQ  0x3
>> +#define NEWWORLD_EXTING_GPIO1  0x2f
>> +#define NEWWORLD_EXTING_GPIO9  0x37
>> +
>> +/* Note: this code is strongly inspired by the corresponding code in 
>> PearPC */
>
> These IRQ numbers are effectively hardcoded because of the board layout (and 
> at some point some of this wiring may move to the board), so I think macio.h 
> is the best place for these to allow for use in multiple places if needed.

They aren't needed anywhere else currently that's what I've moved them 
here and they could be moved elsewhere when needed but I can put it in the 
header too if you like just don't see the need for that.

Regards,
BALATON Zoltan

>>   /*
>>    * The mac-io has two interfaces to the ESCC. One is called 
>> "escc-legacy",
>> diff --git a/hw/ppc/mac.h b/hw/ppc/mac.h
>> index e97087c7e7..55cb02c990 100644
>> --- a/hw/ppc/mac.h
>> +++ b/hw/ppc/mac.h
>> @@ -35,29 +35,6 @@
>>   #define KERNEL_LOAD_ADDR 0x01000000
>>   #define KERNEL_GAP       0x00100000
>>   -#define ESCC_CLOCK 3686400
>> -
>> -/* Old World IRQs */
>> -#define OLDWORLD_CUDA_IRQ      0x12
>> -#define OLDWORLD_ESCCB_IRQ     0x10
>> -#define OLDWORLD_ESCCA_IRQ     0xf
>> -#define OLDWORLD_IDE0_IRQ      0xd
>> -#define OLDWORLD_IDE0_DMA_IRQ  0x2
>> -#define OLDWORLD_IDE1_IRQ      0xe
>> -#define OLDWORLD_IDE1_DMA_IRQ  0x3
>> -
>> -/* New World IRQs */
>> -#define NEWWORLD_CUDA_IRQ      0x19
>> -#define NEWWORLD_PMU_IRQ       0x19
>> -#define NEWWORLD_ESCCB_IRQ     0x24
>> -#define NEWWORLD_ESCCA_IRQ     0x25
>> -#define NEWWORLD_IDE0_IRQ      0xd
>> -#define NEWWORLD_IDE0_DMA_IRQ  0x2
>> -#define NEWWORLD_IDE1_IRQ      0xe
>> -#define NEWWORLD_IDE1_DMA_IRQ  0x3
>> -#define NEWWORLD_EXTING_GPIO1  0x2f
>> -#define NEWWORLD_EXTING_GPIO9  0x37
>> -
>>   /* Grackle PCI */
>>   #define TYPE_GRACKLE_PCI_HOST_BRIDGE "grackle-pcihost"
>
>
> ATB,
>
> Mark.
>
>


  reply	other threads:[~2022-09-25  9:32 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-16 23:07 [PATCH 00/10] Misc ppc/mac machines clean up BALATON Zoltan
2022-09-16 23:07 ` [PATCH 01/10] mac_newworld: Drop some variables BALATON Zoltan
2022-09-17 21:05   ` Philippe Mathieu-Daudé via
2022-09-25  8:41   ` Mark Cave-Ayland
2022-09-16 23:07 ` [PATCH 02/10] mac_oldworld: Drop some more variables BALATON Zoltan
2022-09-17 21:06   ` Philippe Mathieu-Daudé via
2022-09-25  8:42   ` Mark Cave-Ayland
2022-09-16 23:07 ` [PATCH 03/10] mac_{old|new}world: Set default values for some local variables BALATON Zoltan
2022-09-25  8:48   ` Mark Cave-Ayland
2022-09-25  9:16     ` BALATON Zoltan
2022-09-25  9:41       ` BALATON Zoltan
2022-09-29  7:00       ` Mark Cave-Ayland
2022-10-03 22:08         ` BALATON Zoltan
2022-10-13 21:25           ` Mark Cave-Ayland
2022-09-16 23:07 ` [PATCH 04/10] mac_newworld: Simplify creation of Uninorth devices BALATON Zoltan
2022-09-25  8:57   ` Mark Cave-Ayland
2022-09-25  9:20     ` BALATON Zoltan
2022-09-16 23:07 ` [PATCH 05/10] mac_{old|new}world: Reduce number of QOM casts BALATON Zoltan
2022-09-17 21:13   ` Philippe Mathieu-Daudé via
2022-09-25  9:09   ` Mark Cave-Ayland
2022-09-16 23:07 ` [PATCH 06/10] hw/ppc/mac.h: Move newworld specific atuff out from shared header BALATON Zoltan
2022-09-25  9:13   ` Mark Cave-Ayland
2022-09-16 23:07 ` [PATCH 07/10] hw/ppc/mac.h: Move macio " BALATON Zoltan
2022-09-17 21:16   ` Philippe Mathieu-Daudé via
2022-09-17 21:17   ` Philippe Mathieu-Daudé via
2022-09-25  9:17   ` Mark Cave-Ayland
2022-09-25  9:23     ` BALATON Zoltan [this message]
2022-09-16 23:07 ` [PATCH 08/10] hw/ppc/mac.h: Move grackle-pcihost declaration " BALATON Zoltan
2022-09-25  9:21   ` Mark Cave-Ayland
2022-09-25  9:26     ` BALATON Zoltan
2022-09-29  7:07       ` Mark Cave-Ayland
2022-09-16 23:07 ` [PATCH 09/10] hw/ppc/mac.h: Move PROM and KERNEL defines to board code BALATON Zoltan
2022-09-17 21:15   ` Philippe Mathieu-Daudé via
2022-09-25  9:22   ` Mark Cave-Ayland
2022-09-16 23:07 ` [PATCH 10/10] hw/ppc/mac.h: Rename to include/hw/nvram/mac_nvram.h BALATON Zoltan
2022-09-25  9:23   ` Mark Cave-Ayland
2022-09-24 13:09 ` [PATCH 00/10] Misc ppc/mac machines clean up BALATON Zoltan
2022-09-24 16:20   ` Mark Cave-Ayland

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8f173f3-6e4-a919-36c2-e74340e32046@eik.bme.hu \
    --to=balaton@eik.bme.hu \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.