CVS commit: src/sys/arch/evbarm/lubbock

2013-08-12 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Aug 12 21:17:03 UTC 2013

Modified Files:
src/sys/arch/evbarm/lubbock: sm_obio_space_asm.S

Log Message:
use RET/RETc
use unified syntax


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/evbarm/lubbock/sm_obio_space_asm.S

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/evbarm/lubbock/sm_obio_space_asm.S
diff -u src/sys/arch/evbarm/lubbock/sm_obio_space_asm.S:1.4 src/sys/arch/evbarm/lubbock/sm_obio_space_asm.S:1.5
--- src/sys/arch/evbarm/lubbock/sm_obio_space_asm.S:1.4	Sun Dec 11 12:17:09 2005
+++ src/sys/arch/evbarm/lubbock/sm_obio_space_asm.S	Mon Aug 12 21:17:03 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: sm_obio_space_asm.S,v 1.4 2005/12/11 12:17:09 christos Exp $ */
+/*	$NetBSD: sm_obio_space_asm.S,v 1.5 2013/08/12 21:17:03 matt Exp $ */
 
 /*
  * Copyright (c) 2002, 2003  Genetec Corporation.  All rights reserved.
@@ -36,7 +36,7 @@
 
 #include machine/asm.h
 
-RCSID($NetBSD: sm_obio_space_asm.S,v 1.4 2005/12/11 12:17:09 christos Exp $)
+RCSID($NetBSD: sm_obio_space_asm.S,v 1.5 2013/08/12 21:17:03 matt Exp $)
 
 /*
  * bus_space I/O functions with offset*4, 8-bit access.
@@ -51,7 +51,8 @@ ENTRY(smobio8_bs_r_2)
 	ldrb	r0, [r1], #4
 	ldrb	r2, [r1]
 	orr	r0, r0, r2, LSL #8
-	mov	pc, lr
+	RET
+END(smobio8_bs_r_2)
 
 /*
  * write single
@@ -62,7 +63,8 @@ ENTRY(smobio8_bs_w_2)
 	strb	r3, [r1], #4
 	mov	r3, r3, LSR #8
 	strb	r3, [r1]
-	mov	pc, lr
+	RET
+END(smobio8_bs_w_2)
 
 /*
  * read multiple
@@ -71,9 +73,8 @@ ENTRY(smobio8_bs_rm_2)
 	add	r0, r1, r2, LSL #2
 	ldr	r2, [sp, #0]
 	cmp r2, #0x
-	movle   pc, lr
+	RETc(le)
 
-	stmfd	sp!, {lr}
 Lbs_rm_2_loop:
 	ldrb	r1, [r0]
 	ldrb	lr, [r0, #4]
@@ -82,7 +83,8 @@ Lbs_rm_2_loop:
 	strh	r1, [r3], #0x0002
 	bgt	Lbs_rm_2_loop
 
-	ldmfd	sp!, {pc}
+	RET
+END(smobio8_bs_rm_2)
 
 
 
@@ -93,7 +95,7 @@ ENTRY(smobio8_bs_wm_2)
 	add	r0, r1, r2, LSL #2
 	ldr	r2, [sp, #0]
 	cmp r2, #0x
-	movle   pc, lr
+	RETc(le)
 
 Lbs_wm_2_loop:
 	ldrh	r1, [r3], #0x0002
@@ -103,7 +105,8 @@ Lbs_wm_2_loop:
 	strb	r1, [r0,#4]
 	bgt	Lbs_wm_2_loop
 
-	mov	pc, lr
+	RET
+END(smobio8_bs_wm_2)
 
 
 /*
@@ -116,15 +119,16 @@ Lbs_wm_2_loop:
 
 ENTRY(smobio16_bs_r_1)
 	tst	r2, #1/* Even/Odd ? */
-	ldreqb	r0, [r1, r2, LSL #2]
-	moveq	pc,lr
+	ldrbeq	r0, [r1, r2, LSL #2]
+	RETc(eq)
 
 	/* Odd byte.  read 16bits and get high byte */
 	bic	r2, r2, #1
 	add	r1, r1, r2, LSL #2
 	ldrh	r0, [r1]
 	mov	r0, r0, LSR #8
-	mov	pc, lr
+	RET
+END(smobio16_bs_r_1)
 
 
 /*
@@ -133,12 +137,13 @@ ENTRY(smobio16_bs_r_1)
 
 ENTRY(smobio16_bs_w_1)
 	tst	r2, #1/* Even/Odd ? */
-	streqb	r3, [r1, r2, LSL #2]
-	moveq	pc,lr
+	strbeq	r3, [r1, r2, LSL #2]
+	RETc(eq)
 
 	/* Odd byte.  write 16bit with low byte is 0. */
 	bic	r2, r2, #1
 	mov	r3, r3, LSL #8
 	add	r1, r1, r2, LSL #2
 	strh	r3, [r1]
-	mov	pc, lr
+	RET
+END(smobio16_bs_w_1)



CVS commit: src/sys/arch/evbarm/lubbock

2010-03-13 Thread Hiroyuki Bessho
Module Name:src
Committed By:   bsh
Date:   Sat Mar 13 10:55:10 UTC 2010

Modified Files:
src/sys/arch/evbarm/lubbock: sacc_obio.c

Log Message:
pass correct atttach args to sacc_probe()


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/evbarm/lubbock/sacc_obio.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/evbarm/lubbock/sacc_obio.c
diff -u src/sys/arch/evbarm/lubbock/sacc_obio.c:1.10 src/sys/arch/evbarm/lubbock/sacc_obio.c:1.11
--- src/sys/arch/evbarm/lubbock/sacc_obio.c:1.10	Fri May 29 14:15:44 2009
+++ src/sys/arch/evbarm/lubbock/sacc_obio.c	Sat Mar 13 10:55:09 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: sacc_obio.c,v 1.10 2009/05/29 14:15:44 rjs Exp $ */
+/*	$NetBSD: sacc_obio.c,v 1.11 2010/03/13 10:55:09 bsh Exp $ */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: sacc_obio.c,v 1.10 2009/05/29 14:15:44 rjs Exp $);
+__KERNEL_RCSID(0, $NetBSD: sacc_obio.c,v 1.11 2010/03/13 10:55:09 bsh Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -65,10 +65,11 @@
 #include evbarm/lubbock/lubbock_var.h
 
 
+static	int	sacc_obio_probe(device_t parent, cfdata_t match, void *aux);
 static	void	sacc_obio_attach(device_t, device_t, void *);
 static	int  sacc_obio_intr(void *arg);
 
-CFATTACH_DECL_NEW(sacc_obio, sizeof(struct sacc_softc), sacc_probe, 
+CFATTACH_DECL_NEW(sacc_obio, sizeof(struct sacc_softc), sacc_obio_probe, 
 sacc_obio_attach, NULL, NULL);
 
 #if 0
@@ -79,6 +80,22 @@
 
 uint16_t cs2_memctl_init = 0x7ff0;
 
+static int
+sacc_obio_probe(device_t parent, cfdata_t match, void *aux)
+{
+	struct obio_attach_args *oa = aux;
+	struct sa11x0_attach_args sa;
+
+	printf(%s: addr=%lx\n, __func__, oa-oba_addr);
+
+	sa.sa_sc = oa-oba_sc;
+	sa.sa_iot = oa-oba_iot;
+	sa.sa_addr = oa-oba_addr;
+	sa.sa_size = 0x2000;
+
+	return sacc_probe(parent, match, sa);
+}
+
 static void
 sacc_obio_attach(device_t parent, device_t self, void *aux)
 {