CVS commit: src/sys/arch/arm/footbridge

2021-08-24 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Aug 24 08:39:50 UTC 2021

Modified Files:
src/sys/arch/arm/footbridge: dc21285mem.h

Log Message:
lower case for hex numbers.
consistent #define
same binary before and after.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/footbridge/dc21285mem.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/arm/footbridge

2021-08-24 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Aug 24 08:39:50 UTC 2021

Modified Files:
src/sys/arch/arm/footbridge: dc21285mem.h

Log Message:
lower case for hex numbers.
consistent #define
same binary before and after.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/footbridge/dc21285mem.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/footbridge/dc21285mem.h
diff -u src/sys/arch/arm/footbridge/dc21285mem.h:1.2 src/sys/arch/arm/footbridge/dc21285mem.h:1.3
--- src/sys/arch/arm/footbridge/dc21285mem.h:1.2	Sat Jun  9 10:44:11 2001
+++ src/sys/arch/arm/footbridge/dc21285mem.h	Tue Aug 24 08:39:50 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: dc21285mem.h,v 1.2 2001/06/09 10:44:11 chris Exp $	*/
+/*	$NetBSD: dc21285mem.h,v 1.3 2021/08/24 08:39:50 skrll Exp $	*/
 
 /*
  * Copyright (c) 1997,1998 Mark Brinicombe.
@@ -39,51 +39,51 @@
  */
 
 #define	DC21285_SDRAM_BASE		0x
-#define DC21285_SDRAM_SIZE		0x1000	/* 256 MB */
+#define	DC21285_SDRAM_SIZE		0x1000	/* 256 MB */
 
 #define	DC21285_SDRAM_A0MR		0x4000
 #define	DC21285_SDRAM_A1MR		0x40004000
 #define	DC21285_SDRAM_A2MR		0x40008000
-#define	DC21285_SDRAM_A3MR		0x4000C000
+#define	DC21285_SDRAM_A3MR		0x4000c000
 
 #define	DC21285_XBUS_XCS0		0x4001
 #define	DC21285_XBUS_XCS1		0x40011000
 #define	DC21285_XBUS_XCS2		0x40012000
 #define	DC21285_XBUS_NOCS		0x40013000
 
-#define DC21285_ROM_BASE		0x4100
-#define DC21285_ROM_SIZE		0x0100	/* 16MB */
+#define	DC21285_ROM_BASE		0x4100
+#define	DC21285_ROM_SIZE		0x0100	/* 16MB */
 
-#define DC21285_ARMCSR_BASE		0x4200
-#define DC21285_ARMCSR_SIZE		0x0010	/* 1MB */
+#define	DC21285_ARMCSR_BASE		0x4200
+#define	DC21285_ARMCSR_SIZE		0x0010	/* 1MB */
 
-#define DC21285_SA_CACHE_FLUSH_BASE	0x5000
-#define DC21285_SA_CACHE_FLUSH_SIZE	0x0100	/* 16MB */
+#define	DC21285_SA_CACHE_FLUSH_BASE	0x5000
+#define	DC21285_SA_CACHE_FLUSH_SIZE	0x0100	/* 16MB */
 
-#define DC21285_OUTBOUND_WRITE_FLUSH	0x7800
-
-#define DC21285_PCI_IACK_SPECIAL	0x7900
-#define DC21285_PCI_TYPE_1_CONFIG	0x7A00
-#define DC21285_PCI_TYPE_0_CONFIG	0x7B00
-#define DC21285_PCI_IO_BASE		0x7C00
-#define DC21285_PCI_IO_SIZE		0x0001	/* 64K */
-#define DC21285_PCI_MEM_BASE		0x8000
-#define DC21285_PCI_MEM_SIZE		0x8000	/* 2GB */
+#define	DC21285_OUTBOUND_WRITE_FLUSH	0x7800
+
+#define	DC21285_PCI_IACK_SPECIAL	0x7900
+#define	DC21285_PCI_TYPE_1_CONFIG	0x7a00
+#define	DC21285_PCI_TYPE_0_CONFIG	0x7b00
+#define	DC21285_PCI_IO_BASE		0x7c00
+#define	DC21285_PCI_IO_SIZE		0x0001	/* 64K */
+#define	DC21285_PCI_MEM_BASE		0x8000
+#define	DC21285_PCI_MEM_SIZE		0x8000	/* 2GB */
 
 /*
  * Standard Virtual memory map used for the DC21285 'Footbridge'
  */
-#define DC21285_ARMCSR_VBASE		0xFD00
-#define	DC21285_ARMCSR_VSIZE		0x0010	/* 1MB */
-#define	DC21285_CACHE_FLUSH_VBASE	0xFD10
+#define	DC21285_ARMCSR_VBASE		0xfd00
+#define	DC21285_ARMCSR_VSIZE		0x0010	/* 1mB */
+#define	DC21285_CACHE_FLUSH_VBASE	0xfd10
 #define	DC21285_CACHE_FLUSH_VSIZE	0x0010	/* 1MB */
-#define	DC21285_PCI_IO_VBASE		0xFD20
-#define	DC21285_PCI_IO_VSIZE		0x0010	/* 1MB */
-#define	DC21285_PCI_IACK_VBASE		0xFD30
+#define	DC21285_PCI_IO_VBASE		0xfd20
+#define	DC21285_PCI_IO_VSIZE		0x0010	/* 1mB */
+#define	DC21285_PCI_IACK_VBASE		0xfd30
 #define	DC21285_PCI_IACK_VSIZE		0x0010	/* 1MB */
-#define	DC21285_PCI_ISA_MEM_VBASE	0xFD40
+#define	DC21285_PCI_ISA_MEM_VBASE	0xfd40
 #define	DC21285_PCI_ISA_MEM_VSIZE	0x0010	/* 1MB */
-#define	DC21285_PCI_TYPE_1_CONFIG_VBASE	0xFE00
+#define	DC21285_PCI_TYPE_1_CONFIG_VBASE	0xfe00
 #define	DC21285_PCI_TYPE_1_CONFIG_VSIZE	0x0100	/* 16MB */
-#define	DC21285_PCI_TYPE_0_CONFIG_VBASE	0xFF00
+#define	DC21285_PCI_TYPE_0_CONFIG_VBASE	0xff00
 #define	DC21285_PCI_TYPE_0_CONFIG_VSIZE	0x0100	/* 16MB */



CVS commit: src/sys/arch/arm/footbridge

2021-08-13 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Aug 13 11:40:43 UTC 2021

Modified Files:
src/sys/arch/arm/footbridge: footbridge.c footbridge_clock.c
footbridge_com.c footbridge_com_io.c footbridge_intr.h
footbridge_io.c footbridge_irqhandler.c footbridge_pci.c
src/sys/arch/arm/footbridge/isa: dsrtc.c isa_io.c isa_io_asm.S
isa_machdep.c

Log Message:
Trailing whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/arm/footbridge/footbridge.c
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/arm/footbridge/footbridge_clock.c
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/arm/footbridge/footbridge_com.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/footbridge/footbridge_com_io.c
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/arm/footbridge/footbridge_intr.h
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/arm/footbridge/footbridge_io.c
cvs rdiff -u -r1.27 -r1.28 \
src/sys/arch/arm/footbridge/footbridge_irqhandler.c
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/arm/footbridge/footbridge_pci.c
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arm/footbridge/isa/dsrtc.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/footbridge/isa/isa_io.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/footbridge/isa/isa_io_asm.S
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/arm/footbridge/isa/isa_machdep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/footbridge/footbridge.c
diff -u src/sys/arch/arm/footbridge/footbridge.c:1.28 src/sys/arch/arm/footbridge/footbridge.c:1.29
--- src/sys/arch/arm/footbridge/footbridge.c:1.28	Sat Aug  7 16:18:43 2021
+++ src/sys/arch/arm/footbridge/footbridge.c	Fri Aug 13 11:40:43 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: footbridge.c,v 1.28 2021/08/07 16:18:43 thorpej Exp $	*/
+/*	$NetBSD: footbridge.c,v 1.29 2021/08/13 11:40:43 skrll Exp $	*/
 
 /*
  * Copyright (c) 1997,1998 Mark Brinicombe.
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: footbridge.c,v 1.28 2021/08/07 16:18:43 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: footbridge.c,v 1.29 2021/08/13 11:40:43 skrll Exp $");
 
 #include 
 #include 
@@ -58,7 +58,7 @@ __KERNEL_RCSID(0, "$NetBSD: footbridge.c
 #include 
 #include 
 #include 
- 
+
 /*
  * DC21285 'Footbridge' device
  *
@@ -126,8 +126,8 @@ footbridge_print(void *aux, const char *
  * int footbridge_match(device_t parent, cfdata_t cf, void *aux)
  *
  * Just return ok for this if it is device 0
- */ 
- 
+ */
+
 static int
 footbridge_match(device_t parent, cfdata_t cf, void *aux)
 {
@@ -141,7 +141,7 @@ footbridge_match(device_t parent, cfdata
  * void footbridge_attach(device_t parent, device_t dev, void *aux)
  *
  */
-  
+
 static void
 footbridge_attach(device_t parent, device_t self, void *aux)
 {
@@ -188,7 +188,7 @@ footbridge_attach(device_t parent, devic
 	"targ abt", footbridge_intr, sc);
 	sc->sc_parity_ih = footbridge_intr_claim(IRQ_PARITY, IPL_HIGH,
 	"parity", footbridge_intr, sc);
-	
+
 	/* Set up the PCI bus tags */
 	footbridge_create_io_bs_tag(_pci_io_bs_tag,
 	(void *)DC21285_PCI_IO_VBASE);
@@ -220,7 +220,7 @@ footbridge_attach(device_t parent, devic
 break;
 		mask--;
 		mask &= SDRAM_MASK_256MB;
-		
+
 		/*
 		 * configure the mask, the offset into SDRAM and the address
 		 * SDRAM is exposed on the PCI bus.
@@ -255,7 +255,7 @@ footbridge_attach(device_t parent, devic
 	fba.fba_fca.fca_tx_irq = IRQ_SERIAL_TX;
 	config_found(self, _fca, footbridge_print,
 	CFARGS(.iattr = "footbridge"));
-	
+
 	/* Setup fast SA110 cache clean area */
 #ifdef CPU_SA110
 	if (cputype == CPU_ID_SA110)

Index: src/sys/arch/arm/footbridge/footbridge_clock.c
diff -u src/sys/arch/arm/footbridge/footbridge_clock.c:1.26 src/sys/arch/arm/footbridge/footbridge_clock.c:1.27
--- src/sys/arch/arm/footbridge/footbridge_clock.c:1.26	Tue Jul 21 07:35:55 2009
+++ src/sys/arch/arm/footbridge/footbridge_clock.c	Fri Aug 13 11:40:43 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: footbridge_clock.c,v 1.26 2009/07/21 07:35:55 skrll Exp $	*/
+/*	$NetBSD: footbridge_clock.c,v 1.27 2021/08/13 11:40:43 skrll Exp $	*/
 
 /*
  * Copyright (c) 1997 Mark Brinicombe.
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: footbridge_clock.c,v 1.26 2009/07/21 07:35:55 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: footbridge_clock.c,v 1.27 2021/08/13 11:40:43 skrll Exp $");
 
 /* Include header files */
 
@@ -88,8 +88,8 @@ CFATTACH_DECL_NEW(footbridge_clock, size
  * int clockmatch(device_t parent, cfdata_t cf, void *aux);
  *
  * Just return ok for this if it is device 0
- */ 
- 
+ */
+
 static int
 clockmatch(device_t parent, cfdata_t cf, void *aux)
 {
@@ -105,7 +105,7 @@ clockmatch(device_t parent, cfdata_t cf,
  * void clockattach(device_t parent, device_t self, void *aux)
  *
  */
-  
+
 static void
 clockattach(device_t parent, device_t self, void *aux)
 {
@@ -119,7 +119,7 @@ clockattach(device_t parent, device_t se
 	clock_sc = sc;
 
 	/* 

CVS commit: src/sys/arch/arm/footbridge

2021-08-13 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Aug 13 11:40:43 UTC 2021

Modified Files:
src/sys/arch/arm/footbridge: footbridge.c footbridge_clock.c
footbridge_com.c footbridge_com_io.c footbridge_intr.h
footbridge_io.c footbridge_irqhandler.c footbridge_pci.c
src/sys/arch/arm/footbridge/isa: dsrtc.c isa_io.c isa_io_asm.S
isa_machdep.c

Log Message:
Trailing whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/arm/footbridge/footbridge.c
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/arm/footbridge/footbridge_clock.c
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/arm/footbridge/footbridge_com.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/footbridge/footbridge_com_io.c
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/arm/footbridge/footbridge_intr.h
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/arm/footbridge/footbridge_io.c
cvs rdiff -u -r1.27 -r1.28 \
src/sys/arch/arm/footbridge/footbridge_irqhandler.c
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/arm/footbridge/footbridge_pci.c
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arm/footbridge/isa/dsrtc.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/footbridge/isa/isa_io.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/footbridge/isa/isa_io_asm.S
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/arm/footbridge/isa/isa_machdep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/arm/footbridge

2020-12-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Dec  9 15:28:38 UTC 2020

Modified Files:
src/sys/arch/arm/footbridge: footbridge_intr.h

Log Message:
Remove  include and assume users already include that.
Removes an include cycle when including  via:
ys/time.h, sys/timevar.h, sys/mutex.h, sys/intr.h on top of this
file, and sys/param.h, uvm/uvm_param.h, sys/resourcevar.h below.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/arm/footbridge/footbridge_intr.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/footbridge/footbridge_intr.h
diff -u src/sys/arch/arm/footbridge/footbridge_intr.h:1.20 src/sys/arch/arm/footbridge/footbridge_intr.h:1.21
--- src/sys/arch/arm/footbridge/footbridge_intr.h:1.20	Fri Jun  1 21:22:43 2018
+++ src/sys/arch/arm/footbridge/footbridge_intr.h	Wed Dec  9 15:28:38 2020
@@ -1,4 +1,4 @@
-/* 	$NetBSD: footbridge_intr.h,v 1.20 2018/06/01 21:22:43 mrg Exp $	*/
+/* 	$NetBSD: footbridge_intr.h,v 1.21 2020/12/09 15:28:38 martin Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002 Wasabi Systems, Inc.
@@ -46,7 +46,6 @@ typedef struct {
 
 #include 
 #endif
-#include 
 #include 
 #include 
 



CVS commit: src/sys/arch/arm/footbridge

2020-12-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Dec  9 15:28:38 UTC 2020

Modified Files:
src/sys/arch/arm/footbridge: footbridge_intr.h

Log Message:
Remove  include and assume users already include that.
Removes an include cycle when including  via:
ys/time.h, sys/timevar.h, sys/mutex.h, sys/intr.h on top of this
file, and sys/param.h, uvm/uvm_param.h, sys/resourcevar.h below.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/arm/footbridge/footbridge_intr.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/arm/footbridge

2018-11-16 Thread Robert Swindells
Module Name:src
Committed By:   rjs
Date:   Sat Nov 17 01:45:25 UTC 2018

Modified Files:
src/sys/arch/arm/footbridge: footbridge_pci.c

Log Message:
Add xname to footbridge_pci_intr_establish().


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/arm/footbridge/footbridge_pci.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/arm/footbridge

2018-11-16 Thread Robert Swindells
Module Name:src
Committed By:   rjs
Date:   Sat Nov 17 01:45:25 UTC 2018

Modified Files:
src/sys/arch/arm/footbridge: footbridge_pci.c

Log Message:
Add xname to footbridge_pci_intr_establish().


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/arm/footbridge/footbridge_pci.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/footbridge/footbridge_pci.c
diff -u src/sys/arch/arm/footbridge/footbridge_pci.c:1.30 src/sys/arch/arm/footbridge/footbridge_pci.c:1.31
--- src/sys/arch/arm/footbridge/footbridge_pci.c:1.30	Tue Oct 23 08:38:18 2018
+++ src/sys/arch/arm/footbridge/footbridge_pci.c	Sat Nov 17 01:45:25 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: footbridge_pci.c,v 1.30 2018/10/23 08:38:18 jmcneill Exp $	*/
+/*	$NetBSD: footbridge_pci.c,v 1.31 2018/11/17 01:45:25 rjs Exp $	*/
 
 /*
  * Copyright (c) 1997,1998 Mark Brinicombe.
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: footbridge_pci.c,v 1.30 2018/10/23 08:38:18 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: footbridge_pci.c,v 1.31 2018/11/17 01:45:25 rjs Exp $");
 
 #include 
 #include 
@@ -72,7 +72,7 @@ int		footbridge_pci_intr_map(const struc
 const char	*footbridge_pci_intr_string(void *, pci_intr_handle_t,
 		char *, size_t);
 void		*footbridge_pci_intr_establish(void *, pci_intr_handle_t,
-		int, int (*)(void *), void *);
+		int, int (*)(void *), void *, const char *);
 void		footbridge_pci_intr_disestablish(void *, void *);
 const struct evcnt *footbridge_pci_intr_evcnt(void *, pci_intr_handle_t);
 
@@ -335,15 +335,15 @@ footbridge_pci_intr_establish(
 	pci_intr_handle_t ih,
 	int level,
 	int (*func)(void *),
-	void *arg)
+	void *arg, const char *xname)
 {
 	void *intr;
 	char buf[PCI_INTRSTR_LEN];
 	const char *intrstr;
 
 #ifdef PCI_DEBUG
-	printf("footbridge_pci_intr_establish(pcv=%p, ih=0x%" PRIx64 ", level=%d, func=%p, arg=%p)\n",
-	pcv, ih, level, func, arg);
+	printf("footbridge_pci_intr_establish(pcv=%p, ih=0x%" PRIx64 ", level=%d, func=%p, arg=%p, xname=%s)\n",
+	pcv, ih, level, func, arg, xname);
 #endif
 
 	/* Copy the interrupt string to a private buffer */



CVS commit: src/sys/arch/arm/footbridge

2018-06-01 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Fri Jun  1 21:22:43 UTC 2018

Modified Files:
src/sys/arch/arm/footbridge: footbridge_intr.h

Log Message:
include  for the cddl proc.h vs our lwp.h.

this fixes build issues with cats/netwinder since the zfs/dtrace update.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/arm/footbridge/footbridge_intr.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/footbridge/footbridge_intr.h
diff -u src/sys/arch/arm/footbridge/footbridge_intr.h:1.19 src/sys/arch/arm/footbridge/footbridge_intr.h:1.20
--- src/sys/arch/arm/footbridge/footbridge_intr.h:1.19	Mon Jan 25 21:54:14 2016
+++ src/sys/arch/arm/footbridge/footbridge_intr.h	Fri Jun  1 21:22:43 2018
@@ -1,4 +1,4 @@
-/* 	$NetBSD: footbridge_intr.h,v 1.19 2016/01/25 21:54:14 christos Exp $	*/
+/* 	$NetBSD: footbridge_intr.h,v 1.20 2018/06/01 21:22:43 mrg Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002 Wasabi Systems, Inc.
@@ -46,6 +46,7 @@ typedef struct {
 
 #include 
 #endif
+#include 
 #include 
 #include 
 



CVS commit: src/sys/arch/arm/footbridge

2018-06-01 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Fri Jun  1 21:22:43 UTC 2018

Modified Files:
src/sys/arch/arm/footbridge: footbridge_intr.h

Log Message:
include  for the cddl proc.h vs our lwp.h.

this fixes build issues with cats/netwinder since the zfs/dtrace update.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/arm/footbridge/footbridge_intr.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/arm/footbridge

2017-06-13 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Jun 13 15:23:17 UTC 2017

Modified Files:
src/sys/arch/arm/footbridge: footbridge_io.c

Log Message:
Use devmap if available


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/arm/footbridge/footbridge_io.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/footbridge/footbridge_io.c
diff -u src/sys/arch/arm/footbridge/footbridge_io.c:1.22 src/sys/arch/arm/footbridge/footbridge_io.c:1.23
--- src/sys/arch/arm/footbridge/footbridge_io.c:1.22	Sat Feb 22 20:33:00 2014
+++ src/sys/arch/arm/footbridge/footbridge_io.c	Tue Jun 13 15:23:17 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: footbridge_io.c,v 1.22 2014/02/22 20:33:00 matt Exp $	*/
+/*	$NetBSD: footbridge_io.c,v 1.23 2017/06/13 15:23:17 skrll Exp $	*/
 
 /*
  * Copyright (c) 1997 Causality Limited
@@ -39,7 +39,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: footbridge_io.c,v 1.22 2014/02/22 20:33:00 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: footbridge_io.c,v 1.23 2017/06/13 15:23:17 skrll Exp $");
 
 #include 
 #include 
@@ -182,8 +182,8 @@ int
 footbridge_mem_bs_map(void *t, bus_addr_t bpa, bus_size_t size, int flags,
 bus_space_handle_t *bshp)
 {
-	bus_addr_t startpa, endpa, pa;
-	vaddr_t va;
+	paddr_t startpa, endpa, pa;
+	const struct pmap_devmap *pd;
 
 	/* Round the allocation to page boundries */
 	startpa = trunc_page(bpa);
@@ -200,12 +200,19 @@ footbridge_mem_bs_map(void *t, bus_addr_
 		return 0;
 	}
 
+	pa = bpa;
+ 	if ((pd = pmap_devmap_find_pa(pa, size)) != NULL) {
+ 		/* Device was statically mapped. */
+ 		*bshp = pd->pd_va + (pa - pd->pd_pa);
+ 		return 0;
+ 	}
+
 	/*
 	 * Eventually this function will do the mapping check for overlapping / 
 	 * multiple mappings
 	 */
 
-	va = uvm_km_alloc(kernel_map, endpa - startpa, 0,
+	vaddr_t va = uvm_km_alloc(kernel_map, endpa - startpa, 0,
 	UVM_KMF_VAONLY | UVM_KMF_NOWAIT);
 	if (va == 0)
 		return ENOMEM;



CVS commit: src/sys/arch/arm/footbridge

2017-06-13 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Jun 13 15:23:17 UTC 2017

Modified Files:
src/sys/arch/arm/footbridge: footbridge_io.c

Log Message:
Use devmap if available


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/arm/footbridge/footbridge_io.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/arm/footbridge

2017-04-19 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Apr 19 08:30:01 UTC 2017

Modified Files:
src/sys/arch/arm/footbridge: footbridge_pci.c

Log Message:
Use designated initialisers and fix build in process.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/arm/footbridge/footbridge_pci.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/footbridge/footbridge_pci.c
diff -u src/sys/arch/arm/footbridge/footbridge_pci.c:1.28 src/sys/arch/arm/footbridge/footbridge_pci.c:1.29
--- src/sys/arch/arm/footbridge/footbridge_pci.c:1.28	Fri Oct  2 05:22:49 2015
+++ src/sys/arch/arm/footbridge/footbridge_pci.c	Wed Apr 19 08:30:00 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: footbridge_pci.c,v 1.28 2015/10/02 05:22:49 msaitoh Exp $	*/
+/*	$NetBSD: footbridge_pci.c,v 1.29 2017/04/19 08:30:00 skrll Exp $	*/
 
 /*
  * Copyright (c) 1997,1998 Mark Brinicombe.
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: footbridge_pci.c,v 1.28 2015/10/02 05:22:49 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: footbridge_pci.c,v 1.29 2017/04/19 08:30:00 skrll Exp $");
 
 #include 
 #include 
@@ -77,23 +77,21 @@ void		footbridge_pci_intr_disestablish(v
 const struct evcnt *footbridge_pci_intr_evcnt(void *, pci_intr_handle_t);
 
 struct arm32_pci_chipset footbridge_pci_chipset = {
-	NULL,	/* conf_v */
 #ifdef netwinder
-	netwinder_pci_attach_hook,
+	.pc_attach_hook = netwinder_pci_attach_hook,
 #else
-	footbridge_pci_attach_hook,
+	.pc_attach_hook = footbridge_pci_attach_hook,
 #endif
-	footbridge_pci_bus_maxdevs,
-	footbridge_pci_make_tag,
-	footbridge_pci_decompose_tag,
-	footbridge_pci_conf_read,
-	footbridge_pci_conf_write,
-	NULL,	/* intr_v */
-	footbridge_pci_intr_map,
-	footbridge_pci_intr_string,
-	footbridge_pci_intr_evcnt,
-	footbridge_pci_intr_establish,
-	footbridge_pci_intr_disestablish
+	.pc_bus_maxdevs = footbridge_pci_bus_maxdevs,
+	.pc_make_tag = footbridge_pci_make_tag,
+	.pc_decompose_tag = footbridge_pci_decompose_tag,
+	.pc_conf_read = footbridge_pci_conf_read,
+	.pc_conf_write = footbridge_pci_conf_write,
+	.pc_intr_map = footbridge_pci_intr_map,
+	.pc_intr_string = footbridge_pci_intr_string,
+	.pc_intr_evcnt = footbridge_pci_intr_evcnt,
+	.pc_intr_establish = footbridge_pci_intr_establish,
+	.pc_intr_disestablish = footbridge_pci_intr_disestablish
 };
 
 struct arm32_dma_range footbridge_dma_ranges[1];



CVS commit: src/sys/arch/arm/footbridge

2017-04-19 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Apr 19 08:30:01 UTC 2017

Modified Files:
src/sys/arch/arm/footbridge: footbridge_pci.c

Log Message:
Use designated initialisers and fix build in process.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/arm/footbridge/footbridge_pci.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/arm/footbridge

2016-01-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jan 25 16:30:42 UTC 2016

Modified Files:
src/sys/arch/arm/footbridge: footbridge_intr.h

Log Message:
This is a mess:

-> sys/mutex.h -> sys/intr.h -> machine/intr.h -> footbridge/footbridge_intr.h
-> arm/cpu.h -> sys/cpu_data.h -> sys/sched.h -> sys/time.h -> sys/timevar.h
-> sys/systm.h -> sys/param.h -> uvm_param.h -> sys/resourcevar.h

Now sys/resourcevar.h needs a concrete definition of kmutex_t, and
although we started including sys/mutex.h we never got to include
machine/mutex.h which actually defines it, since the footbridge_intr.h
took us for a long ride. Take the easy way out and include
arm/mutex.h in footbridge_intr.h so that we get the definition we
need.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/arm/footbridge/footbridge_intr.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/arm/footbridge

2016-01-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jan 25 16:30:42 UTC 2016

Modified Files:
src/sys/arch/arm/footbridge: footbridge_intr.h

Log Message:
This is a mess:

-> sys/mutex.h -> sys/intr.h -> machine/intr.h -> footbridge/footbridge_intr.h
-> arm/cpu.h -> sys/cpu_data.h -> sys/sched.h -> sys/time.h -> sys/timevar.h
-> sys/systm.h -> sys/param.h -> uvm_param.h -> sys/resourcevar.h

Now sys/resourcevar.h needs a concrete definition of kmutex_t, and
although we started including sys/mutex.h we never got to include
machine/mutex.h which actually defines it, since the footbridge_intr.h
took us for a long ride. Take the easy way out and include
arm/mutex.h in footbridge_intr.h so that we get the definition we
need.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/arm/footbridge/footbridge_intr.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/footbridge/footbridge_intr.h
diff -u src/sys/arch/arm/footbridge/footbridge_intr.h:1.16 src/sys/arch/arm/footbridge/footbridge_intr.h:1.17
--- src/sys/arch/arm/footbridge/footbridge_intr.h:1.16	Tue Feb  4 13:51:16 2014
+++ src/sys/arch/arm/footbridge/footbridge_intr.h	Mon Jan 25 11:30:42 2016
@@ -1,4 +1,4 @@
-/* 	$NetBSD: footbridge_intr.h,v 1.16 2014/02/04 18:51:16 matt Exp $	*/
+/* 	$NetBSD: footbridge_intr.h,v 1.17 2016/01/25 16:30:42 christos Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002 Wasabi Systems, Inc.
@@ -38,6 +38,7 @@
 #ifndef _FOOTBRIDGE_INTR_H_
 #define _FOOTBRIDGE_INTR_H_
 
+#include 
 #include 
 #include 
 



CVS commit: src/sys/arch/arm/footbridge

2016-01-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jan 25 16:41:06 UTC 2016

Modified Files:
src/sys/arch/arm/footbridge: footbridge_intr.h

Log Message:
Move the ipl_cookie_t definition earlier, since the mutex internal impl
uses it.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/arm/footbridge/footbridge_intr.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/footbridge/footbridge_intr.h
diff -u src/sys/arch/arm/footbridge/footbridge_intr.h:1.17 src/sys/arch/arm/footbridge/footbridge_intr.h:1.18
--- src/sys/arch/arm/footbridge/footbridge_intr.h:1.17	Mon Jan 25 11:30:42 2016
+++ src/sys/arch/arm/footbridge/footbridge_intr.h	Mon Jan 25 11:41:06 2016
@@ -1,4 +1,4 @@
-/* 	$NetBSD: footbridge_intr.h,v 1.17 2016/01/25 16:30:42 christos Exp $	*/
+/* 	$NetBSD: footbridge_intr.h,v 1.18 2016/01/25 16:41:06 christos Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002 Wasabi Systems, Inc.
@@ -38,6 +38,11 @@
 #ifndef _FOOTBRIDGE_INTR_H_
 #define _FOOTBRIDGE_INTR_H_
 
+typedef uint8_t ipl_t;
+typedef struct {
+	ipl_t _ipl;
+} ipl_cookie_t;
+
 #include 
 #include 
 #include 
@@ -160,10 +165,6 @@ void	splx(int);
 #define	spl0()		(void)_spllower(IPL_NONE)
 #define	spllowersoftclock() (void)_spllower(IPL_SOFTCLOCK)
 
-typedef uint8_t ipl_t;
-typedef struct {
-	ipl_t _ipl;
-} ipl_cookie_t;
 
 static inline ipl_cookie_t
 makeiplcookie(ipl_t ipl)



CVS commit: src/sys/arch/arm/footbridge

2016-01-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jan 25 16:41:06 UTC 2016

Modified Files:
src/sys/arch/arm/footbridge: footbridge_intr.h

Log Message:
Move the ipl_cookie_t definition earlier, since the mutex internal impl
uses it.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/arm/footbridge/footbridge_intr.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/arm/footbridge

2016-01-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jan 25 21:54:14 UTC 2016

Modified Files:
src/sys/arch/arm/footbridge: footbridge_intr.h

Log Message:
protect locore.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/arm/footbridge/footbridge_intr.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/arm/footbridge

2016-01-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jan 25 21:54:14 UTC 2016

Modified Files:
src/sys/arch/arm/footbridge: footbridge_intr.h

Log Message:
protect locore.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/arm/footbridge/footbridge_intr.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/footbridge/footbridge_intr.h
diff -u src/sys/arch/arm/footbridge/footbridge_intr.h:1.18 src/sys/arch/arm/footbridge/footbridge_intr.h:1.19
--- src/sys/arch/arm/footbridge/footbridge_intr.h:1.18	Mon Jan 25 11:41:06 2016
+++ src/sys/arch/arm/footbridge/footbridge_intr.h	Mon Jan 25 16:54:14 2016
@@ -1,4 +1,4 @@
-/* 	$NetBSD: footbridge_intr.h,v 1.18 2016/01/25 16:41:06 christos Exp $	*/
+/* 	$NetBSD: footbridge_intr.h,v 1.19 2016/01/25 21:54:14 christos Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002 Wasabi Systems, Inc.
@@ -38,12 +38,14 @@
 #ifndef _FOOTBRIDGE_INTR_H_
 #define _FOOTBRIDGE_INTR_H_
 
+#ifndef _LOCORE
 typedef uint8_t ipl_t;
 typedef struct {
 	ipl_t _ipl;
 } ipl_cookie_t;
 
 #include 
+#endif
 #include 
 #include 
 



CVS commit: src/sys/arch/arm/footbridge

2013-11-17 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Nov 17 08:32:55 UTC 2013

Modified Files:
src/sys/arch/arm/footbridge: footbridge_com.c
src/sys/arch/arm/footbridge/isa: isa_machdep.c

Log Message:
Remove unused variables.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sys/arch/arm/footbridge/footbridge_com.c
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/arm/footbridge/isa/isa_machdep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/footbridge/footbridge_com.c
diff -u src/sys/arch/arm/footbridge/footbridge_com.c:1.35 src/sys/arch/arm/footbridge/footbridge_com.c:1.36
--- src/sys/arch/arm/footbridge/footbridge_com.c:1.35	Wed Oct 10 21:53:09 2012
+++ src/sys/arch/arm/footbridge/footbridge_com.c	Sun Nov 17 08:32:55 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: footbridge_com.c,v 1.35 2012/10/10 21:53:09 skrll Exp $	*/
+/*	$NetBSD: footbridge_com.c,v 1.36 2013/11/17 08:32:55 skrll Exp $	*/
 
 /*-
  * Copyright (c) 1997 Mark Brinicombe
@@ -36,7 +36,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: footbridge_com.c,v 1.35 2012/10/10 21:53:09 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: footbridge_com.c,v 1.36 2013/11/17 08:32:55 skrll Exp $);
 
 #include opt_ddb.h
 #include opt_ddbparam.h
@@ -742,12 +742,12 @@ fcomcngetc(dev_t dev)
 	int s = splserial();
 	bus_space_tag_t iot = fcomconstag;
 	bus_space_handle_t ioh = fcomconsioh;
-	u_char stat, c;
+	u_char c;
 
 	while ((bus_space_read_4(iot, ioh, UART_FLAGS)  UART_RX_FULL) != 0)
 		;
 	c = bus_space_read_4(iot, ioh, UART_DATA);
-	stat = bus_space_read_4(iot, ioh, UART_RX_STAT);
+	(void)bus_space_read_4(iot, ioh, UART_RX_STAT);
 	(void)splx(s);
 #if defined(DDB)  DDB_KEYCODE  0
 		/*

Index: src/sys/arch/arm/footbridge/isa/isa_machdep.c
diff -u src/sys/arch/arm/footbridge/isa/isa_machdep.c:1.19 src/sys/arch/arm/footbridge/isa/isa_machdep.c:1.20
--- src/sys/arch/arm/footbridge/isa/isa_machdep.c:1.19	Sat Oct 27 17:17:37 2012
+++ src/sys/arch/arm/footbridge/isa/isa_machdep.c	Sun Nov 17 08:32:55 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: isa_machdep.c,v 1.19 2012/10/27 17:17:37 chs Exp $	*/
+/*	$NetBSD: isa_machdep.c,v 1.20 2013/11/17 08:32:55 skrll Exp $	*/
 
 /*-
  * Copyright (c) 1996-1998 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: isa_machdep.c,v 1.19 2012/10/27 17:17:37 chs Exp $);
+__KERNEL_RCSID(0, $NetBSD: isa_machdep.c,v 1.20 2013/11/17 08:32:55 skrll Exp $);
 
 #include opt_irqstats.h
 
@@ -429,7 +429,6 @@ isa_intr_disestablish(isa_chipset_tag_t 
 void
 isa_intr_init(void)
 {
-	static void *isa_ih;
  	struct intrq *iq;
  	int i;
  
@@ -452,7 +451,7 @@ isa_intr_init(void)
 #ifndef ISA_FOOTBRIDGE_IRQ 
 #warning Before using isa with footbridge you must define ISA_FOOTBRIDGE_IRQ
 #endif
-	isa_ih = footbridge_intr_claim(ISA_FOOTBRIDGE_IRQ, IPL_BIO, isabus,
+	footbridge_intr_claim(ISA_FOOTBRIDGE_IRQ, IPL_BIO, isabus,
 	isa_irqdispatch, NULL);
 	
 }



CVS commit: src/sys/arch/arm/footbridge

2013-11-17 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Nov 17 08:32:55 UTC 2013

Modified Files:
src/sys/arch/arm/footbridge: footbridge_com.c
src/sys/arch/arm/footbridge/isa: isa_machdep.c

Log Message:
Remove unused variables.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sys/arch/arm/footbridge/footbridge_com.c
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/arm/footbridge/isa/isa_machdep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/arm/footbridge

2012-10-11 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Oct 11 08:47:45 UTC 2012

Removed Files:
src/sys/arch/arm/footbridge: todclock.c todclockvar.h

Log Message:
Remove files not used since Sep 2006


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r0 src/sys/arch/arm/footbridge/todclock.c
cvs rdiff -u -r1.2 -r0 src/sys/arch/arm/footbridge/todclockvar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/arm/footbridge/isa

2012-10-11 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Oct 11 08:53:27 UTC 2012

Modified Files:
src/sys/arch/arm/footbridge/isa: dsrtc.c

Log Message:
Complete the device_t/softc split I attempted previously.

From chuq.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/arm/footbridge/isa/dsrtc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/footbridge/isa/dsrtc.c
diff -u src/sys/arch/arm/footbridge/isa/dsrtc.c:1.11 src/sys/arch/arm/footbridge/isa/dsrtc.c:1.12
--- src/sys/arch/arm/footbridge/isa/dsrtc.c:1.11	Tue Jul 21 07:35:55 2009
+++ src/sys/arch/arm/footbridge/isa/dsrtc.c	Thu Oct 11 08:53:27 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: dsrtc.c,v 1.11 2009/07/21 07:35:55 skrll Exp $	*/
+/*	$NetBSD: dsrtc.c,v 1.12 2012/10/11 08:53:27 skrll Exp $	*/
 
 /*
  * Copyright (c) 1998 Mark Brinicombe.
@@ -37,7 +37,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: dsrtc.c,v 1.11 2009/07/21 07:35:55 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: dsrtc.c,v 1.12 2012/10/11 08:53:27 skrll Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -53,14 +53,13 @@ __KERNEL_RCSID(0, $NetBSD: dsrtc.c,v 1.
 #define NRTC_PORTS	2
 
 struct dsrtc_softc {
-	struct device	sc_dev;
 	bus_space_tag_t	sc_iot;
 	bus_space_handle_t sc_ioh;
 	struct todr_chip_handle sc_todr;
 };
 
-void dsrtcattach(struct device *parent, struct device *self, void *aux);
-int dsrtcmatch(struct device *parent, struct cfdata *cf, void *aux);
+void dsrtcattach(device_t parent, device_t self, void *aux);
+int dsrtcmatch(device_t parent, cfdata_t cf, void *aux);
 int ds1687_read(struct dsrtc_softc *sc, int addr);
 void ds1687_write(struct dsrtc_softc *sc, int addr, int data);
 #if 0



CVS commit: src/sys/arch/arm/footbridge

2012-10-11 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Oct 11 08:47:45 UTC 2012

Removed Files:
src/sys/arch/arm/footbridge: todclock.c todclockvar.h

Log Message:
Remove files not used since Sep 2006


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r0 src/sys/arch/arm/footbridge/todclock.c
cvs rdiff -u -r1.2 -r0 src/sys/arch/arm/footbridge/todclockvar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/arm/footbridge/isa

2012-10-11 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Oct 11 08:53:27 UTC 2012

Modified Files:
src/sys/arch/arm/footbridge/isa: dsrtc.c

Log Message:
Complete the device_t/softc split I attempted previously.

From chuq.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/arm/footbridge/isa/dsrtc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/arm/footbridge

2012-10-10 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Oct 10 21:53:09 UTC 2012

Modified Files:
src/sys/arch/arm/footbridge: footbridge.c footbridge_com.c

Log Message:
Update comments to reflect the real function prototypes.

From chuq.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/arm/footbridge/footbridge.c
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/arm/footbridge/footbridge_com.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/footbridge/footbridge.c
diff -u src/sys/arch/arm/footbridge/footbridge.c:1.25 src/sys/arch/arm/footbridge/footbridge.c:1.26
--- src/sys/arch/arm/footbridge/footbridge.c:1.25	Fri Jul  1 19:32:28 2011
+++ src/sys/arch/arm/footbridge/footbridge.c	Wed Oct 10 21:53:09 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: footbridge.c,v 1.25 2011/07/01 19:32:28 dyoung Exp $	*/
+/*	$NetBSD: footbridge.c,v 1.26 2012/10/10 21:53:09 skrll Exp $	*/
 
 /*
  * Copyright (c) 1997,1998 Mark Brinicombe.
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: footbridge.c,v 1.25 2011/07/01 19:32:28 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: footbridge.c,v 1.26 2012/10/10 21:53:09 skrll Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -123,7 +123,7 @@ footbridge_print(void *aux, const char *
 }
 
 /*
- * int footbridge_match(struct device *parent, struct cfdata *cf, void *aux)
+ * int footbridge_match(device_t parent, cfdata_t cf, void *aux)
  *
  * Just return ok for this if it is device 0
  */ 

Index: src/sys/arch/arm/footbridge/footbridge_com.c
diff -u src/sys/arch/arm/footbridge/footbridge_com.c:1.34 src/sys/arch/arm/footbridge/footbridge_com.c:1.35
--- src/sys/arch/arm/footbridge/footbridge_com.c:1.34	Fri Jul  1 19:32:28 2011
+++ src/sys/arch/arm/footbridge/footbridge_com.c	Wed Oct 10 21:53:09 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: footbridge_com.c,v 1.34 2011/07/01 19:32:28 dyoung Exp $	*/
+/*	$NetBSD: footbridge_com.c,v 1.35 2012/10/10 21:53:09 skrll Exp $	*/
 
 /*-
  * Copyright (c) 1997 Mark Brinicombe
@@ -36,7 +36,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: footbridge_com.c,v 1.34 2011/07/01 19:32:28 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: footbridge_com.c,v 1.35 2012/10/10 21:53:09 skrll Exp $);
 
 #include opt_ddb.h
 #include opt_ddbparam.h
@@ -154,7 +154,7 @@ extern int comcnspeed;
 extern struct bus_space fcomcons_bs_tag;
 
 /*
- * int fcom_probe(struct device *parent, struct cfdata *cf, void *aux)
+ * int fcom_probe(device_t parent, cfdata_t cf, void *aux)
  *
  * Make sure we are trying to attach a com device and then
  * probe for one.



CVS commit: src/sys/arch/arm/footbridge

2012-10-10 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Oct 10 21:53:09 UTC 2012

Modified Files:
src/sys/arch/arm/footbridge: footbridge.c footbridge_com.c

Log Message:
Update comments to reflect the real function prototypes.

From chuq.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/arm/footbridge/footbridge.c
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/arm/footbridge/footbridge_com.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/arm/footbridge

2010-11-21 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon Nov 22 07:27:29 UTC 2010

Modified Files:
src/sys/arch/arm/footbridge: footbridge_io.c

Log Message:
Fix thinko in previous.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/arm/footbridge/footbridge_io.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/footbridge/footbridge_io.c
diff -u src/sys/arch/arm/footbridge/footbridge_io.c:1.18 src/sys/arch/arm/footbridge/footbridge_io.c:1.19
--- src/sys/arch/arm/footbridge/footbridge_io.c:1.18	Thu Nov 18 18:12:23 2010
+++ src/sys/arch/arm/footbridge/footbridge_io.c	Mon Nov 22 07:27:28 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: footbridge_io.c,v 1.18 2010/11/18 18:12:23 skrll Exp $	*/
+/*	$NetBSD: footbridge_io.c,v 1.19 2010/11/22 07:27:28 skrll Exp $	*/
 
 /*
  * Copyright (c) 1997 Causality Limited
@@ -39,7 +39,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: footbridge_io.c,v 1.18 2010/11/18 18:12:23 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: footbridge_io.c,v 1.19 2010/11/22 07:27:28 skrll Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -318,7 +318,7 @@
 	offset = DC21285_PCI_IO_SIZE)
 		return -1;
 
-	pa = PCI_MAGIC_IO_RANGE + addr + offset;
+	pa = DC21285_PCI_IO_BASE + addr + offset;
 
 	return arm_btop(pa);
 }



CVS commit: src/sys/arch/arm/footbridge

2010-11-21 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon Nov 22 07:27:29 UTC 2010

Modified Files:
src/sys/arch/arm/footbridge: footbridge_io.c

Log Message:
Fix thinko in previous.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/arm/footbridge/footbridge_io.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/arm/footbridge

2010-11-18 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Nov 18 18:00:41 UTC 2010

Modified Files:
src/sys/arch/arm/footbridge: footbridge.c

Log Message:
Remove commented out setting of SDRAM_MEMORY_ADDR - it's set later on.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/arm/footbridge/footbridge.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/footbridge/footbridge.c
diff -u src/sys/arch/arm/footbridge/footbridge.c:1.21 src/sys/arch/arm/footbridge/footbridge.c:1.22
--- src/sys/arch/arm/footbridge/footbridge.c:1.21	Tue Jul 21 07:35:55 2009
+++ src/sys/arch/arm/footbridge/footbridge.c	Thu Nov 18 18:00:40 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: footbridge.c,v 1.21 2009/07/21 07:35:55 skrll Exp $	*/
+/*	$NetBSD: footbridge.c,v 1.22 2010/11/18 18:00:40 skrll Exp $	*/
 
 /*
  * Copyright (c) 1997,1998 Mark Brinicombe.
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: footbridge.c,v 1.21 2009/07/21 07:35:55 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: footbridge.c,v 1.22 2010/11/18 18:00:40 skrll Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -175,8 +175,6 @@
 	bus_space_write_4(sc-sc_iot, sc-sc_ioh, IRQ_ENABLE_CLEAR, 0x);
 	bus_space_write_4(sc-sc_iot, sc-sc_ioh, FIQ_ENABLE_CLEAR, 0x);
 
-/*	bus_space_write_4(sc-sc_iot, sc-sc_ioh, 0x18, 0x4000);*/
-
 	/* Install a generic handler to catch a load of system interrupts */
 	sc-sc_serr_ih = footbridge_intr_claim(IRQ_SERR, IPL_HIGH,
 	serr, footbridge_intr, sc);



CVS commit: src/sys/arch/arm/footbridge

2010-11-18 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Nov 18 18:06:21 UTC 2010

Modified Files:
src/sys/arch/arm/footbridge: footbridge_io.c

Log Message:
Whitespace.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/arm/footbridge/footbridge_io.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/footbridge/footbridge_io.c
diff -u src/sys/arch/arm/footbridge/footbridge_io.c:1.16 src/sys/arch/arm/footbridge/footbridge_io.c:1.17
--- src/sys/arch/arm/footbridge/footbridge_io.c:1.16	Tue Dec 15 21:38:20 2009
+++ src/sys/arch/arm/footbridge/footbridge_io.c	Thu Nov 18 18:06:21 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: footbridge_io.c,v 1.16 2009/12/15 21:38:20 skrll Exp $	*/
+/*	$NetBSD: footbridge_io.c,v 1.17 2010/11/18 18:06:21 skrll Exp $	*/
 
 /*
  * Copyright (c) 1997 Causality Limited
@@ -39,7 +39,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: footbridge_io.c,v 1.16 2009/12/15 21:38:20 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: footbridge_io.c,v 1.17 2010/11/18 18:06:21 skrll Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -210,17 +210,16 @@
 
 	/* Now map the pages */
 	/* The cookie is the physical base address for the I/O area */
-for (pa = startpa; pa  endpa; pa+=PAGE_SIZE, va += PAGE_SIZE) 
-{
-pmap_enter(pmap_kernel(), va, (bus_addr_t)t + pa, VM_PROT_READ | VM_PROT_WRITE,
-VM_PROT_READ | VM_PROT_WRITE| PMAP_WIRED);
-if ((flags  BUS_SPACE_MAP_CACHEABLE) == 0) {
-pt_entry_t *pte;	
-pte = vtopte(va);
-*pte = ~L2_S_CACHE_MASK;
-PTE_SYNC(pte);
-}
-}
+	for (pa = startpa; pa  endpa; pa+=PAGE_SIZE, va += PAGE_SIZE) {
+		pmap_enter(pmap_kernel(), va, (bus_addr_t)t + pa, VM_PROT_READ | VM_PROT_WRITE,
+		VM_PROT_READ | VM_PROT_WRITE| PMAP_WIRED);
+		if ((flags  BUS_SPACE_MAP_CACHEABLE) == 0) {
+			pt_entry_t *pte;	
+			pte = vtopte(va);
+			*pte = ~L2_S_CACHE_MASK;
+			PTE_SYNC(pte);
+		}
+	}
 	pmap_update(pmap_kernel());
 
 /*	if (bpa = DC21285_PCI_MEM_VSIZE  bpa != DC21285_ARMCSR_VBASE)



CVS commit: src/sys/arch/arm/footbridge

2010-11-18 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Nov 18 18:12:23 UTC 2010

Modified Files:
src/sys/arch/arm/footbridge: footbridge_io.c

Log Message:
Implement footbridge_io_bs_mmap.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/arm/footbridge/footbridge_io.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/footbridge/footbridge_io.c
diff -u src/sys/arch/arm/footbridge/footbridge_io.c:1.17 src/sys/arch/arm/footbridge/footbridge_io.c:1.18
--- src/sys/arch/arm/footbridge/footbridge_io.c:1.17	Thu Nov 18 18:06:21 2010
+++ src/sys/arch/arm/footbridge/footbridge_io.c	Thu Nov 18 18:12:23 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: footbridge_io.c,v 1.17 2010/11/18 18:06:21 skrll Exp $	*/
+/*	$NetBSD: footbridge_io.c,v 1.18 2010/11/18 18:12:23 skrll Exp $	*/
 
 /*
  * Copyright (c) 1997 Causality Limited
@@ -39,7 +39,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: footbridge_io.c,v 1.17 2010/11/18 18:06:21 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: footbridge_io.c,v 1.18 2010/11/18 18:12:23 skrll Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -56,6 +56,7 @@
 bs_protos(bs_notimpl);
 bs_map_proto(footbridge_mem);
 bs_unmap_proto(footbridge_mem);
+bs_mmap_proto(footbridge_io);
 bs_mmap_proto(footbridge_mem);
 
 /* Declare the footbridge bus space tag */
@@ -143,6 +144,7 @@
 {
 	*t = footbridge_bs_tag;
 	t-bs_cookie = cookie;
+	t-bs_mmap = footbridge_io_bs_mmap;
 }
 
 void footbridge_create_mem_bs_tag(t, cookie)
@@ -304,6 +306,25 @@
 
 
 paddr_t
+footbridge_io_bs_mmap(void *t, bus_addr_t addr, off_t offset,
+		   int prot, int flags)
+{
+	paddr_t pa;
+
+	/* allow mapping of IO space */
+	if (addr = DC21285_PCI_IO_SIZE ||
+	addr = DC21285_PCI_IO_SIZE - offset ||
+	offset  0 ||
+	offset = DC21285_PCI_IO_SIZE)
+		return -1;
+
+	pa = PCI_MAGIC_IO_RANGE + addr + offset;
+
+	return arm_btop(pa);
+}
+
+
+paddr_t
 footbridge_mem_bs_mmap(void *t, bus_addr_t addr, off_t offset,
 		   int prot, int flags)
 {



CVS commit: src/sys/arch/arm/footbridge

2010-11-18 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Nov 18 18:00:41 UTC 2010

Modified Files:
src/sys/arch/arm/footbridge: footbridge.c

Log Message:
Remove commented out setting of SDRAM_MEMORY_ADDR - it's set later on.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/arm/footbridge/footbridge.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/arm/footbridge

2010-11-18 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Nov 18 18:01:20 UTC 2010

Modified Files:
src/sys/arch/arm/footbridge: footbridge.c

Log Message:
Comment KNF.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/arm/footbridge/footbridge.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/arm/footbridge

2010-11-18 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Nov 18 18:12:23 UTC 2010

Modified Files:
src/sys/arch/arm/footbridge: footbridge_io.c

Log Message:
Implement footbridge_io_bs_mmap.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/arm/footbridge/footbridge_io.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/arm/footbridge

2009-12-15 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Dec 15 21:38:20 UTC 2009

Modified Files:
src/sys/arch/arm/footbridge: footbridge_io.c

Log Message:
Fix ancient bug. footbridge_mem_bs_mmap should return a page number.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/arm/footbridge/footbridge_io.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/footbridge/footbridge_io.c
diff -u src/sys/arch/arm/footbridge/footbridge_io.c:1.15 src/sys/arch/arm/footbridge/footbridge_io.c:1.16
--- src/sys/arch/arm/footbridge/footbridge_io.c:1.15	Sat Mar 14 21:04:05 2009
+++ src/sys/arch/arm/footbridge/footbridge_io.c	Tue Dec 15 21:38:20 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: footbridge_io.c,v 1.15 2009/03/14 21:04:05 dsl Exp $	*/
+/*	$NetBSD: footbridge_io.c,v 1.16 2009/12/15 21:38:20 skrll Exp $	*/
 
 /*
  * Copyright (c) 1997 Causality Limited
@@ -39,7 +39,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: footbridge_io.c,v 1.15 2009/03/14 21:04:05 dsl Exp $);
+__KERNEL_RCSID(0, $NetBSD: footbridge_io.c,v 1.16 2009/12/15 21:38:20 skrll Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -318,5 +318,5 @@
 
 	pa = DC21285_PCI_MEM_BASE + addr + offset;
 
-	return arm_ptob(pa);
+	return arm_btop(pa);
 }



CVS commit: src/sys/arch/arm/footbridge/isa

2009-08-20 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Thu Aug 20 12:51:28 UTC 2009

Modified Files:
src/sys/arch/arm/footbridge/isa: isa_machdep.c

Log Message:
Typo correction: it's isa_dmadestroy(), not isa_dma_destroy(), apparently.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/arm/footbridge/isa/isa_machdep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/footbridge/isa/isa_machdep.c
diff -u src/sys/arch/arm/footbridge/isa/isa_machdep.c:1.15 src/sys/arch/arm/footbridge/isa/isa_machdep.c:1.16
--- src/sys/arch/arm/footbridge/isa/isa_machdep.c:1.15	Wed Aug 19 15:01:07 2009
+++ src/sys/arch/arm/footbridge/isa/isa_machdep.c	Thu Aug 20 12:51:28 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: isa_machdep.c,v 1.15 2009/08/19 15:01:07 dyoung Exp $	*/
+/*	$NetBSD: isa_machdep.c,v 1.16 2009/08/20 12:51:28 he Exp $	*/
 
 /*-
  * Copyright (c) 1996-1998 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: isa_machdep.c,v 1.15 2009/08/19 15:01:07 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: isa_machdep.c,v 1.16 2009/08/20 12:51:28 he Exp $);
 
 #include opt_irqstats.h
 
@@ -504,7 +504,7 @@
 isa_detach_hook(isa_chipset_tag_t ic, device_t self)
 {
 #if NISADMA  0
-	isa_dma_destroy();
+	isa_dmadestroy(ic);
 #endif
 }
 



CVS commit: src/sys/arch/arm/footbridge

2009-07-21 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Jul 21 07:35:55 UTC 2009

Modified Files:
src/sys/arch/arm/footbridge: footbridge.c footbridge_clock.c
footbridge_com.c footbridgevar.h todclock.c
src/sys/arch/arm/footbridge/isa: dsrtc.c sysbeep_isa.c

Log Message:
device_t/softc split
CFATTACH_DECL - CFATTACH_DECL_NEW
struct device * - device_t
struct cfdata * - cfdata_t
Use aprint*


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/arm/footbridge/footbridge.c
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/arm/footbridge/footbridge_clock.c
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/arm/footbridge/footbridge_com.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/footbridge/footbridgevar.h
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/arm/footbridge/todclock.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arm/footbridge/isa/dsrtc.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/footbridge/isa/sysbeep_isa.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/footbridge/footbridge.c
diff -u src/sys/arch/arm/footbridge/footbridge.c:1.20 src/sys/arch/arm/footbridge/footbridge.c:1.21
--- src/sys/arch/arm/footbridge/footbridge.c:1.20	Sat Mar 14 15:36:02 2009
+++ src/sys/arch/arm/footbridge/footbridge.c	Tue Jul 21 07:35:55 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: footbridge.c,v 1.20 2009/03/14 15:36:02 dsl Exp $	*/
+/*	$NetBSD: footbridge.c,v 1.21 2009/07/21 07:35:55 skrll Exp $	*/
 
 /*
  * Copyright (c) 1997,1998 Mark Brinicombe.
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: footbridge.c,v 1.20 2009/03/14 15:36:02 dsl Exp $);
+__KERNEL_RCSID(0, $NetBSD: footbridge.c,v 1.21 2009/07/21 07:35:55 skrll Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -68,15 +68,13 @@
 
 /* Declare prototypes */
 
-static int footbridge_match(struct device *parent, struct cfdata *cf,
-	 void *aux);
-static void footbridge_attach(struct device *parent, struct device *self,
-	 void *aux);
+static int footbridge_match(device_t parent, cfdata_t cf, void *aux);
+static void footbridge_attach(device_t parent, device_t self, void *aux);
 static int footbridge_print(void *aux, const char *pnp);
 static int footbridge_intr(void *arg);
 
 /* Driver and attach structures */
-CFATTACH_DECL(footbridge, sizeof(struct footbridge_softc),
+CFATTACH_DECL_NEW(footbridge, sizeof(struct footbridge_softc),
 footbridge_match, footbridge_attach, NULL, NULL);
 
 /* Various bus space tags */
@@ -109,7 +107,7 @@
 }
 
 /*
- * int footbridgeprint(void *aux, const char *name)
+ * int footbridge_print(void *aux, const char *name)
  *
  * print configuration info for children
  */
@@ -131,7 +129,7 @@
  */ 
  
 static int
-footbridge_match(struct device *parent, struct cfdata *cf, void *aux)
+footbridge_match(device_t parent, cfdata_t cf, void *aux)
 {
 	if (footbridge_found)
 		return(0);
@@ -140,14 +138,14 @@
 
 
 /*
- * void footbridge_attach(struct device *parent, struct device *dev, void *aux)
+ * void footbridge_attach(device_t parent, device_t dev, void *aux)
  *
  */
   
 static void
-footbridge_attach(struct device *parent, struct device *self, void *aux)
+footbridge_attach(device_t parent, device_t self, void *aux)
 {
-	struct footbridge_softc *sc = (struct footbridge_softc *)self;
+	struct footbridge_softc *sc = device_private(self);
 	union footbridge_attach_args fba;
 	int vendor, device, rev;
 
@@ -156,21 +154,22 @@
 
 	clock_sc = sc;
 
+	sc-sc_dev = self;
 	sc-sc_iot = footbridge_bs_tag;
 
 	/* Map the Footbridge */
 	if (bus_space_map(sc-sc_iot, DC21285_ARMCSR_VBASE,
 	 DC21285_ARMCSR_VSIZE, 0, sc-sc_ioh))
-		panic(%s: Cannot map registers, self-dv_xname);
+		panic(%s: Cannot map registers, device_xname(self));
 
 	/* Read the ID to make sure it is what we think it is */
 	vendor = bus_space_read_2(sc-sc_iot, sc-sc_ioh, VENDOR_ID);
 	device = bus_space_read_2(sc-sc_iot, sc-sc_ioh, DEVICE_ID);
 	rev = bus_space_read_1(sc-sc_iot, sc-sc_ioh, REVISION);
 	if (vendor != DC21285_VENDOR_ID  device != DC21285_DEVICE_ID)
-		panic(%s: Unrecognised ID, self-dv_xname);
+		panic(%s: Unrecognised ID, device_xname(self));
 
-	printf(: DC21285 rev %d\n, rev);
+	aprint_normal(: DC21285 rev %d\n, rev);
 
 	/* Disable all interrupts from the footbridge */
 	bus_space_write_4(sc-sc_iot, sc-sc_ioh, IRQ_ENABLE_CLEAR, 0x);

Index: src/sys/arch/arm/footbridge/footbridge_clock.c
diff -u src/sys/arch/arm/footbridge/footbridge_clock.c:1.25 src/sys/arch/arm/footbridge/footbridge_clock.c:1.26
--- src/sys/arch/arm/footbridge/footbridge_clock.c:1.25	Sat Sep 20 14:53:37 2008
+++ src/sys/arch/arm/footbridge/footbridge_clock.c	Tue Jul 21 07:35:55 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: footbridge_clock.c,v 1.25 2008/09/20 14:53:37 chris Exp $	*/
+/*	$NetBSD: footbridge_clock.c,v 1.26 2009/07/21 07:35:55 skrll Exp $	*/
 
 /*
  * Copyright (c) 1997 Mark 

CVS commit: src/sys/arch/arm/footbridge

2009-06-17 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Jun 17 06:27:05 UTC 2009

Modified Files:
src/sys/arch/arm/footbridge: footbridge_irqhandler.c

Log Message:
Remove incorrect KASSERT.

footbridge_intr_calculate_masks is called multiple times and the KASSERT
isn't valid in (at least) the first call.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 \
src/sys/arch/arm/footbridge/footbridge_irqhandler.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/footbridge/footbridge_irqhandler.c
diff -u src/sys/arch/arm/footbridge/footbridge_irqhandler.c:1.21 src/sys/arch/arm/footbridge/footbridge_irqhandler.c:1.22
--- src/sys/arch/arm/footbridge/footbridge_irqhandler.c:1.21	Sun Apr 27 18:58:44 2008
+++ src/sys/arch/arm/footbridge/footbridge_irqhandler.c	Wed Jun 17 06:27:05 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: footbridge_irqhandler.c,v 1.21 2008/04/27 18:58:44 matt Exp $	*/
+/*	$NetBSD: footbridge_irqhandler.c,v 1.22 2009/06/17 06:27:05 skrll Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002 Wasabi Systems, Inc.
@@ -40,7 +40,7 @@
 #endif
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0,$NetBSD: footbridge_irqhandler.c,v 1.21 2008/04/27 18:58:44 matt Exp $);
+__KERNEL_RCSID(0,$NetBSD: footbridge_irqhandler.c,v 1.22 2009/06/17 06:27:05 skrll Exp $);
 
 #include opt_irqstats.h
 
@@ -146,7 +146,6 @@
 	 * limited input buffer space/real-time requirements) a better
 	 * chance at not dropping data.
 	 */
-	KASSERT(footbridge_imask[IPL_VM] != 0);
 	footbridge_imask[IPL_SCHED] |= footbridge_imask[IPL_VM];
 	footbridge_imask[IPL_HIGH] |= footbridge_imask[IPL_SCHED];