Blame SOURCES/kvm-ppc405_boards-Delete-stale-disabled-DEBUG_BOARD_INIT.patch

383d26
From 9844bbde0f1586645b1d8b148452270984ae85e5 Mon Sep 17 00:00:00 2001
383d26
From: Markus Armbruster <armbru@redhat.com>
383d26
Date: Fri, 17 May 2019 06:50:58 +0200
383d26
Subject: [PATCH 31/53] ppc405_boards: Delete stale, disabled DEBUG_BOARD_INIT
383d26
 code
383d26
MIME-Version: 1.0
383d26
Content-Type: text/plain; charset=UTF-8
383d26
Content-Transfer-Encoding: 8bit
383d26
383d26
RH-Author: Markus Armbruster <armbru@redhat.com>
383d26
Message-id: <20190517065120.12028-10-armbru@redhat.com>
383d26
Patchwork-id: 88005
383d26
O-Subject: [RHEL-7.7 qemu-kvm-rhev PATCH v3 09/31] ppc405_boards: Delete stale, disabled DEBUG_BOARD_INIT code
383d26
Bugzilla: 1624009
383d26
RH-Acked-by: Philippe Mathieu-Daudé <philmd@redhat.com>
383d26
RH-Acked-by: Thomas Huth <thuth@redhat.com>
383d26
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
383d26
383d26
The disabled DEBUG_BOARD_INIT code goes back to the initial commit
383d26
1a6c0886203, and has since seen only mechanical updates.  It sure
383d26
feels like useless clutter now.  Delete it.
383d26
383d26
Suggested-by: Alex Bennée <alex.bennee@linaro.org>
383d26
Signed-off-by: Markus Armbruster <armbru@redhat.com>
383d26
Message-Id: <20190308094610.21210-8-armbru@redhat.com>
383d26
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
383d26
(cherry picked from commit 886db7c55c72246e3810628d735f5e25eceb8c45)
383d26
[Trivial conflict in hw/ppc/ppc405_boards.c due to lack of
383d26
commit ab3dd749241]
383d26
383d26
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
383d26
---
383d26
 hw/ppc/ppc405_boards.c | 62 +-------------------------------------------------
383d26
 1 file changed, 1 insertion(+), 61 deletions(-)
383d26
383d26
diff --git a/hw/ppc/ppc405_boards.c b/hw/ppc/ppc405_boards.c
383d26
index 0b65893..2c23e8b 100644
383d26
--- a/hw/ppc/ppc405_boards.c
383d26
+++ b/hw/ppc/ppc405_boards.c
383d26
@@ -48,8 +48,6 @@
383d26
 
383d26
 #define USE_FLASH_BIOS
383d26
 
383d26
-//#define DEBUG_BOARD_INIT
383d26
-
383d26
 /*****************************************************************************/
383d26
 /* PPC405EP reference board (IBM) */
383d26
 /* Standalone board with:
383d26
@@ -217,10 +215,7 @@ static void ref405ep_init(MachineState *machine)
383d26
     memory_region_init(&ram_memories[1], NULL, "ef405ep.ram1", 0);
383d26
     ram_bases[1] = 0x00000000;
383d26
     ram_sizes[1] = 0x00000000;
383d26
-    ram_size = 128 * 1024 * 1024;
383d26
-#ifdef DEBUG_BOARD_INIT
383d26
-    printf("%s: register cpu\n", __func__);
383d26
-#endif
383d26
+    ram_size = 128 * MiB;
383d26
     env = ppc405ep_init(sysmem, ram_memories, ram_bases, ram_sizes,
383d26
                         33333333, &pic, kernel_filename == NULL ? 0 : 1);
383d26
     /* allocate SRAM */
383d26
@@ -229,9 +224,6 @@ static void ref405ep_init(MachineState *machine)
383d26
                            &error_fatal);
383d26
     memory_region_add_subregion(sysmem, 0xFFF00000, sram);
383d26
     /* allocate and load BIOS */
383d26
-#ifdef DEBUG_BOARD_INIT
383d26
-    printf("%s: register BIOS\n", __func__);
383d26
-#endif
383d26
     fl_idx = 0;
383d26
 #ifdef USE_FLASH_BIOS
383d26
     dinfo = drive_get(IF_PFLASH, 0, fl_idx);
383d26
@@ -240,12 +232,6 @@ static void ref405ep_init(MachineState *machine)
383d26
 
383d26
         bios_size = blk_getlength(blk);
383d26
         fl_sectors = (bios_size + 65535) >> 16;
383d26
-#ifdef DEBUG_BOARD_INIT
383d26
-        printf("Register parallel flash %d size %lx"
383d26
-               " at addr %lx '%s' %d\n",
383d26
-               fl_idx, bios_size, -bios_size,
383d26
-               blk_name(blk), fl_sectors);
383d26
-#endif
383d26
         pflash_cfi02_register((uint32_t)(-bios_size),
383d26
                               NULL, "ef405ep.bios", bios_size,
383d26
                               blk, 65536, fl_sectors, 1,
383d26
@@ -255,9 +241,6 @@ static void ref405ep_init(MachineState *machine)
383d26
     } else
383d26
 #endif
383d26
     {
383d26
-#ifdef DEBUG_BOARD_INIT
383d26
-        printf("Load BIOS from file\n");
383d26
-#endif
383d26
         bios = g_new(MemoryRegion, 1);
383d26
         memory_region_init_ram(bios, NULL, "ef405ep.bios", BIOS_SIZE,
383d26
                                &error_fatal);
383d26
@@ -284,21 +267,12 @@ static void ref405ep_init(MachineState *machine)
383d26
         memory_region_set_readonly(bios, true);
383d26
     }
383d26
     /* Register FPGA */
383d26
-#ifdef DEBUG_BOARD_INIT
383d26
-    printf("%s: register FPGA\n", __func__);
383d26
-#endif
383d26
     ref405ep_fpga_init(sysmem, 0xF0300000);
383d26
     /* Register NVRAM */
383d26
-#ifdef DEBUG_BOARD_INIT
383d26
-    printf("%s: register NVRAM\n", __func__);
383d26
-#endif
383d26
     m48t59_init(NULL, 0xF0000000, 0, 8192, 1968, 8);
383d26
     /* Load kernel */
383d26
     linux_boot = (kernel_filename != NULL);
383d26
     if (linux_boot) {
383d26
-#ifdef DEBUG_BOARD_INIT
383d26
-        printf("%s: load kernel\n", __func__);
383d26
-#endif
383d26
         memset(&bd, 0, sizeof(bd));
383d26
         bd.bi_memstart = 0x00000000;
383d26
         bd.bi_memsize = ram_size;
383d26
@@ -370,10 +344,6 @@ static void ref405ep_init(MachineState *machine)
383d26
         initrd_size = 0;
383d26
         bdloc = 0;
383d26
     }
383d26
-#ifdef DEBUG_BOARD_INIT
383d26
-    printf("bdloc " RAM_ADDR_FMT "\n", bdloc);
383d26
-    printf("%s: Done\n", __func__);
383d26
-#endif
383d26
 }
383d26
 
383d26
 static void ref405ep_class_init(ObjectClass *oc, void *data)
383d26
@@ -525,15 +495,9 @@ static void taihu_405ep_init(MachineState *machine)
383d26
     memory_region_init_alias(&ram_memories[1], NULL,
383d26
                              "taihu_405ep.ram-1", ram, ram_bases[1],
383d26
                              ram_sizes[1]);
383d26
-#ifdef DEBUG_BOARD_INIT
383d26
-    printf("%s: register cpu\n", __func__);
383d26
-#endif
383d26
     ppc405ep_init(sysmem, ram_memories, ram_bases, ram_sizes,
383d26
                   33333333, &pic, kernel_filename == NULL ? 0 : 1);
383d26
     /* allocate and load BIOS */
383d26
-#ifdef DEBUG_BOARD_INIT
383d26
-    printf("%s: register BIOS\n", __func__);
383d26
-#endif
383d26
     fl_idx = 0;
383d26
 #if defined(USE_FLASH_BIOS)
383d26
     dinfo = drive_get(IF_PFLASH, 0, fl_idx);
383d26
@@ -544,12 +508,6 @@ static void taihu_405ep_init(MachineState *machine)
383d26
         /* XXX: should check that size is 2MB */
383d26
         //        bios_size = 2 * 1024 * 1024;
383d26
         fl_sectors = (bios_size + 65535) >> 16;
383d26
-#ifdef DEBUG_BOARD_INIT
383d26
-        printf("Register parallel flash %d size %lx"
383d26
-               " at addr %lx '%s' %d\n",
383d26
-               fl_idx, bios_size, -bios_size,
383d26
-               blk_name(blk), fl_sectors);
383d26
-#endif
383d26
         pflash_cfi02_register((uint32_t)(-bios_size),
383d26
                               NULL, "taihu_405ep.bios", bios_size,
383d26
                               blk, 65536, fl_sectors, 1,
383d26
@@ -559,9 +517,6 @@ static void taihu_405ep_init(MachineState *machine)
383d26
     } else
383d26
 #endif
383d26
     {
383d26
-#ifdef DEBUG_BOARD_INIT
383d26
-        printf("Load BIOS from file\n");
383d26
-#endif
383d26
         if (bios_name == NULL)
383d26
             bios_name = BIOS_FILENAME;
383d26
         bios = g_new(MemoryRegion, 1);
383d26
@@ -592,12 +547,6 @@ static void taihu_405ep_init(MachineState *machine)
383d26
         /* XXX: should check that size is 32MB */
383d26
         bios_size = 32 * 1024 * 1024;
383d26
         fl_sectors = (bios_size + 65535) >> 16;
383d26
-#ifdef DEBUG_BOARD_INIT
383d26
-        printf("Register parallel flash %d size %lx"
383d26
-               " at addr " TARGET_FMT_lx " '%s'\n",
383d26
-               fl_idx, bios_size, (target_ulong)0xfc000000,
383d26
-               blk_name(blk));
383d26
-#endif
383d26
         pflash_cfi02_register(0xfc000000, NULL, "taihu_405ep.flash", bios_size,
383d26
                               blk, 65536, fl_sectors, 1,
383d26
                               4, 0x0001, 0x22DA, 0x0000, 0x0000, 0x555, 0x2AA,
383d26
@@ -605,16 +554,10 @@ static void taihu_405ep_init(MachineState *machine)
383d26
         fl_idx++;
383d26
     }
383d26
     /* Register CLPD & LCD display */
383d26
-#ifdef DEBUG_BOARD_INIT
383d26
-    printf("%s: register CPLD\n", __func__);
383d26
-#endif
383d26
     taihu_cpld_init(sysmem, 0x50100000);
383d26
     /* Load kernel */
383d26
     linux_boot = (kernel_filename != NULL);
383d26
     if (linux_boot) {
383d26
-#ifdef DEBUG_BOARD_INIT
383d26
-        printf("%s: load kernel\n", __func__);
383d26
-#endif
383d26
         kernel_base = KERNEL_LOAD_ADDR;
383d26
         /* now we can load the kernel */
383d26
         kernel_size = load_image_targphys(kernel_filename, kernel_base,
383d26
@@ -643,9 +586,6 @@ static void taihu_405ep_init(MachineState *machine)
383d26
         initrd_base = 0;
383d26
         initrd_size = 0;
383d26
     }
383d26
-#ifdef DEBUG_BOARD_INIT
383d26
-    printf("%s: Done\n", __func__);
383d26
-#endif
383d26
 }
383d26
 
383d26
 static void taihu_class_init(ObjectClass *oc, void *data)
383d26
-- 
383d26
1.8.3.1
383d26