Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/marvell Fix debug messages.
details: https://anonhg.NetBSD.org/src/rev/dbbe2a91af14
branches: trunk
changeset: 755543:dbbe2a91af14
user: kiyohara <kiyohara%NetBSD.org@localhost>
date: Wed Jun 09 02:19:51 2010 +0000
description:
Fix debug messages.
- s/DEBUG/GT_DEBUG/.
- Indent.
- The old one is 20 bits in the mask of the address register, and the
new one is 16 bits.
diffstat:
sys/dev/marvell/gt.c | 158 ++++++++++++++++++++++++++---------------------
sys/dev/marvell/gtreg.h | 14 +++-
2 files changed, 98 insertions(+), 74 deletions(-)
diffs (truncated from 352 to 300 lines):
diff -r 199bd024b566 -r dbbe2a91af14 sys/dev/marvell/gt.c
--- a/sys/dev/marvell/gt.c Tue Jun 08 22:22:25 2010 +0000
+++ b/sys/dev/marvell/gt.c Wed Jun 09 02:19:51 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: gt.c,v 1.23 2010/04/28 13:51:56 kiyohara Exp $ */
+/* $NetBSD: gt.c,v 1.24 2010/06/09 02:19:51 kiyohara Exp $ */
/*
* Copyright (c) 2002 Allegro Networks, Inc., Wasabi Systems, Inc.
@@ -42,10 +42,11 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gt.c,v 1.23 2010/04/28 13:51:56 kiyohara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gt.c,v 1.24 2010/06/09 02:19:51 kiyohara Exp $");
#include "opt_marvell.h"
#include "gtmpsc.h"
+#include "opt_multiprocessor.h"
#include "locators.h"
#include <sys/param.h>
@@ -68,10 +69,6 @@
#include <dev/pci/pcireg.h>
-#ifdef DEBUG
-#include <sys/systm.h> /* for Debugger() */
-#endif
-
#if ((GT_MPP_WATCHDOG & 0xf0f0f0f0) != 0)
# error /* unqualified: configuration botch! */
#endif
@@ -143,7 +140,6 @@
{ MARVELL_DISCOVERY_II, "gttwsi", 0, 0xc000, 37 },
{ MARVELL_DISCOVERY_II, "mvgbec", 0, 0x0000, IRQ_DEFAULT },
-#if 0
{ MARVELL_DISCOVERY_III,"gtidmac", 0, 0x0000, 4 /*...7 */ },
{ MARVELL_DISCOVERY_III,"gtmpsc", 0, 0x8000, 40 },
{ MARVELL_DISCOVERY_III,"gtmpsc", 1, 0x9000, 42 },
@@ -151,7 +147,6 @@
{ MARVELL_DISCOVERY_III,"gtpci", 1, OFFSET_DEFAULT, IRQ_DEFAULT },
{ MARVELL_DISCOVERY_III,"gttwsi", 0, 0xc000, 37 },
{ MARVELL_DISCOVERY_III,"mvgbec", 0, 0x0000, IRQ_DEFAULT },
-#endif
};
@@ -223,7 +218,7 @@
gt_attach_common(struct gt_softc *gt)
{
uint32_t cpucfg, cpumode, cpumstr;
-#ifdef DEBUG
+#ifdef GT_DEBUG
uint32_t loaddr, hiaddr;
#endif
@@ -242,8 +237,10 @@
aprint_normal(": MV6436x Discovery II\n");
break;
+ case MARVELL_DISCOVERY_III:
+ aprint_normal(": MV6446x Discovery III\n");
+ break;
#if 0
- case MARVELL_DISCOVERY_III:
case MARVELL_DISCOVERY_LT:
case MARVELL_DISCOVERY_V:
case MARVELL_DISCOVERY_VI:
@@ -276,157 +273,176 @@
aprint_normal(", snoop=clean&flush"); break;
}
aprint_normal(" wdog=%#x,%#x\n",
- gt_read(gt, GT_WDOG_Config),
- gt_read(gt, GT_WDOG_Value));
+ gt_read(gt, GT_WDOG_Config), gt_read(gt, GT_WDOG_Value));
-#if DEBUG
- loaddr = GT_LowAddr_GET(gt_read(gt, GT_SCS0_Low_Decode));
- hiaddr = GT_HighAddr_GET(gt_read(gt, GT_SCS0_High_Decode));
+#ifdef GT_DEBUG
+ loaddr = GT_LADDR_GET(gt_read(gt, GT_SCS0_Low_Decode), gt->sc_model);
+ hiaddr = GT_HADDR_GET(gt_read(gt, GT_SCS0_High_Decode), gt->sc_model);
aprint_normal_dev(gt->sc_dev, " scs[0]=%#10x-%#10x\n",
loaddr, hiaddr);
- loaddr = GT_LowAddr_GET(gt_read(gt, GT_SCS1_Low_Decode));
- hiaddr = GT_HighAddr_GET(gt_read(gt, GT_SCS1_High_Decode));
+ loaddr = GT_LADDR_GET(gt_read(gt, GT_SCS1_Low_Decode), gt->sc_model);
+ hiaddr = GT_HADDR_GET(gt_read(gt, GT_SCS1_High_Decode), gt->sc_model);
aprint_normal_dev(gt->sc_dev, " scs[1]=%#10x-%#10x\n",
loaddr, hiaddr);
- loaddr = GT_LowAddr_GET(gt_read(gt, GT_SCS2_Low_Decode));
- hiaddr = GT_HighAddr_GET(gt_read(gt, GT_SCS2_High_Decode));
+ loaddr = GT_LADDR_GET(gt_read(gt, GT_SCS2_Low_Decode), gt->sc_model);
+ hiaddr = GT_HADDR_GET(gt_read(gt, GT_SCS2_High_Decode), gt->sc_model);
aprint_normal_dev(gt->sc_dev, " scs[2]=%#10x-%#10x\n",
loaddr, hiaddr);
- loaddr = GT_LowAddr_GET(gt_read(gt, GT_SCS3_Low_Decode));
- hiaddr = GT_HighAddr_GET(gt_read(gt, GT_SCS3_High_Decode));
+ loaddr = GT_LADDR_GET(gt_read(gt, GT_SCS3_Low_Decode), gt->sc_model);
+ hiaddr = GT_HADDR_GET(gt_read(gt, GT_SCS3_High_Decode), gt->sc_model);
aprint_normal_dev(gt->sc_dev, " scs[3]=%#10x-%#10x\n",
loaddr, hiaddr);
- loaddr = GT_LowAddr_GET(gt_read(gt, GT_CS0_Low_Decode));
- hiaddr = GT_HighAddr_GET(gt_read(gt, GT_CS0_High_Decode));
+ loaddr = GT_LADDR_GET(gt_read(gt, GT_CS0_Low_Decode), gt->sc_model);
+ hiaddr = GT_HADDR_GET(gt_read(gt, GT_CS0_High_Decode), gt->sc_model);
aprint_normal_dev(gt->sc_dev, " cs[0]=%#10x-%#10x\n",
loaddr, hiaddr);
- loaddr = GT_LowAddr_GET(gt_read(gt, GT_CS1_Low_Decode));
- hiaddr = GT_HighAddr_GET(gt_read(gt, GT_CS1_High_Decode));
+ loaddr = GT_LADDR_GET(gt_read(gt, GT_CS1_Low_Decode), gt->sc_model);
+ hiaddr = GT_HADDR_GET(gt_read(gt, GT_CS1_High_Decode), gt->sc_model);
aprint_normal_dev(gt->sc_dev, " cs[1]=%#10x-%#10x\n",
loaddr, hiaddr);
- loaddr = GT_LowAddr_GET(gt_read(gt, GT_CS2_Low_Decode));
- hiaddr = GT_HighAddr_GET(gt_read(gt, GT_CS2_High_Decode));
+ loaddr = GT_LADDR_GET(gt_read(gt, GT_CS2_Low_Decode), gt->sc_model);
+ hiaddr = GT_HADDR_GET(gt_read(gt, GT_CS2_High_Decode), gt->sc_model);
aprint_normal_dev(gt->sc_dev, " cs[2]=%#10x-%#10x\n",
loaddr, hiaddr);
- loaddr = GT_LowAddr_GET(gt_read(gt, GT_CS3_Low_Decode));
- hiaddr = GT_HighAddr_GET(gt_read(gt, GT_CS3_High_Decode));
+ loaddr = GT_LADDR_GET(gt_read(gt, GT_CS3_Low_Decode), gt->sc_model);
+ hiaddr = GT_HADDR_GET(gt_read(gt, GT_CS3_High_Decode), gt->sc_model);
aprint_normal_dev(gt->sc_dev, " cs[3]=%#10x-%#10x\n",
loaddr, hiaddr);
- loaddr = GT_LowAddr_GET(gt_read(gt, GT_BootCS_Low_Decode));
- hiaddr = GT_HighAddr_GET(gt_read(gt, GT_BootCS_High_Decode));
- aprint_normal_dev(gt->sc_dev, " bootcs=%#10x-%#10x\n",
+ loaddr = GT_LADDR_GET(gt_read(gt, GT_BootCS_Low_Decode), gt->sc_model);
+ hiaddr = GT_HADDR_GET(gt_read(gt, GT_BootCS_High_Decode), gt->sc_model);
+ aprint_normal_dev(gt->sc_dev, " bootcs=%#10x-%#10x\n",
loaddr, hiaddr);
- loaddr = GT_LowAddr_GET(gt_read(gt, GT_PCI0_IO_Low_Decode));
- hiaddr = GT_HighAddr_GET(gt_read(gt, GT_PCI0_IO_High_Decode));
- aprint_normal_dev(gt->sc_dev, " pci0io=%#10x-%#10x ",
+ loaddr = GT_LADDR_GET(gt_read(gt, GT_PCI0_IO_Low_Decode), gt->sc_model);
+ hiaddr =
+ GT_HADDR_GET(gt_read(gt, GT_PCI0_IO_High_Decode), gt->sc_model);
+ aprint_normal_dev(gt->sc_dev, " pci0io=%#10x-%#10x ",
loaddr, hiaddr);
loaddr = gt_read(gt, GT_PCI0_IO_Remap);
aprint_normal("remap=%#010x\n", loaddr);
- loaddr = GT_LowAddr_GET(gt_read(gt, GT_PCI0_Mem0_Low_Decode));
- hiaddr = GT_HighAddr_GET(gt_read(gt, GT_PCI0_Mem0_High_Decode));
- aprint_normal_dev(gt->sc_dev, " pci0mem[0]=%#10x-%#10x ",
+ loaddr =
+ GT_LADDR_GET(gt_read(gt, GT_PCI0_Mem0_Low_Decode), gt->sc_model);
+ hiaddr =
+ GT_HADDR_GET(gt_read(gt, GT_PCI0_Mem0_High_Decode), gt->sc_model);
+ aprint_normal_dev(gt->sc_dev, " pci0mem[0]=%#10x-%#10x ",
loaddr, hiaddr);
loaddr = gt_read(gt, GT_PCI0_Mem0_Remap_Low);
hiaddr = gt_read(gt, GT_PCI0_Mem0_Remap_High);
aprint_normal("remap=%#010x.%#010x\n", hiaddr, loaddr);
- loaddr = GT_LowAddr_GET(gt_read(gt, GT_PCI0_Mem1_Low_Decode));
- hiaddr = GT_HighAddr_GET(gt_read(gt, GT_PCI0_Mem1_High_Decode));
- aprint_normal_dev(gt->sc_dev, " pci0mem[1]=%#10x-%#10x ",
+ loaddr =
+ GT_LADDR_GET(gt_read(gt, GT_PCI0_Mem1_Low_Decode), gt->sc_model);
+ hiaddr =
+ GT_HADDR_GET(gt_read(gt, GT_PCI0_Mem1_High_Decode), gt->sc_model);
+ aprint_normal_dev(gt->sc_dev, " pci0mem[1]=%#10x-%#10x ",
loaddr, hiaddr);
loaddr = gt_read(gt, GT_PCI0_Mem1_Remap_Low);
hiaddr = gt_read(gt, GT_PCI0_Mem1_Remap_High);
aprint_normal("remap=%#010x.%#010x\n", hiaddr, loaddr);
- loaddr = GT_LowAddr_GET(gt_read(gt, GT_PCI0_Mem2_Low_Decode));
- hiaddr = GT_HighAddr_GET(gt_read(gt, GT_PCI0_Mem2_High_Decode));
- aprint_normal_dev(gt->sc_dev, " pci0mem[2]=%#10x-%#10x ",
+ loaddr =
+ GT_LADDR_GET(gt_read(gt, GT_PCI0_Mem2_Low_Decode), gt->sc_model);
+ hiaddr =
+ GT_HADDR_GET(gt_read(gt, GT_PCI0_Mem2_High_Decode), gt->sc_model);
+ aprint_normal_dev(gt->sc_dev, " pci0mem[2]=%#10x-%#10x ",
loaddr, hiaddr);
loaddr = gt_read(gt, GT_PCI0_Mem2_Remap_Low);
hiaddr = gt_read(gt, GT_PCI0_Mem2_Remap_High);
aprint_normal("remap=%#010x.%#010x\n", hiaddr, loaddr);
- loaddr = GT_LowAddr_GET(gt_read(gt, GT_PCI0_Mem3_Low_Decode));
- hiaddr = GT_HighAddr_GET(gt_read(gt, GT_PCI0_Mem3_High_Decode));
- aprint_normal_dev(gt->sc_dev, " pci0mem[3]=%#10x-%#10x ",
+ loaddr =
+ GT_LADDR_GET(gt_read(gt, GT_PCI0_Mem3_Low_Decode), gt->sc_model);
+ hiaddr =
+ GT_HADDR_GET(gt_read(gt, GT_PCI0_Mem3_High_Decode), gt->sc_model);
+ aprint_normal_dev(gt->sc_dev, " pci0mem[3]=%#10x-%#10x ",
loaddr, hiaddr);
loaddr = gt_read(gt, GT_PCI0_Mem3_Remap_Low);
hiaddr = gt_read(gt, GT_PCI0_Mem3_Remap_High);
aprint_normal("remap=%#010x.%#010x\n", hiaddr, loaddr);
- loaddr = GT_LowAddr_GET(gt_read(gt, GT_PCI1_IO_Low_Decode));
- hiaddr = GT_HighAddr_GET(gt_read(gt, GT_PCI1_IO_High_Decode));
- aprint_normal_dev(gt->sc_dev, " pci1io=%#10x-%#10x ",
+ loaddr = GT_LADDR_GET(gt_read(gt, GT_PCI1_IO_Low_Decode), gt->sc_model);
+ hiaddr =
+ GT_HADDR_GET(gt_read(gt, GT_PCI1_IO_High_Decode), gt->sc_model);
+ aprint_normal_dev(gt->sc_dev, " pci1io=%#10x-%#10x ",
loaddr, hiaddr);
loaddr = gt_read(gt, GT_PCI1_IO_Remap);
aprint_normal("remap=%#010x\n", loaddr);
- loaddr = GT_LowAddr_GET(gt_read(gt, GT_PCI1_Mem0_Low_Decode));
- hiaddr = GT_HighAddr_GET(gt_read(gt, GT_PCI1_Mem0_High_Decode));
- aprint_normal_dev(gt->sc_dev, " pci1mem[0]=%#10x-%#10x ",
+ loaddr =
+ GT_LADDR_GET(gt_read(gt, GT_PCI1_Mem0_Low_Decode), gt->sc_model);
+ hiaddr =
+ GT_HADDR_GET(gt_read(gt, GT_PCI1_Mem0_High_Decode), gt->sc_model);
+ aprint_normal_dev(gt->sc_dev, " pci1mem[0]=%#10x-%#10x ",
loaddr, hiaddr);
loaddr = gt_read(gt, GT_PCI1_Mem0_Remap_Low);
hiaddr = gt_read(gt, GT_PCI1_Mem0_Remap_High);
aprint_normal("remap=%#010x.%#010x\n", hiaddr, loaddr);
- loaddr = GT_LowAddr_GET(gt_read(gt, GT_PCI1_Mem1_Low_Decode));
- hiaddr = GT_HighAddr_GET(gt_read(gt, GT_PCI1_Mem1_High_Decode));
- aprint_normal_dev(gt->sc_dev, " pci1mem[1]=%#10x-%#10x ",
+ loaddr =
+ GT_LADDR_GET(gt_read(gt, GT_PCI1_Mem1_Low_Decode), gt->sc_model);
+ hiaddr =
+ GT_HADDR_GET(gt_read(gt, GT_PCI1_Mem1_High_Decode), gt->sc_model);
+ aprint_normal_dev(gt->sc_dev, " pci1mem[1]=%#10x-%#10x ",
loaddr, hiaddr);
loaddr = gt_read(gt, GT_PCI1_Mem1_Remap_Low);
hiaddr = gt_read(gt, GT_PCI1_Mem1_Remap_High);
aprint_normal("remap=%#010x.%#010x\n", hiaddr, loaddr);
- loaddr = GT_LowAddr_GET(gt_read(gt, GT_PCI1_Mem2_Low_Decode));
- hiaddr = GT_HighAddr_GET(gt_read(gt, GT_PCI1_Mem2_High_Decode));
- aprint_normal_dev(gt->sc_dev, " pci1mem[2]=%#10x-%#10x ",
+ loaddr =
+ GT_LADDR_GET(gt_read(gt, GT_PCI1_Mem2_Low_Decode), gt->sc_model);
+ hiaddr =
+ GT_HADDR_GET(gt_read(gt, GT_PCI1_Mem2_High_Decode), gt->sc_model);
+ aprint_normal_dev(gt->sc_dev, " pci1mem[2]=%#10x-%#10x ",
loaddr, hiaddr);
loaddr = gt_read(gt, GT_PCI1_Mem2_Remap_Low);
hiaddr = gt_read(gt, GT_PCI1_Mem2_Remap_High);
aprint_normal("remap=%#010x.%#010x\n", hiaddr, loaddr);
- loaddr = GT_LowAddr_GET(gt_read(gt, GT_PCI1_Mem3_Low_Decode));
- hiaddr = GT_HighAddr_GET(gt_read(gt, GT_PCI1_Mem3_High_Decode));
- aprint_normal_dev(gt->sc_dev, " pci1mem[3]=%#10x-%#10x ",
+ loaddr =
+ GT_LADDR_GET(gt_read(gt, GT_PCI1_Mem3_Low_Decode), gt->sc_model);
+ hiaddr =
+ GT_HADDR_GET(gt_read(gt, GT_PCI1_Mem3_High_Decode), gt->sc_model);
+ aprint_normal_dev(gt->sc_dev, " pci1mem[3]=%#10x-%#10x ",
loaddr, hiaddr);
loaddr = gt_read(gt, GT_PCI1_Mem3_Remap_Low);
hiaddr = gt_read(gt, GT_PCI1_Mem3_Remap_High);
aprint_normal("remap=%#010x.%#010x\n", hiaddr, loaddr);
- loaddr = GT_LowAddr_GET(gt_read(gt, GT_Internal_Decode));
- aprint_normal_dev(gt->sc_dev, " internal=%#10x-%#10x\n",
+ loaddr = GT_LADDR_GET(gt_read(gt, GT_Internal_Decode), gt->sc_model);
+ aprint_normal_dev(gt->sc_dev, " internal=%#10x-%#10x\n",
loaddr, loaddr + 256 * 1024);
- loaddr = GT_LowAddr_GET(gt_read(gt, GT_CPU0_Low_Decode));
- hiaddr = GT_HighAddr_GET(gt_read(gt, GT_CPU0_High_Decode));
- aprint_normal_dev(gt->sc_dev, " cpu0=%#10x-%#10x\n",
+ loaddr = GT_LADDR_GET(gt_read(gt, GT_CPU0_Low_Decode), gt->sc_model);
+ hiaddr = GT_HADDR_GET(gt_read(gt, GT_CPU0_High_Decode), gt->sc_model);
+ aprint_normal_dev(gt->sc_dev, " cpu0=%#10x-%#10x\n",
loaddr, hiaddr);
- loaddr = GT_LowAddr_GET(gt_read(gt, GT_CPU1_Low_Decode));
- hiaddr = GT_HighAddr_GET(gt_read(gt, GT_CPU1_High_Decode));
+#ifdef MULTIPROCESSOR
+ loaddr = GT_LADDR_GET(gt_read(gt, GT_CPU1_Low_Decode), gt->sc_model);
+ hiaddr = GT_HADDR_GET(gt_read(gt, GT_CPU1_High_Decode), gt->sc_model);
aprint_normal_dev(gt->sc_dev, " cpu1=%#10x-%#10x",
Home |
Main Index |
Thread Index |
Old Index