From: aoyama Date: Fri, 27 Jan 2023 13:58:17 +0000 (+0000) Subject: Delete get_plane_numbers() function. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=133c13f5fe676c2db00b05fd990808e9cafac418;p=openbsd Delete get_plane_numbers() function. Different from original LUNA(68k), the number of planes is directly stored as an integer value on LUNA-88K. Tested on LUNA-88K2 by me. --- diff --git a/sys/arch/luna88k/stand/boot/init_main.c b/sys/arch/luna88k/stand/boot/init_main.c index 91ecc09f25a..fbe39498161 100644 --- a/sys/arch/luna88k/stand/boot/init_main.c +++ b/sys/arch/luna88k/stand/boot/init_main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: init_main.c,v 1.10 2023/01/10 17:10:57 miod Exp $ */ +/* $OpenBSD: init_main.c,v 1.11 2023/01/27 13:58:17 aoyama Exp $ */ /* $NetBSD: init_main.c,v 1.6 2013/03/05 15:34:53 tsutsui Exp $ */ /* @@ -109,7 +109,6 @@ const char version[] = "0.8"; static void get_fuse_rom_data(void); static void get_nvram_data(void); -static int get_plane_numbers(void); static const char *nvram_by_symbol(char *); int cpuspeed; /* for DELAY() macro */ @@ -167,7 +166,7 @@ main(void) cpuspeed = MHZ_33; } - nplane = get_plane_numbers(); + nplane = *((int *)0x1114); /* 0, 1, 4, or 8 */ cninit(); #ifdef SUPPORT_ETHERNET @@ -187,19 +186,6 @@ main(void) /* NOTREACHED */ } -int -get_plane_numbers(void) -{ - int r = *((int *)0x1114); - int n = 0; - - for (; r ; r >>= 1) - if (r & 0x1) - n++; - - return(n); -} - /* Get data from FUSE ROM */ void