[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v6 16/25] ppc440_uc.c: Move some macros to ppc4xx.h
From: |
BALATON Zoltan |
Subject: |
[PATCH v6 16/25] ppc440_uc.c: Move some macros to ppc4xx.h |
Date: |
Sat, 24 Sep 2022 14:28:06 +0200 (CEST) |
These are used by both the SDRAM controller model and system DCRs. In
preparation to move SDRAM controller in its own file move these macros
to the ppc4xx.h header.
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
---
hw/ppc/ppc440_uc.c | 4 ----
include/hw/ppc/ppc4xx.h | 4 ++++
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/hw/ppc/ppc440_uc.c b/hw/ppc/ppc440_uc.c
index 46daecab19..0a41274d63 100644
--- a/hw/ppc/ppc440_uc.c
+++ b/hw/ppc/ppc440_uc.c
@@ -380,10 +380,6 @@ enum {
PESDR1_RSTSTA = 0x365,
};
-#define SDR0_DDR0_DDRM_ENCODE(n) ((((unsigned long)(n)) & 0x03) << 29)
-#define SDR0_DDR0_DDRM_DDR1 0x20000000
-#define SDR0_DDR0_DDRM_DDR2 0x40000000
-
static uint32_t dcr_read_sdr(void *opaque, int dcrn)
{
ppc4xx_sdr_t *sdr = opaque;
diff --git a/include/hw/ppc/ppc4xx.h b/include/hw/ppc/ppc4xx.h
index ff88385ac0..10c6dd535f 100644
--- a/include/hw/ppc/ppc4xx.h
+++ b/include/hw/ppc/ppc4xx.h
@@ -111,6 +111,10 @@ struct Ppc4xxEbcState {
};
/* SDRAM DDR controller */
+#define SDR0_DDR0_DDRM_ENCODE(n) ((((unsigned long)(n)) & 0x03) << 29)
+#define SDR0_DDR0_DDRM_DDR1 0x20000000
+#define SDR0_DDR0_DDRM_DDR2 0x40000000
+
#define TYPE_PPC4xx_SDRAM_DDR "ppc4xx-sdram-ddr"
OBJECT_DECLARE_SIMPLE_TYPE(Ppc4xxSdramDdrState, PPC4xx_SDRAM_DDR);
struct Ppc4xxSdramDdrState {
--
2.30.4
- [PATCH v6 04/25] ppc4xx: Use Ppc4xxSdramBank in ppc4xx_sdram_banks(), (continued)
- [PATCH v6 04/25] ppc4xx: Use Ppc4xxSdramBank in ppc4xx_sdram_banks(), BALATON Zoltan, 2022/09/24
- [PATCH v6 02/25] ppc4xx: Introduce Ppc4xxSdramBank struct, BALATON Zoltan, 2022/09/24
- [PATCH v6 07/25] ppc4xx_sdram: QOM'ify, BALATON Zoltan, 2022/09/24
- [PATCH v6 14/25] ppc440_sdram: Move RAM size check to ppc440_sdram_init, BALATON Zoltan, 2022/09/24
- [PATCH v6 11/25] ppc440_sdram: Get rid of the init RAM hack, BALATON Zoltan, 2022/09/24
- [PATCH v6 10/25] ppc440_sdram: Implement enable bit in the DDR2 SDRAM controller, BALATON Zoltan, 2022/09/24
- [PATCH v6 09/25] ppc440_sdram: Split off map/unmap of sdram banks for later reuse, BALATON Zoltan, 2022/09/24
- [PATCH v6 16/25] ppc440_uc.c: Move some macros to ppc4xx.h,
BALATON Zoltan <=
- [PATCH v6 17/25] ppc440_uc.c: Remove unneeded parenthesis, BALATON Zoltan, 2022/09/24
- [PATCH v6 15/25] ppc440_sdram: QOM'ify, BALATON Zoltan, 2022/09/24
- [PATCH v6 22/25] ppc4xx_sdram: Rename local state variable for brevity, BALATON Zoltan, 2022/09/24
- [PATCH v6 12/25] ppc440_sdram: Rename local variable for readability, BALATON Zoltan, 2022/09/24
- [PATCH v6 19/25] ppc4xx_devs.c: Move DDR SDRAM controller model to ppc4xx_sdram.c, BALATON Zoltan, 2022/09/24
- [PATCH v6 13/25] ppc4xx_sdram: Rename functions to prevent name clashes, BALATON Zoltan, 2022/09/24
- [PATCH v6 18/25] ppc440_uc.c: Move DDR2 SDRAM controller model to ppc4xx_sdram.c, BALATON Zoltan, 2022/09/24
- [PATCH v6 20/25] ppc4xx_sdram: Move ppc4xx_sdram_banks() to ppc4xx_sdram.c, BALATON Zoltan, 2022/09/24