CVS commit: src/share/man/man9/man9.x86
Module Name:src Committed By: jruoho Date: Thu Mar 17 10:02:54 UTC 2011 Modified Files: src/share/man/man9/man9.x86: nmi.9 Log Message: Remove the bulk this section describes places within [...] -paragraph. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/share/man/man9/man9.x86/nmi.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/man9.x86/nmi.9 diff -u src/share/man/man9/man9.x86/nmi.9:1.2 src/share/man/man9/man9.x86/nmi.9:1.3 --- src/share/man/man9/man9.x86/nmi.9:1.2 Sat Aug 21 10:38:51 2010 +++ src/share/man/man9/man9.x86/nmi.9 Thu Mar 17 10:02:54 2011 @@ -1,4 +1,4 @@ -.\ $NetBSD: nmi.9,v 1.2 2010/08/21 10:38:51 wiz Exp $ +.\ $NetBSD: nmi.9,v 1.3 2011/03/17 10:02:54 jruoho Exp $ .\ .\ Copyright (c) 2010 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -27,7 +27,7 @@ .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\ POSSIBILITY OF SUCH DAMAGE. .\ -.Dd February 9, 2010 +.Dd March 17, 2011 .Dt NMI 9 x86 .Os .Sh NAME @@ -115,15 +115,6 @@ .Fn nmi_establish . .El .Sh CODE REFERENCES -This section describes places within the -.Nx -source tree where actual code implementing the -.Nm -interface -can be found. -All pathnames are relative to -.Pa /usr/src . -.Pp The .Nm interface is implemented within the file
CVS commit: src/sys/arch/x68k/conf
Module Name:src Committed By: tsutsui Date: Thu Mar 17 13:25:54 UTC 2011 Modified Files: src/sys/arch/x68k/conf: files.x68k Log Message: Include files.ata for atapibus at umass. To generate a diff of this commit: cvs rdiff -u -r1.71 -r1.72 src/sys/arch/x68k/conf/files.x68k 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/x68k/conf/files.x68k diff -u src/sys/arch/x68k/conf/files.x68k:1.71 src/sys/arch/x68k/conf/files.x68k:1.72 --- src/sys/arch/x68k/conf/files.x68k:1.71 Sun Jun 6 04:52:01 2010 +++ src/sys/arch/x68k/conf/files.x68k Thu Mar 17 13:25:54 2011 @@ -1,4 +1,4 @@ -# $NetBSD: files.x68k,v 1.71 2010/06/06 04:52:01 mrg Exp $ +# $NetBSD: files.x68k,v 1.72 2011/03/17 13:25:54 tsutsui Exp $ # # new style config file for x68k architecture # @@ -211,4 +211,7 @@ # USB support include dev/usb/files.usb +# ATA and ATAPI support +include dev/ata/files.ata + include arch/x68k/conf/majors.x68k
CVS commit: src/sys/arch/x68k/conf
Module Name:src Committed By: tsutsui Date: Thu Mar 17 13:26:51 UTC 2011 Modified Files: src/sys/arch/x68k/conf: GENERIC Log Message: umass doesn't take channel. To generate a diff of this commit: cvs rdiff -u -r1.154 -r1.155 src/sys/arch/x68k/conf/GENERIC 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/x68k/conf/GENERIC diff -u src/sys/arch/x68k/conf/GENERIC:1.154 src/sys/arch/x68k/conf/GENERIC:1.155 --- src/sys/arch/x68k/conf/GENERIC:1.154 Sun Mar 6 17:08:33 2011 +++ src/sys/arch/x68k/conf/GENERIC Thu Mar 17 13:26:51 2011 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.154 2011/03/06 17:08:33 bouyer Exp $ +# $NetBSD: GENERIC,v 1.155 2011/03/17 13:26:51 tsutsui Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident GENERIC-$Revision: 1.154 $ +#ident GENERIC-$Revision: 1.155 $ maxusers 8 @@ -353,8 +353,8 @@ # USB Mass Storage; wd not supported #umass* at uhub? port ? configuration ? interface ? -#atapibus* at umass? channel ? -#scsibus* at umass? channel ? +#atapibus* at umass? +#scsibus* at umass? #wd* at umass? # USB audio
CVS commit: src/lib/libc/gen
Module Name:src Committed By: wiz Date: Thu Mar 17 14:06:30 UTC 2011 Modified Files: src/lib/libc/gen: unvis.3 Log Message: Fix SYNOPSIS. Error found by martin. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/lib/libc/gen/unvis.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/gen/unvis.3 diff -u src/lib/libc/gen/unvis.3:1.22 src/lib/libc/gen/unvis.3:1.23 --- src/lib/libc/gen/unvis.3:1.22 Sun Mar 13 09:11:54 2011 +++ src/lib/libc/gen/unvis.3 Thu Mar 17 14:06:29 2011 @@ -1,4 +1,4 @@ -.\ $NetBSD: unvis.3,v 1.22 2011/03/13 09:11:54 wiz Exp $ +.\ $NetBSD: unvis.3,v 1.23 2011/03/17 14:06:29 wiz Exp $ .\ .\ Copyright (c) 1989, 1991, 1993 .\ The Regents of the University of California. All rights reserved. @@ -45,11 +45,11 @@ .Ft int .Fn strunvis char *dst const char *src .Ft int -.Fn strnunvis char *dst size_t dlen, const char *src +.Fn strnunvis char *dst size_t dlen const char *src .Ft int .Fn strunvisx char *dst const char *src int flag .Ft int -.Fn strnunvisx char *dst size_t dlen, const char *src int flag +.Fn strnunvisx char *dst size_t dlen const char *src int flag .Sh DESCRIPTION The .Fn unvis ,
CVS commit: src/crypto/dist/ipsec-tools/src/racoon
Module Name:src Committed By: vanhu Date: Thu Mar 17 14:35:24 UTC 2011 Modified Files: src/crypto/dist/ipsec-tools/src/racoon: oakley.c Log Message: fixed a memory leak in oakley_check_certid(). patch by Roman Hoog Antink r...@open.ch To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/crypto/dist/ipsec-tools/src/racoon/oakley.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/dist/ipsec-tools/src/racoon/oakley.c diff -u src/crypto/dist/ipsec-tools/src/racoon/oakley.c:1.19 src/crypto/dist/ipsec-tools/src/racoon/oakley.c:1.20 --- src/crypto/dist/ipsec-tools/src/racoon/oakley.c:1.19 Sun Feb 20 17:32:02 2011 +++ src/crypto/dist/ipsec-tools/src/racoon/oakley.c Thu Mar 17 14:35:24 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: oakley.c,v 1.19 2011/02/20 17:32:02 tteras Exp $ */ +/* $NetBSD: oakley.c,v 1.20 2011/03/17 14:35:24 vanhu Exp $ */ /* Id: oakley.c,v 1.32 2006/05/26 12:19:46 manubsd Exp */ @@ -1862,10 +1862,11 @@ hints.ai_socktype = SOCK_RAW; hints.ai_flags = AI_NUMERICHOST; error = getaddrinfo(altname, NULL, hints, res); + racoon_free(altname); + altname = NULL; if (error != 0) { plog(LLV_ERROR, LOCATION, NULL, no proper subjectAltName.\n); - racoon_free(altname); return ISAKMP_NTYPE_INVALID_CERTIFICATE; } switch (res-ai_family) { @@ -1880,7 +1881,6 @@ default: plog(LLV_ERROR, LOCATION, NULL, family not supported: %d.\n, res-ai_family); - racoon_free(altname); freeaddrinfo(res); return ISAKMP_NTYPE_INVALID_CERTIFICATE; }
CVS commit: src/crypto/dist/ipsec-tools/src/racoon
Module Name:src Committed By: vanhu Date: Thu Mar 17 14:39:07 UTC 2011 Modified Files: src/crypto/dist/ipsec-tools/src/racoon: oakley.c Log Message: free name later, to avoid a memory use after free in oakley_check_certid(). also give iph1-remote to some plog() calls. patch by Roman Hoog Antink r...@open.ch To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/crypto/dist/ipsec-tools/src/racoon/oakley.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/dist/ipsec-tools/src/racoon/oakley.c diff -u src/crypto/dist/ipsec-tools/src/racoon/oakley.c:1.20 src/crypto/dist/ipsec-tools/src/racoon/oakley.c:1.21 --- src/crypto/dist/ipsec-tools/src/racoon/oakley.c:1.20 Thu Mar 17 14:35:24 2011 +++ src/crypto/dist/ipsec-tools/src/racoon/oakley.c Thu Mar 17 14:39:06 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: oakley.c,v 1.20 2011/03/17 14:35:24 vanhu Exp $ */ +/* $NetBSD: oakley.c,v 1.21 2011/03/17 14:39:06 vanhu Exp $ */ /* Id: oakley.c,v 1.32 2006/05/26 12:19:46 manubsd Exp */ @@ -1791,7 +1791,7 @@ return 0; if (iph1-id_p == NULL || iph1-cert_p == NULL) { - plog(LLV_ERROR, LOCATION, NULL, no ID nor CERT found.\n); + plog(LLV_ERROR, LOCATION, iph1-remote, no ID nor CERT found.\n); return ISAKMP_NTYPE_INVALID_ID_INFORMATION; } @@ -1802,26 +1802,28 @@ case IPSECDOI_ID_DER_ASN1_DN: name = eay_get_x509asn1subjectname(iph1-cert_p); if (!name) { - plog(LLV_ERROR, LOCATION, NULL, + plog(LLV_ERROR, LOCATION, iph1-remote, failed to get subjectName\n); return ISAKMP_NTYPE_INVALID_CERTIFICATE; } if (idlen != name-l) { - plog(LLV_ERROR, LOCATION, NULL, + plog(LLV_ERROR, LOCATION, iph1-remote, Invalid ID length in phase 1.\n); vfree(name); return ISAKMP_NTYPE_INVALID_ID_INFORMATION; } error = memcmp(id_b + 1, name-v, idlen); - vfree(name); if (error != 0) { - plog(LLV_ERROR, LOCATION, NULL, + plog(LLV_ERROR, LOCATION, iph1-remote, ID mismatched with ASN1 SubjectName.\n); plogdump(LLV_DEBUG, id_b + 1, idlen); plogdump(LLV_DEBUG, name-v, idlen); - if (iph1-rmconf-verify_identifier) + if (iph1-rmconf-verify_identifier) { +vfree(name); return ISAKMP_NTYPE_INVALID_ID_INFORMATION; + } } + vfree(name); return 0; case IPSECDOI_ID_IPV4_ADDR: case IPSECDOI_ID_IPV6_ADDR:
CVS commit: src/crypto/dist/ipsec-tools/src/racoon
Module Name:src Committed By: vanhu Date: Thu Mar 17 14:42:58 UTC 2011 Modified Files: src/crypto/dist/ipsec-tools/src/racoon: oakley.c Log Message: fixed a memory leak in oakley_append_rmconf_cr() while generating plist. patch by Roman Hoog Antink r...@open.ch To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/crypto/dist/ipsec-tools/src/racoon/oakley.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/dist/ipsec-tools/src/racoon/oakley.c diff -u src/crypto/dist/ipsec-tools/src/racoon/oakley.c:1.21 src/crypto/dist/ipsec-tools/src/racoon/oakley.c:1.22 --- src/crypto/dist/ipsec-tools/src/racoon/oakley.c:1.21 Thu Mar 17 14:39:06 2011 +++ src/crypto/dist/ipsec-tools/src/racoon/oakley.c Thu Mar 17 14:42:58 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: oakley.c,v 1.21 2011/03/17 14:39:06 vanhu Exp $ */ +/* $NetBSD: oakley.c,v 1.22 2011/03/17 14:42:58 vanhu Exp $ */ /* Id: oakley.c,v 1.32 2006/05/26 12:19:46 manubsd Exp */ @@ -2288,7 +2288,7 @@ s_isakmp_certtype(buf-v[0])); plogdump(LLV_DEBUG, buf-v, buf-l); - actx-plist = isakmp_plist_append(actx-plist, buf, ISAKMP_NPTYPE_CR); + actx-plist = isakmp_plist_append_full(actx-plist, buf, ISAKMP_NPTYPE_CR, 1); err: vfree(asn1dn);
CVS commit: src/sys/dev/acpi
Module Name:src Committed By: jruoho Date: Thu Mar 17 15:32:18 UTC 2011 Modified Files: src/sys/dev/acpi: acpi_cpu_cstate.c Log Message: Add a comment. To generate a diff of this commit: cvs rdiff -u -r1.50 -r1.51 src/sys/dev/acpi/acpi_cpu_cstate.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/dev/acpi/acpi_cpu_cstate.c diff -u src/sys/dev/acpi/acpi_cpu_cstate.c:1.50 src/sys/dev/acpi/acpi_cpu_cstate.c:1.51 --- src/sys/dev/acpi/acpi_cpu_cstate.c:1.50 Fri Mar 4 09:28:34 2011 +++ src/sys/dev/acpi/acpi_cpu_cstate.c Thu Mar 17 15:32:18 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_cpu_cstate.c,v 1.50 2011/03/04 09:28:34 jruoho Exp $ */ +/* $NetBSD: acpi_cpu_cstate.c,v 1.51 2011/03/17 15:32:18 jruoho Exp $ */ /*- * Copyright (c) 2010, 2011 Jukka Ruohonen jruoho...@iki.fi @@ -27,7 +27,7 @@ * SUCH DAMAGE. */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: acpi_cpu_cstate.c,v 1.50 2011/03/04 09:28:34 jruoho Exp $); +__KERNEL_RCSID(0, $NetBSD: acpi_cpu_cstate.c,v 1.51 2011/03/17 15:32:18 jruoho Exp $); #include sys/param.h #include sys/cpu.h @@ -345,6 +345,11 @@ case ACPI_STATE_C1: + /* + * If ACPI wants native access (FFH), but the + * MD code does not support MONITOR/MWAIT, use + * HLT for C1 and error out for higher C-states. + */ if ((sc-sc_flags ACPICPU_FLAG_C_FFH) == 0) state.cs_method = ACPICPU_C_STATE_HALT;
CVS commit: src/tests/libexec/ld.elf_so
Module Name:src Committed By: skrll Date: Thu Mar 17 15:59:32 UTC 2011 Modified Files: src/tests/libexec/ld.elf_so: h_df_1_noopen.c t_df_1_noopen.sh Log Message: Blame where blame is due. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/libexec/ld.elf_so/h_df_1_noopen.c cvs rdiff -u -r1.2 -r1.3 src/tests/libexec/ld.elf_so/t_df_1_noopen.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/libexec/ld.elf_so/h_df_1_noopen.c diff -u src/tests/libexec/ld.elf_so/h_df_1_noopen.c:1.1 src/tests/libexec/ld.elf_so/h_df_1_noopen.c:1.2 --- src/tests/libexec/ld.elf_so/h_df_1_noopen.c:1.1 Fri Dec 24 12:41:43 2010 +++ src/tests/libexec/ld.elf_so/h_df_1_noopen.c Thu Mar 17 15:59:32 2011 @@ -3,7 +3,7 @@ * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation - * by + * by Nick Hudson. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Index: src/tests/libexec/ld.elf_so/t_df_1_noopen.sh diff -u src/tests/libexec/ld.elf_so/t_df_1_noopen.sh:1.2 src/tests/libexec/ld.elf_so/t_df_1_noopen.sh:1.3 --- src/tests/libexec/ld.elf_so/t_df_1_noopen.sh:1.2 Fri Dec 31 08:52:32 2010 +++ src/tests/libexec/ld.elf_so/t_df_1_noopen.sh Thu Mar 17 15:59:32 2011 @@ -1,10 +1,10 @@ -# $NetBSD: t_df_1_noopen.sh,v 1.2 2010/12/31 08:52:32 pooka Exp $ +# $NetBSD: t_df_1_noopen.sh,v 1.3 2011/03/17 15:59:32 skrll Exp $ # # Copyright (c) 2010 The NetBSD Foundation, Inc. # All rights reserved. # # This code is derived from software contributed to The NetBSD Foundation -# by +# by Nick Hudson. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions
CVS commit: src/sys/dev/acpi
Module Name:src Committed By: jruoho Date: Thu Mar 17 15:59:36 UTC 2011 Modified Files: src/sys/dev/acpi: acpi_cpu.h acpi_cpu_pstate.c Log Message: Properly set the frequency during suspend and resume. Should fix problems introduced in the revision 1.42. Pointed out by Taylor C. Campbell. To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/sys/dev/acpi/acpi_cpu.h cvs rdiff -u -r1.45 -r1.46 src/sys/dev/acpi/acpi_cpu_pstate.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/dev/acpi/acpi_cpu.h diff -u src/sys/dev/acpi/acpi_cpu.h:1.37 src/sys/dev/acpi/acpi_cpu.h:1.38 --- src/sys/dev/acpi/acpi_cpu.h:1.37 Sat Mar 5 09:47:19 2011 +++ src/sys/dev/acpi/acpi_cpu.h Thu Mar 17 15:59:36 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_cpu.h,v 1.37 2011/03/05 09:47:19 jruoho Exp $ */ +/* $NetBSD: acpi_cpu.h,v 1.38 2011/03/17 15:59:36 jruoho Exp $ */ /*- * Copyright (c) 2010, 2011 Jukka Ruohonen jruoho...@iki.fi @@ -210,6 +210,7 @@ uint64_t sc_pstate_aperf; /* ACPICPU_FLAG_P_HW */ uint64_t sc_pstate_mperf; /* ACPICPU_FLAG_P_HW*/ uint32_t sc_pstate_current; + uint32_t sc_pstate_saved; uint32_t sc_pstate_count; uint32_t sc_pstate_max; uint32_t sc_pstate_min; Index: src/sys/dev/acpi/acpi_cpu_pstate.c diff -u src/sys/dev/acpi/acpi_cpu_pstate.c:1.45 src/sys/dev/acpi/acpi_cpu_pstate.c:1.46 --- src/sys/dev/acpi/acpi_cpu_pstate.c:1.45 Sat Mar 5 09:47:19 2011 +++ src/sys/dev/acpi/acpi_cpu_pstate.c Thu Mar 17 15:59:36 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_cpu_pstate.c,v 1.45 2011/03/05 09:47:19 jruoho Exp $ */ +/* $NetBSD: acpi_cpu_pstate.c,v 1.46 2011/03/17 15:59:36 jruoho Exp $ */ /*- * Copyright (c) 2010, 2011 Jukka Ruohonen jruoho...@iki.fi @@ -27,7 +27,7 @@ * SUCH DAMAGE. */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: acpi_cpu_pstate.c,v 1.45 2011/03/05 09:47:19 jruoho Exp $); +__KERNEL_RCSID(0, $NetBSD: acpi_cpu_pstate.c,v 1.46 2011/03/17 15:59:36 jruoho Exp $); #include sys/param.h #include sys/kmem.h @@ -56,7 +56,6 @@ static void acpicpu_pstate_bios(void); static void acpicpu_pstate_set_xcall(void *, void *); -static uint32_t acpicpu_pstate_saved = 0; extern struct acpicpu_softc **acpicpu_sc; void @@ -216,14 +215,15 @@ { struct acpicpu_softc *sc = device_private(self); struct acpicpu_pstate *ps = NULL; + struct cpu_info *ci = sc-sc_ci; + uint64_t xc; int32_t i; + /* + * Reset any dynamic limits. + */ mutex_enter(sc-sc_mtx); acpicpu_pstate_reset(sc); - mutex_exit(sc-sc_mtx); - - if (acpicpu_pstate_saved != 0) - return true; /* * Following design notes for Windows, we set the highest @@ -233,6 +233,8 @@ * Microsoft Corporation: Windows Native Processor * Performance Control. Version 1.1a, November, 2002. */ + sc-sc_pstate_saved = sc-sc_pstate_current; + for (i = sc-sc_pstate_count - 1; i = 0; i--) { if (sc-sc_pstate[i].ps_freq != 0) { @@ -241,17 +243,16 @@ } } + mutex_exit(sc-sc_mtx); + if (__predict_false(ps == NULL)) return true; - mutex_enter(sc-sc_mtx); - acpicpu_pstate_saved = sc-sc_pstate_current; - mutex_exit(sc-sc_mtx); - - if (acpicpu_pstate_saved == ps-ps_freq) + if (sc-sc_pstate_saved == ps-ps_freq) return true; - acpicpu_pstate_set(sc-sc_ci, ps-ps_freq); + xc = xc_unicast(0, acpicpu_pstate_set_xcall, ps-ps_freq, NULL, ci); + xc_wait(xc); return true; } @@ -260,11 +261,11 @@ acpicpu_pstate_resume(device_t self) { struct acpicpu_softc *sc = device_private(self); + uint32_t freq = sc-sc_pstate_saved; + uint64_t xc; - if (acpicpu_pstate_saved != 0) { - acpicpu_pstate_set(sc-sc_ci, acpicpu_pstate_saved); - acpicpu_pstate_saved = 0; - } + xc = xc_unicast(0, acpicpu_pstate_set_xcall, freq, NULL, sc-sc_ci); + xc_wait(xc); return true; }
CVS commit: src/sys/dev/sdmmc
Module Name:src Committed By: matt Date: Thu Mar 17 16:56:58 UTC 2011 Modified Files: src/sys/dev/sdmmc: sdhcreg.h Log Message: Add stuff that the Freescale PowerQUICC3 ESDHC controllers have. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/dev/sdmmc/sdhcreg.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/dev/sdmmc/sdhcreg.h diff -u src/sys/dev/sdmmc/sdhcreg.h:1.1 src/sys/dev/sdmmc/sdhcreg.h:1.2 --- src/sys/dev/sdmmc/sdhcreg.h:1.1 Tue Apr 21 03:00:30 2009 +++ src/sys/dev/sdmmc/sdhcreg.h Thu Mar 17 16:56:58 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: sdhcreg.h,v 1.1 2009/04/21 03:00:30 nonaka Exp $ */ +/* $NetBSD: sdhcreg.h,v 1.2 2011/03/17 16:56:58 matt Exp $ */ /* $OpenBSD: sdhcreg.h,v 1.4 2006/07/30 17:20:40 fgsch Exp $ */ /* @@ -87,6 +87,8 @@ #define SDHC_CLOCK_CTL 0x2c #define SDHC_SDCLK_DIV_SHIFT 8 #define SDHC_SDCLK_DIV_MASK 0xff +#define SDHC_SDCLK_DVS_SHIFT 4 +#define SDHC_SDCLK_DVS_MASK 0xf #define SDHC_SDCLK_ENABLE (12) #define SDHC_INTCLK_STABLE (11) #define SDHC_INTCLK_ENABLE (10) @@ -136,6 +138,7 @@ #define SDHC_MAX_BLK_LEN_512 0 #define SDHC_MAX_BLK_LEN_1024 1 #define SDHC_MAX_BLK_LEN_2048 2 +#define SDHC_MAX_BLK_LEN_4096 3 #define SDHC_MAX_BLK_LEN_SHIFT 16 #define SDHC_MAX_BLK_LEN_MASK 0x3 #define SDHC_BASE_FREQ_SHIFT 8
CVS commit: src/doc
Module Name:src Committed By: jruoho Date: Thu Mar 17 17:13:29 UTC 2011 Modified Files: src/doc: 3RDPARTY Log Message: ACPICA 20110316 is out. To generate a diff of this commit: cvs rdiff -u -r1.819 -r1.820 src/doc/3RDPARTY Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/3RDPARTY diff -u src/doc/3RDPARTY:1.819 src/doc/3RDPARTY:1.820 --- src/doc/3RDPARTY:1.819 Thu Mar 10 09:19:14 2011 +++ src/doc/3RDPARTY Thu Mar 17 17:13:29 2011 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.819 2011/03/10 09:19:14 jmmv Exp $ +# $NetBSD: 3RDPARTY,v 1.820 2011/03/17 17:13:29 jruoho Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -26,7 +26,7 @@ Package: acpica Version: 20110211 -Current Vers: 20110211 +Current Vers: 20110316 Maintainer: Intel Archive Site: http://www.acpica.org/downloads/unix2_source_code.php Home Page: http://www.acpica.org/
CVS commit: src/share/man/man3
Module Name:src Committed By: jruoho Date: Thu Mar 17 17:53:02 UTC 2011 Modified Files: src/share/man/man3: rbtree.3 Log Message: Remove boiler plate paragraph in the CODE REFERENCES section. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/share/man/man3/rbtree.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man3/rbtree.3 diff -u src/share/man/man3/rbtree.3:1.3 src/share/man/man3/rbtree.3:1.4 --- src/share/man/man3/rbtree.3:1.3 Mon Nov 8 09:43:27 2010 +++ src/share/man/man3/rbtree.3 Thu Mar 17 17:53:02 2011 @@ -1,4 +1,4 @@ -.\ $NetBSD: rbtree.3,v 1.3 2010/11/08 09:43:27 enami Exp $ +.\ $NetBSD: rbtree.3,v 1.4 2011/03/17 17:53:02 jruoho Exp $ .\ .\ Copyright (c) 2010 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -27,7 +27,7 @@ .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\ POSSIBILITY OF SUCH DAMAGE. .\ -.Dd November 8, 2010 +.Dd March 17, 2011 .Dt RBTREE 3 .Os .Sh NAME @@ -194,18 +194,14 @@ .Dv NULL . .El .Sh CODE REFERENCES -This section describes places within the -.Nx -source tree where actual code implementing -.Nm -can be found. -All pathnames are relative to -.Pa /usr/src . -.Pp +The .Nm -is implemented within the file +interface is implemented in .Pa common/lib/libc/gen/rb.c . .\ .Sh EXAMPLES +.\ +.\ XXX: Should contain some examples. +.\ .Sh SEE ALSO .Xr queue 3 , .Xr tree 3
CVS commit: src/tools
Module Name:src Committed By: riz Date: Thu Mar 17 19:06:46 UTC 2011 Modified Files: src/tools: Makefile Log Message: .WAIT for makefs, because in most builds, it's the first target which includes Makefile.nbincludes, whose beforedepend: has some race condition I don't fully understand, and which has been causing many (but not all!) -j16 builds on the autobuild cluster to fail in tools since sometime between 201103061600 and 201103070900. With the proper voodoo, I was able to get 8 builds in a row to fail without this change, and 16 in a row to succeed with it. XXX a proper fix likely involves reworking the beforedepend: target of Makefile.nbincludes, but this should get the build cluster back up to full functionality in the meanwhile. To generate a diff of this commit: cvs rdiff -u -r1.143 -r1.144 src/tools/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tools/Makefile diff -u src/tools/Makefile:1.143 src/tools/Makefile:1.144 --- src/tools/Makefile:1.143 Fri Feb 25 23:29:16 2011 +++ src/tools/Makefile Thu Mar 17 19:06:45 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.143 2011/02/25 23:29:16 phx Exp $ +# $NetBSD: Makefile,v 1.144 2011/03/17 19:06:45 riz Exp $ .include bsd.own.mk @@ -56,7 +56,7 @@ ${DTRACE_BITS} \ asn1_compile cat cksum compile_et config db \ file lint1 \ - makefs menuc mkcsmapper mkesdb mklocale mknod msgc \ + makefs .WAIT menuc mkcsmapper mkesdb mklocale mknod msgc \ .WAIT disklabel \ .WAIT paxctl \ .WAIT fdisk \
CVS commit: src/usr.sbin/sup/source
Module Name:src Committed By: christos Date: Thu Mar 17 19:43:35 UTC 2011 Modified Files: src/usr.sbin/sup/source: supfilesrv.c Log Message: don't decrement if children are 0 To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.46 src/usr.sbin/sup/source/supfilesrv.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/sup/source/supfilesrv.c diff -u src/usr.sbin/sup/source/supfilesrv.c:1.45 src/usr.sbin/sup/source/supfilesrv.c:1.46 --- src/usr.sbin/sup/source/supfilesrv.c:1.45 Wed Mar 16 16:17:00 2011 +++ src/usr.sbin/sup/source/supfilesrv.c Thu Mar 17 15:43:34 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: supfilesrv.c,v 1.45 2011/03/16 20:17:00 christos Exp $ */ +/* $NetBSD: supfilesrv.c,v 1.46 2011/03/17 19:43:34 christos Exp $ */ /* * Copyright (c) 1992 Carnegie Mellon University @@ -495,9 +495,11 @@ if (kill(pid, 0) == -1) switch (errno) { case ESRCH: -if (nchildren == 0) +if (nchildren == 0) { logerr(no children but pid %jd\n, (intmax_t)pid); + break; +} nchildren--; break; default:
CVS commit: src/external/bsd/atf/dist/atf-run
Module Name:src Committed By: jmmv Date: Thu Mar 17 19:45:36 UTC 2011 Modified Files: src/external/bsd/atf/dist/atf-run: test-program.cpp Log Message: Pull up revision 3dd2481ec97b2fde76521939b6451d03ce989745 from upstream: Really kill subprocesses of a test case before waiting for its completion Before waiting for any leftover output of the test case after it terminates, we must ensure that all of its subprocess are really, really dead. Otherwise, these subprocesses may be sharing the stdout of the test case, in which case our wait will block (potentially indefinitely). This finally (well, hopefully) fixes some random lockups exposed by the NetBSD test suite. Reported by Antti Kantee after tests/fs/vfs/t_full:p2k_ffs_fillfs was exposing this problem in a pretty reproducible manner. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/external/bsd/atf/dist/atf-run/test-program.cpp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/atf/dist/atf-run/test-program.cpp diff -u src/external/bsd/atf/dist/atf-run/test-program.cpp:1.7 src/external/bsd/atf/dist/atf-run/test-program.cpp:1.8 --- src/external/bsd/atf/dist/atf-run/test-program.cpp:1.7 Tue Nov 16 17:55:56 2010 +++ src/external/bsd/atf/dist/atf-run/test-program.cpp Thu Mar 17 19:45:36 2011 @@ -1,7 +1,7 @@ // // Automated Testing Framework (atf) // -// Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc. +// Copyright (c) 2007, 2008, 2009, 2010, 2011 The NetBSD Foundation, Inc. // All rights reserved. // // Redistribution and use in source and binary forms, with or without @@ -724,10 +724,9 @@ UNREACHABLE; } -::killpg(child_pid, SIGTERM); +::killpg(child_pid, SIGKILL); mux.flush(); atf::process::status status = child.wait(); -::killpg(child_pid, SIGKILL); std::string reason;
CVS commit: src/tests/fs/vfs
Module Name:src Committed By: jmmv Date: Thu Mar 17 19:48:37 UTC 2011 Modified Files: src/tests/fs/vfs: t_full.c Log Message: Remove hack introduced in revision 1.6 to workaround a bug in atf-run that would cause it to lock up while waiting for the p2k_ffs_fillfs test case to complete (in some cases only). This has been fixed by the upstream revision 3dd2481ec97b2fde76521939b6451d03ce989745 which I have just pulled into our copy of atf. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/tests/fs/vfs/t_full.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/fs/vfs/t_full.c diff -u src/tests/fs/vfs/t_full.c:1.6 src/tests/fs/vfs/t_full.c:1.7 --- src/tests/fs/vfs/t_full.c:1.6 Sun Mar 6 10:33:40 2011 +++ src/tests/fs/vfs/t_full.c Thu Mar 17 19:48:37 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: t_full.c,v 1.6 2011/03/06 10:33:40 pooka Exp $ */ +/* $NetBSD: t_full.c,v 1.7 2011/03/17 19:48:37 jmmv Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -57,13 +57,6 @@ int fd, i = 0; if (FSTYPE_P2K_FFS(tc) || FSTYPE_PUFFS(tc) || FSTYPE_RUMPFS(tc)) { - /* - * XXX: explicitly unmount to prevent some race. - * temporary hack, fix properly - */ - if (FSTYPE_P2K_FFS(tc)) { - puffs_fstest_unmount(tc, mp, MNT_FORCE); - } atf_tc_skip(fs does not support explicit block allocation (GOP_ALLOC)); }
CVS commit: src/libexec/ld.elf_so/arch/hppa
Module Name:src Committed By: skrll Date: Thu Mar 17 22:07:52 UTC 2011 Modified Files: src/libexec/ld.elf_so/arch/hppa: hppa_reloc.c Log Message: Another TLS reloc. Thanks to joerg for a hint. To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/libexec/ld.elf_so/arch/hppa/hppa_reloc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/ld.elf_so/arch/hppa/hppa_reloc.c diff -u src/libexec/ld.elf_so/arch/hppa/hppa_reloc.c:1.37 src/libexec/ld.elf_so/arch/hppa/hppa_reloc.c:1.38 --- src/libexec/ld.elf_so/arch/hppa/hppa_reloc.c:1.37 Mon Mar 14 08:49:29 2011 +++ src/libexec/ld.elf_so/arch/hppa/hppa_reloc.c Thu Mar 17 22:07:52 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: hppa_reloc.c,v 1.37 2011/03/14 08:49:29 skrll Exp $ */ +/* $NetBSD: hppa_reloc.c,v 1.38 2011/03/17 22:07:52 skrll Exp $ */ /*- * Copyright (c) 2002, 2004 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: hppa_reloc.c,v 1.37 2011/03/14 08:49:29 skrll Exp $); +__RCSID($NetBSD: hppa_reloc.c,v 1.38 2011/03/17 22:07:52 skrll Exp $); #endif /* not lint */ #include stdlib.h @@ -473,6 +473,22 @@ rdbg((COPY (avoid in main))); break; + case R_TYPE(TLS_TPREL32): + def = _rtld_find_symdef(symnum, obj, defobj, false); + if (def == NULL) +return -1; + + if (!defobj-tls_done _rtld_tls_offset_allocate(obj)) +return -1; + + *where = (Elf_Addr)(obj-tlsoffset + def-st_value + + rela-r_addend + sizeof(struct tls_tcb)); + + rdbg((TPREL32 %s in %s -- %p in %s, + obj-strtab + obj-symtab[symnum].st_name, + obj-path, (void *)*where, defobj-path)); + break; + case R_TYPE(TLS_DTPMOD32): def = _rtld_find_symdef(symnum, obj, defobj, false); if (def == NULL)
CVS commit: src/lib/libc/tls
Module Name:src Committed By: skrll Date: Thu Mar 17 22:13:58 UTC 2011 Modified Files: src/lib/libc/tls: tls.c Log Message: Appease the hppa linker. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/lib/libc/tls/tls.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/tls/tls.c diff -u src/lib/libc/tls/tls.c:1.3 src/lib/libc/tls/tls.c:1.4 --- src/lib/libc/tls/tls.c:1.3 Sat Mar 12 07:52:37 2011 +++ src/lib/libc/tls/tls.c Thu Mar 17 22:13:58 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: tls.c,v 1.3 2011/03/12 07:52:37 matt Exp $ */ +/* $NetBSD: tls.c,v 1.4 2011/03/17 22:13:58 skrll Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__RCSID($NetBSD: tls.c,v 1.3 2011/03/12 07:52:37 matt Exp $); +__RCSID($NetBSD: tls.c,v 1.4 2011/03/17 22:13:58 skrll Exp $); #include namespace.h @@ -58,11 +58,20 @@ static size_t tls_allocation; static void *initial_thread_tcb; -__weak_alias(__tls_get_addr, 0) +void * __libc_tls_get_addr(void); + +__weak_alias(__tls_get_addr, __libc_tls_get_addr) #ifdef __i386__ -__weak_alias(___tls_get_addr, 0) +__weak_alias(___tls_get_addr, __libc_tls_get_addr) #endif +void * +__libc_tls_get_addr(void) +{ + + abort(); +} + __weak_alias(_rtld_tls_allocate, __libc_rtld_tls_allocate) struct tls_tcb *
CVS commit: src/sys/arch/hppa/include
Module Name:src Committed By: skrll Date: Thu Mar 17 22:14:43 UTC 2011 Modified Files: src/sys/arch/hppa/include: types.h Log Message: HPPA TLS support. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/arch/hppa/include/types.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/hppa/include/types.h diff -u src/sys/arch/hppa/include/types.h:1.19 src/sys/arch/hppa/include/types.h:1.20 --- src/sys/arch/hppa/include/types.h:1.19 Mon Feb 28 21:23:33 2011 +++ src/sys/arch/hppa/include/types.h Thu Mar 17 22:14:43 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: types.h,v 1.19 2011/02/28 21:23:33 skrll Exp $ */ +/* $NetBSD: types.h,v 1.20 2011/03/17 22:14:43 skrll Exp $ */ /* $OpenBSD: types.h,v 1.6 2001/08/11 01:58:34 art Exp $ */ @@ -94,6 +94,8 @@ extern const char __CONCAT(name,_ras_start[]), __CONCAT(name,_ras_end[]) #define __HAVE_CPU_LWP_SETPRIVATE +#define __HAVE_COMMON___TLS_GET_ADDR #define __HAVE___LWP_GETPRIVATE_FAST +#define __HAVE_TLS_VARIANT_I #endif /* _HPPA_TYPES_H_ */
CVS commit: src/doc
Module Name:src Committed By: skrll Date: Thu Mar 17 22:15:57 UTC 2011 Modified Files: src/doc: CHANGES Log Message: Note HPPA TLS support. To generate a diff of this commit: cvs rdiff -u -r1.1522 -r1.1523 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.1522 src/doc/CHANGES:1.1523 --- src/doc/CHANGES:1.1522 Tue Mar 15 14:37:21 2011 +++ src/doc/CHANGES Thu Mar 17 22:15:56 2011 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: $Revision: 1.1522 $ +# LIST OF CHANGES FROM LAST RELEASE: $Revision: 1.1523 $ # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -890,3 +890,4 @@ x86: add TLS (thread locale storage) support. [joerg 20110312 mips: add TLS (thread local storage) support. [matt 20110314] mips: add MIPS32R2 and MIPS64R2 support. [matt 20110314] + hppa: add TLS support. [skrll 20110317]
CVS commit: src
Module Name:src Committed By: joerg Date: Fri Mar 18 00:57:22 UTC 2011 Modified Files: src/distrib/sets/lists/comp: mi src/lib/libm/complex: Makefile.inc Log Message: Add missing MLINKS. From Stathis Kamperis. To generate a diff of this commit: cvs rdiff -u -r1.1600 -r1.1601 src/distrib/sets/lists/comp/mi cvs rdiff -u -r1.3 -r1.4 src/lib/libm/complex/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/comp/mi diff -u src/distrib/sets/lists/comp/mi:1.1600 src/distrib/sets/lists/comp/mi:1.1601 --- src/distrib/sets/lists/comp/mi:1.1600 Thu Mar 17 02:35:27 2011 +++ src/distrib/sets/lists/comp/mi Fri Mar 18 00:57:19 2011 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1600 2011/03/17 02:35:27 joerg Exp $ +# $NetBSD: mi,v 1.1601 2011/03/18 00:57:19 joerg Exp $ # # Note: don't delete entries from here - mark them as obsolete instead. # @@ -5576,6 +5576,7 @@ ./usr/share/man/cat3/confstr.0 comp-c-catman .cat ./usr/share/man/cat3/conj.0 comp-c-catman complex,.cat ./usr/share/man/cat3/conjf.0 comp-c-catman complex,.cat +./usr/share/man/cat3/conjl.0 comp-c-catman complex,.cat ./usr/share/man/cat3/copysign.0 comp-c-catman .cat ./usr/share/man/cat3/copysignf.0 comp-c-catman .cat ./usr/share/man/cat3/copysignl.0 comp-c-catman .cat @@ -5587,6 +5588,8 @@ ./usr/share/man/cat3/cpow.0 comp-c-catman complex,.cat ./usr/share/man/cat3/cpowf.0 comp-c-catman complex,.cat ./usr/share/man/cat3/cproj.0 comp-c-catman complex,.cat +./usr/share/man/cat3/cprojf.0 comp-c-catman complex,.cat +./usr/share/man/cat3/cprojl.0 comp-c-catman complex,.cat ./usr/share/man/cat3/cpuset.0 comp-c-catman .cat ./usr/share/man/cat3/cpuset_clr.0 comp-c-catman .cat ./usr/share/man/cat3/cpuset_create.0 comp-c-catman .cat @@ -11651,6 +11654,7 @@ ./usr/share/man/html3/confstr.html comp-c-htmlman html ./usr/share/man/html3/conj.html comp-c-htmlman complex,html ./usr/share/man/html3/conjf.html comp-c-htmlman complex,html +./usr/share/man/html3/conjl.html comp-c-htmlman complex,html ./usr/share/man/html3/copysign.html comp-c-htmlman html ./usr/share/man/html3/copysignf.html comp-c-htmlman html ./usr/share/man/html3/copysignl.html comp-c-htmlman html @@ -11662,6 +11666,8 @@ ./usr/share/man/html3/cpow.html comp-c-htmlman complex,html ./usr/share/man/html3/cpowf.html comp-c-htmlman complex,html ./usr/share/man/html3/cproj.html comp-c-htmlman complex,html +./usr/share/man/html3/cprojf.html comp-c-htmlman complex,html +./usr/share/man/html3/cprojl.html comp-c-htmlman complex,html ./usr/share/man/html3/cpuset.html comp-c-htmlman html ./usr/share/man/html3/cpuset_clr.html comp-c-htmlman html ./usr/share/man/html3/cpuset_create.html comp-c-htmlman html @@ -17632,6 +17638,7 @@ ./usr/share/man/man3/confstr.3 comp-c-man .man ./usr/share/man/man3/conj.3 comp-c-man complex,.man ./usr/share/man/man3/conjf.3 comp-c-man complex,.man +./usr/share/man/man3/conjl.3 comp-c-man complex,.man ./usr/share/man/man3/copysign.3 comp-c-man .man ./usr/share/man/man3/copysignf.3 comp-c-man .man ./usr/share/man/man3/copysignl.3 comp-c-man .man @@ -17643,6 +17650,8 @@ ./usr/share/man/man3/cpow.3 comp-c-man complex,.man ./usr/share/man/man3/cpowf.3 comp-c-man complex,.man ./usr/share/man/man3/cproj.3 comp-c-man complex,.man +./usr/share/man/man3/cprojf.3 comp-c-man complex,.man +./usr/share/man/man3/cprojl.3 comp-c-man complex,.man ./usr/share/man/man3/cpuset.3 comp-c-man .man ./usr/share/man/man3/cpuset_clr.3 comp-c-man .man ./usr/share/man/man3/cpuset_create.3 comp-c-man .man Index: src/lib/libm/complex/Makefile.inc diff -u src/lib/libm/complex/Makefile.inc:1.3 src/lib/libm/complex/Makefile.inc:1.4 --- src/lib/libm/complex/Makefile.inc:1.3 Wed Sep 15 16:11:29 2010 +++ src/lib/libm/complex/Makefile.inc Fri Mar 18 00:57:22 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.3 2010/09/15 16:11:29 christos Exp $ +# $NetBSD: Makefile.inc,v 1.4 2011/03/18 00:57:22 joerg Exp $ .PATH: ${.CURDIR}/complex @@ -22,7 +22,8 @@ MLINKS+= catan.3 catanf.3 catanh.3 catanhf.3 ccos.3 ccosf.3 MLINKS+= ccosh.3 ccoshf.3 cexp.3 cexpf.3 MLINKS+= cimag.3 cimagf.3 cimag.3 cimagl.3 -MLINKS+= clog.3 clogf.3 conj.3 conjf.3 cpow.3 cpowf.3 +MLINKS+= clog.3 clogf.3 conj.3 conjf.3 conj.3 conjl.3 cpow.3 cpowf.3 +MLINKS+= cproj.3 cprojf.3 cproj.3 cprojl.3 MLINKS+= creal.3 crealf.3 creal.3 creall.3 MLINKS+= csin.3 csinf.3 csinh.3 csinhf.3 MLINKS+= csqrt.3 csqrtf.3 ctan.3 ctanf.3 ctanh.3 ctanhf.3
CVS commit: src/sys/dev/nand
Module Name:src Committed By: cliff Date: Fri Mar 18 00:57:51 UTC 2011 Modified Files: src/sys/dev/nand: nand_micron.c Log Message: - add suport for MT29FxGx family devices To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/dev/nand/nand_micron.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/dev/nand/nand_micron.c diff -u src/sys/dev/nand/nand_micron.c:1.1 src/sys/dev/nand/nand_micron.c:1.2 --- src/sys/dev/nand/nand_micron.c:1.1 Wed Mar 9 10:05:08 2011 +++ src/sys/dev/nand/nand_micron.c Fri Mar 18 00:57:51 2011 @@ -39,39 +39,123 @@ #include nand.h #include onfi.h +#define MT29F2G08AAC 0xda +#define MT29F2G08ABC 0xaa +#define MT29F2G16AAC 0xca +#define MT29F2G16ABC 0xba +#define MT29F4G08BAC 0xdc +#define MT29F8G08FAC 0xdc /* each 4GB section */ + +#define MT29FxG_PARAM_WIDTH(p) (((p) 1) __BIT(0)) +#define MT29FxG_PAGESIZE (2 * 1024) +#define MT29FxG_BLOCK_PAGES 64 /* pages per block */ +#define MT29FxG_BLOCKSIZE (128 * 1024) /* not including spares */ +#define MT29FxG_SPARESIZE 64 + +struct nand_micron_devices { + const char *name; + uint8_t id; + uint8_t width; /* bus width */ + u_int lun_blocks; /* number of blocks per LUN */ + u_int num_luns; /* number LUNs */ +}; + +static const struct nand_micron_devices nand_micron_devices[] = { + { MT29F2G08AAC, MT29F2G08AAC, 8, 2048, 1 }, + { MT29F2G08ABC, MT29F2G08ABC, 8, 2048, 1 }, + { MT29F2G16AAC, MT29F2G16AAC, 16, 2048, 1 }, + { MT29F2G16ABC, MT29F2G16ABC, 16, 2048, 1 }, + { MT29F4G08BAC, MT29F4G08BAC, 8, 4096, 1 }, +#ifdef NOTYET + /* how do we recognize/match this? */ + { MT29F8G08FAC, MT29F8G08FAC, 8, 4096, 2 }, +#endif +}; + +static int mt29fxgx_parameters(device_t, struct nand_chip *, u_int8_t, uint8_t); + +static const struct nand_micron_devices * +nand_micron_device_lookup(u_int8_t id) +{ + for (int i=0; i __arraycount(nand_micron_devices); i++) + if (nand_micron_devices[i].id == id) + return nand_micron_devices[i]; + return NULL; +} + int nand_read_parameters_micron(device_t self, struct nand_chip *chip) { - uint8_t byte; + uint8_t mfgrid; + uint8_t devid; + uint8_t dontcare; + uint8_t params; KASSERT(chip-nc_manf_id == NAND_MFR_MICRON); + switch (chip-nc_manf_id) { + case NAND_MFR_MICRON: + break; + default: + return 1; + } nand_select(self, true); nand_command(self, ONFI_READ_ID); nand_address(self, 0x00); + nand_read_byte(self, mfgrid); + nand_read_byte(self, devid); + nand_read_byte(self, dontcare); + nand_read_byte(self, params); + nand_select(self, false); - switch (chip-nc_manf_id) { - /* three dummy reads */ - nand_read_byte(self, byte); /* vendor */ - nand_read_byte(self, byte); /* device */ - nand_read_byte(self, byte); /* unused */ - - /* this is the interesting one */ - nand_read_byte(self, byte); - /* TODO actually get info */ - nand_select(self, false); - return 1; - - break; + KASSERT(chip-nc_manf_id == mfgrid); + + switch(devid) { + case MT29F2G08AAC: + case MT29F2G08ABC: + case MT29F2G16AAC: + case MT29F2G16ABC: + case MT29F4G08BAC: + return mt29fxgx_parameters(self, chip, devid, params); default: - nand_select(self, false); + aprint_error_dev(self, unsupported device id %#x\n, devid); return 1; } - - chip-nc_num_luns = 1; - chip-nc_lun_blocks = chip-nc_size / chip-nc_block_size; +} - nand_select(self, false); +static int +mt29fxgx_parameters(device_t self, struct nand_chip *chip, + u_int8_t devid, uint8_t params) +{ + const struct nand_micron_devices *dp; + const char *vendor = Micron; + + dp = nand_micron_device_lookup(devid); + if (dp == NULL) { + aprint_error_dev(self, unknown device id %#x\n, devid); + return 1; + } + + /* + * MT29FxGx params across models are the same + * except for luns, blocks per lun, and bus width + * (and voltage) + */ + chip-nc_addr_cycles_column = 2; /* XXX */ + chip-nc_addr_cycles_row = 3; /* XXX */ + if (dp-width == 16) + chip-nc_flags |= NC_BUSWIDTH_16; + chip-nc_page_size = MT29FxG_PAGESIZE; + chip-nc_block_pages = MT29FxG_BLOCK_PAGES; + chip-nc_block_size = MT29FxG_BLOCK_PAGES * MT29FxG_PAGESIZE; + chip-nc_spare_size = MT29FxG_SPARESIZE; + chip-nc_lun_blocks = dp-lun_blocks; + chip-nc_num_luns = dp-num_luns; + chip-nc_size = MT29FxG_PAGESIZE * MT29FxG_BLOCK_PAGES * + dp-lun_blocks * dp-num_luns; + + aprint_normal_dev(self, %s %s, size %ldMB\n, + vendor, dp-name, chip-nc_size 20); return 0; }
CVS commit: src/sys/arch/mips/rmi
Module Name:src Committed By: cliff Date: Fri Mar 18 00:58:35 UTC 2011 Modified Files: src/sys/arch/mips/rmi: rmixlreg.h Log Message: - add register bit defines for GPIO, Peripherals IO Bus, Flash, NAND To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/mips/rmi/rmixlreg.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/mips/rmi/rmixlreg.h diff -u src/sys/arch/mips/rmi/rmixlreg.h:1.3 src/sys/arch/mips/rmi/rmixlreg.h:1.4 --- src/sys/arch/mips/rmi/rmixlreg.h:1.3 Sun Feb 20 07:48:37 2011 +++ src/sys/arch/mips/rmi/rmixlreg.h Fri Mar 18 00:58:35 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: rmixlreg.h,v 1.3 2011/02/20 07:48:37 matt Exp $ */ +/* $NetBSD: rmixlreg.h,v 1.4 2011/03/18 00:58:35 cliff Exp $ */ /*- * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -262,7 +262,7 @@ #define RMIXL_IO_DEV_I2C_1 0x16000 /* I2C_1 */ #define RMIXL_IO_DEV_I2C_2 0x17000 /* I2C_2 */ #define RMIXL_IO_DEV_GPIO 0x18000 /* GPIO */ -#define RMIXL_IO_DEV_FLASH 0x19000 /* Flash ROM */ +#define RMIXL_IO_DEV_FLASH 0x19000 /* Peripherals IO Bus, to Flash memory etc. */ #define RMIXL_IO_DEV_DMA 0x1a000 /* DMA */ #define RMIXL_IO_DEV_L2 0x1b000 /* L2 Cache */ #define RMIXL_IO_DEV_TB 0x1c000 /* Trace Buffer */ @@ -303,9 +303,11 @@ #define RMIXL_SBC_DRAM_CHNBD_DTR(n) _RMIXL_OFFSET(0x010 + (n)) /* DRAM Region Channels B,D Address Translation Regs[0-7] */ #define RMIXL_SBC_DRAM_BRIDGE_CFG _RMIXL_OFFSET(0x18) /* SBC DRAM config reg */ + +#define RMIXL_SBC_IO_BAR _RMIXL_OFFSET(0x19) /* I/O Config Base Addr reg */ +#define RMIXL_SBC_FLASH_BAR _RMIXL_OFFSET(0x1a) /* Flash Memory Base Addr reg */ + #if defined(MIPS64_XLR) -#define RMIXLR_SBC_IO_BAR _RMIXL_OFFSET(0x19) /* I/O Config Base Addr reg */ -#define RMIXLR_SBC_FLASH_BAR _RMIXL_OFFSET(0x1a) /* Flash Memory Base Addr reg */ #define RMIXLR_SBC_SRAM_BAR _RMIXL_OFFSET(0x1b) /* SRAM Base Addr reg */ #define RMIXLR_SBC_HTMEM_BAR _RMIXL_OFFSET(0x1c) /* HyperTransport Mem Base Addr reg */ #define RMIXLR_SBC_HTINT_BAR _RMIXL_OFFSET(0x1d) /* HyperTransport Interrupt Base Addr reg */ @@ -319,8 +321,6 @@ #define RMIXLR_SBC_SYS2IO_CREDITS _RMIXL_OFFSET(0x35) /* System Bridge I/O Transaction Credits register */ #endif /* MIPS64_XLR */ #if defined(MIPS64_XLS) -#define RMIXLS_SBC_IO_BAR _RMIXL_OFFSET(0x19) /* I/O Config Base Addr reg */ -#define RMIXLS_SBC_FLASH_BAR _RMIXL_OFFSET(0x20) /* Flash Memory Base Addr reg */ #define RMIXLS_SBC_PCIE_CFG_BAR _RMIXL_OFFSET(0x40) /* PCI Configuration BAR */ #define RMIXLS_SBC_PCIE_ECFG_BAR _RMIXL_OFFSET(0x41) /* PCI Extended Configuration BAR */ #define RMIXLS_SBC_PCIE_MEM_BAR _RMIXL_OFFSET(0x42) /* PCI Memory region BAR */ @@ -350,6 +350,19 @@ #define RMIXL_ADDR_ERR_BITERR_INT_EN _RMIXL_OFFSET(0x33) /* Bit Error intr enable */ /* + * RMIXL_SBC_FLASH_BAR bit defines + */ +#define RMIXL_FLASH_BAR_BASE __BITS(31,16) /* phys address bits 39:24 */ +#define RMIXL_FLASH_BAR_TO_BA(r) \ + (((r) RMIXL_FLASH_BAR_BASE) (24 - 16)) +#define RMIXL_FLASH_BAR_MASK __BITS(15,5) /* phys address mask bits 34:24 */ +#define RMIXL_FLASH_BAR_TO_MASK(r) \ + (r) RMIXL_FLASH_BAR_MASK)) (24 - 5)) | __BITS(23, 0)) +#define RMIXL_FLASH_BAR_RESV __BITS(4,1) /* (reserved) */ +#define RMIXL_FLASH_BAR_ENB __BIT(0) /* 1=Enable */ +#define RMIXL_FLASH_BAR_MASK_MAX RMIXL_FLASH_BAR_TO_MASK(RMIXL_FLASH_BAR_MASK) + +/* * RMIXL_SBC_DRAM_BAR bit defines */ #define RMIXL_DRAM_BAR_BASE_ADDR __BITS(31,16) /* bits 39:24 of Base Address */ @@ -429,7 +442,6 @@ #define RMIXL_PCIX_IO_BAR(ba, en) \ ((uint32_t)(((ba) (26 - 18)) | ((en) ? RMIXL_PCIX_IO_BAR_ENB : 0))) - /* * RMIXLS_SBC_PCIE_CFG_BAR bit defines */ @@ -563,18 +575,92 @@ /* * GPIO Controller registers + * bit number is same as GPIO pin number for the GPIO masks below */ +#define RMIXL_GPIO_NSIGNALS 25 /* 25 GPIO signals supported in HW */ + /* GPIO Signal Registers */ #define RMIXL_GPIO_INT_ENB _RMIXL_OFFSET(0x0) /* Interrupt Enable register */ #define RMIXL_GPIO_INT_INV _RMIXL_OFFSET(0x1) /* Interrupt Inversion register */ #define RMIXL_GPIO_IO_DIR _RMIXL_OFFSET(0x2) /* I/O Direction register */ #define RMIXL_GPIO_OUTPUT _RMIXL_OFFSET(0x3) /* Output Write register */ -#define RMIXL_GPIO_INPUT _RMIXL_OFFSET(0x4) /* Intput Read register */ -#define RMIXL_GPIO_INT_CLR _RMIXL_OFFSET(0x5) /* Interrupt Inversion register */ -#define RMIXL_GPIO_INT_STS _RMIXL_OFFSET(0x6) /* Interrupt Status register */ +#define RMIXL_GPIO_INPUT _RMIXL_OFFSET(0x4) /* Intput Read register *//* ro */ +#define RMIXL_GPIO_INT_CLR _RMIXL_OFFSET(0x5) /* Interrupt Clear register */ +#define RMIXL_GPIO_INT_STS _RMIXL_OFFSET(0x6) /* Interrupt Status register *//* ro */ #define RMIXL_GPIO_INT_TYP _RMIXL_OFFSET(0x7) /* Interrupt Type register */ -#define RMIXL_GPIO_RESET _RMIXL_OFFSET(0x8) /* XLS Soft Reset register */ +#define
CVS commit: src/sys/arch/mips/rmi
Module Name:src Committed By: cliff Date: Fri Mar 18 00:58:54 UTC 2011 Modified Files: src/sys/arch/mips/rmi: rmixlvar.h Log Message: - add to struct rmixl_config storage for IO Peripherals Bus base address, address mask, and bus space. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/mips/rmi/rmixlvar.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/mips/rmi/rmixlvar.h diff -u src/sys/arch/mips/rmi/rmixlvar.h:1.3 src/sys/arch/mips/rmi/rmixlvar.h:1.4 --- src/sys/arch/mips/rmi/rmixlvar.h:1.3 Sun Feb 20 07:48:37 2011 +++ src/sys/arch/mips/rmi/rmixlvar.h Fri Mar 18 00:58:54 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: rmixlvar.h,v 1.3 2011/02/20 07:48:37 matt Exp $ */ +/* $NetBSD: rmixlvar.h,v 1.4 2011/03/18 00:58:54 cliff Exp $ */ /* * Copyright 2002 Wasabi Systems, Inc. @@ -112,6 +112,8 @@ struct rmixl_config { uint64_t rc_io_pbase; + uint64_t rc_flash_pbase; /* FLASH_BAR */ + uint64_t rc_flash_mask; /* FLASH_BAR */ bus_addr_t rc_pci_cfg_pbase; bus_size_t rc_pci_cfg_size; bus_addr_t rc_pci_ecfg_pbase; @@ -122,6 +124,7 @@ bus_size_t rc_pci_io_size; struct mips_bus_space rc_obio_eb_memt; /* DEVIO -eb */ struct mips_bus_space rc_obio_el_memt; /* DEVIO -el */ + struct mips_bus_space rc_iobus_memt; /* Peripherals IO Bus */ struct mips_bus_space rc_pci_cfg_memt; /* PCI CFG */ struct mips_bus_space rc_pci_ecfg_memt; /* PCI ECFG */ struct mips_bus_space rc_pci_memt; /* PCI MEM */ @@ -133,6 +136,7 @@ struct extent *rc_phys_ex; /* Note: MB units */ struct extent *rc_obio_eb_ex; struct extent *rc_obio_el_ex; + struct extent *rc_iobus_ex; struct extent *rc_pci_cfg_ex; struct extent *rc_pci_ecfg_ex; struct extent *rc_pci_mem_ex; @@ -149,6 +153,7 @@ extern void rmixl_obio_eb_bus_mem_init(bus_space_tag_t, void *); extern void rmixl_obio_el_bus_mem_init(bus_space_tag_t, void *); +extern void rmixl_iobus_bus_mem_init(bus_space_tag_t, void *); extern void rmixl_pci_cfg_bus_mem_init(bus_space_tag_t, void *); extern void rmixl_pci_ecfg_bus_mem_init(bus_space_tag_t, void *); extern void rmixl_pci_bus_mem_init(bus_space_tag_t, void *);
CVS commit: src/sys/arch/evbmips/conf
Module Name:src Committed By: cliff Date: Fri Mar 18 00:59:13 UTC 2011 Modified Files: src/sys/arch/evbmips/conf: files.rmixl Log Message: - remove obsolete TBD comment To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/evbmips/conf/files.rmixl 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/evbmips/conf/files.rmixl diff -u src/sys/arch/evbmips/conf/files.rmixl:1.3 src/sys/arch/evbmips/conf/files.rmixl:1.4 --- src/sys/arch/evbmips/conf/files.rmixl:1.3 Sun Feb 20 07:48:34 2011 +++ src/sys/arch/evbmips/conf/files.rmixl Fri Mar 18 00:59:13 2011 @@ -1,4 +1,4 @@ -# $NetBSD: files.rmixl,v 1.3 2011/02/20 07:48:34 matt Exp $ +# $NetBSD: files.rmixl,v 1.4 2011/03/18 00:59:13 cliff Exp $ file arch/evbmips/rmixl/autoconf.c file arch/evbmips/rmixl/machdep.c @@ -43,8 +43,6 @@ # # PCI bus support. # -## TBD - device pchb attach pchb at pci
CVS commit: src/sys/arch/mips/rmi
Module Name:src Committed By: cliff Date: Fri Mar 18 01:03:10 UTC 2011 Added Files: src/sys/arch/mips/rmi: rmixl_gpio.c Log Message: add gpio support for RMI XL* chips To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/arch/mips/rmi/rmixl_gpio.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/sys/arch/mips/rmi/rmixl_gpio.c diff -u /dev/null src/sys/arch/mips/rmi/rmixl_gpio.c:1.1 --- /dev/null Fri Mar 18 01:03:10 2011 +++ src/sys/arch/mips/rmi/rmixl_gpio.c Fri Mar 18 01:03:10 2011 @@ -0,0 +1,238 @@ +/* $NetBSD: rmixl_gpio.c,v 1.1 2011/03/18 01:03:10 cliff Exp $ */ +/* $NetBSD: rmixl_gpio.c,v 1.1 2011/03/18 01:03:10 cliff Exp $ */ +/*- + * Copyright (c) 2007 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Matt Thomas + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ +#include sys/cdefs.h +__KERNEL_RCSID(0, $NetBSD: rmixl_gpio.c,v 1.1 2011/03/18 01:03:10 cliff Exp $); + +#define _INTR_PRIVATE + +#include locators.h +#include gpio.h + +#include sys/param.h +#include sys/evcnt.h +#include sys/atomic.h + +#include uvm/uvm_extern.h + +#include machine/intr.h + +#include mips/cpu.h + +#include machine/bus.h + +#include mips/rmi/rmixlreg.h +#include mips/rmi/rmixlvar.h +#include mips/rmi/rmixl_obiovar.h + +#if NGPIO 0 +#include sys/gpio.h +#include dev/gpio/gpiovar.h +#endif + +struct gpio_softc { + device_t gpio_dev; + void *gpio_ih; + bus_space_tag_t gpio_memt; + bus_space_handle_t gpio_memh; + uint32_t gpio_enable_mask; + uint32_t gpio_edge_mask; + uint32_t gpio_edge_falling_mask; + uint32_t gpio_edge_rising_mask; + uint32_t gpio_level_mask; + uint32_t gpio_level_hi_mask; + uint32_t gpio_level_lo_mask; + uint32_t gpio_inuse_mask; +#if NGPIO 0 + struct gpio_chipset_tag gpio_chipset; + gpio_pin_t gpio_pins[RMIXL_GPIO_NSIGNALS]; +#endif +}; + +#define GPIO_READ(gpio, reg) \ + bus_space_read_4((gpio)-gpio_memt, (gpio)-gpio_memh, (reg)) +#define GPIO_WRITE(gpio, reg, val) \ + bus_space_write_4((gpio)-gpio_memt, (gpio)-gpio_memh, (reg), (val)) + +static int gpio_match(device_t, cfdata_t, void *); +static void gpio_attach(device_t, device_t, void *); + +CFATTACH_DECL_NEW(rmixl_gpio, + sizeof(struct gpio_softc), + gpio_match, gpio_attach, + NULL, NULL); + +#if NGPIO 0 + +static int +rmixl_gpio_pin_read(void *arg, int pin) +{ + struct gpio_softc * const gpio = arg; + + KASSERT(((1 pin) RMIXL_GPIO_INPUT_MASK) != 0); + return (GPIO_READ(gpio, RMIXL_GPIO_INPUT) pin) 1; +} + +static void +rmixl_gpio_pin_write(void *arg, int pin, int value) +{ + struct gpio_softc * const gpio = arg; + uint32_t mask = 1 pin; + uint32_t old, new; + + KASSERT(((1 pin) RMIXL_GPIO_OUTPUT_MASK) != 0); + + old = GPIO_READ(gpio, RMIXL_GPIO_OUTPUT); + if (value) + new = old | mask; + else + new = old ~mask; + + if (old != new) + GPIO_WRITE(gpio, RMIXL_GPIO_OUTPUT, new); +} + +static void +rmixl_gpio_pin_ctl(void *arg, int pin, int flags) +{ + struct gpio_softc * const gpio = arg; + uint32_t mask = 1 pin; + uint32_t old, new; + + KASSERT((flags (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) != (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)); + old = GPIO_READ(gpio, RMIXL_GPIO_IO_DIR); + new = old; + switch (flags (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) { + case GPIO_PIN_INPUT: new = ~mask; break; + case GPIO_PIN_OUTPUT: new |= mask; break; + default: return; + } + if (old != new) + GPIO_WRITE(gpio, RMIXL_GPIO_IO_DIR, new); +} + +static void +gpio_defer(device_t self) +{ + struct gpio_softc * const gpio = device_private(self); + struct gpio_chipset_tag * const gp =
CVS commit: src/sys/arch/mips/rmi
Module Name:src Committed By: cliff Date: Fri Mar 18 01:04:09 UTC 2011 Added Files: src/sys/arch/mips/rmi: rmixl_iobus_space.c rmixl_iobusvar.h Log Message: - add support for Peripherals IO Bus for RMI XL* chips To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/arch/mips/rmi/rmixl_iobus_space.c \ src/sys/arch/mips/rmi/rmixl_iobusvar.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/sys/arch/mips/rmi/rmixl_iobus_space.c diff -u /dev/null src/sys/arch/mips/rmi/rmixl_iobus_space.c:1.1 --- /dev/null Fri Mar 18 01:04:09 2011 +++ src/sys/arch/mips/rmi/rmixl_iobus_space.c Fri Mar 18 01:04:09 2011 @@ -0,0 +1,62 @@ +/* $NetBSD: rmixl_iobus_space.c,v 1.1 2011/03/18 01:04:09 cliff Exp $ */ + +/*- + * Copyright (c) 2001 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Jason R. Thorpe. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +/* + * bus_space(9) support for Peripherals IO Bus on RMI {XLP,XLR,XLS} chips + */ + +#include sys/cdefs.h +__KERNEL_RCSID(0, $NetBSD: rmixl_iobus_space.c,v 1.1 2011/03/18 01:04:09 cliff Exp $); + +#include sys/types.h +#include sys/param.h + +#include machine/bus.h +#include mips/rmi/rmixl_iobusvar.h +#include mips/rmi/rmixlreg.h +#include mips/rmi/rmixlvar.h + +#define CHIP rmixl_iobus +#define CHIP_MEM /* defined */ +#define CHIP_ACCESS_SIZE 1 +#define CHIP_BIG_ENDIAN + +#define CHIP_EX_MALLOC_SAFE(v) (((struct rmixl_config *)(v))-rc_mallocsafe) +#define CHIP_EXTENT(v) (((struct rmixl_config *)(v))-rc_iobus_ex) + + +/* MEM region 1 */ +#define CHIP_W1_BUS_START(v) 0 +#define CHIP_W1_BUS_END(v) RMIXL_FLASH_BAR_MASK_MAX +#define CHIP_W1_SYS_START(v) (((struct rmixl_config *)(v))-rc_flash_pbase) +#define CHIP_W1_SYS_END(v) (CHIP_W1_SYS_START(v) + RMIXL_FLASH_BAR_MASK_MAX) + +#include mips/mips/bus_space_alignstride_chipdep.c Index: src/sys/arch/mips/rmi/rmixl_iobusvar.h diff -u /dev/null src/sys/arch/mips/rmi/rmixl_iobusvar.h:1.1 --- /dev/null Fri Mar 18 01:04:09 2011 +++ src/sys/arch/mips/rmi/rmixl_iobusvar.h Fri Mar 18 01:04:09 2011 @@ -0,0 +1,45 @@ +/* $NetBSD: rmixl_iobusvar.h,v 1.1 2011/03/18 01:04:09 cliff Exp $ */ +/*- + * Copyright (c) 2011 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Cliff Neighbors + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +
CVS commit: src/sys/arch/mips/rmi
Module Name:src Committed By: cliff Date: Fri Mar 18 01:04:46 UTC 2011 Added Files: src/sys/arch/mips/rmi: rmixl_nand.c Log Message: - add NAND suport for RMI XL* chips To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/arch/mips/rmi/rmixl_nand.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/sys/arch/mips/rmi/rmixl_nand.c diff -u /dev/null src/sys/arch/mips/rmi/rmixl_nand.c:1.1 --- /dev/null Fri Mar 18 01:04:46 2011 +++ src/sys/arch/mips/rmi/rmixl_nand.c Fri Mar 18 01:04:46 2011 @@ -0,0 +1,420 @@ +/* $NetBSD: rmixl_nand.c,v 1.1 2011/03/18 01:04:46 cliff Exp $ */ +/* $NetBSD: rmixl_nand.c,v 1.1 2011/03/18 01:04:46 cliff Exp $ */ + +/*- + * Copyright (c) 2010 Department of Software Engineering, + * University of Szeged, Hungary + * Copyright (c) 2010 Adam Hoka ah...@netbsd.org + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by the Department of Software Engineering, University of Szeged, Hungary + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* + * Device driver for the RMI XLS NAND controller + */ + +#include sys/cdefs.h +__KERNEL_RCSID(0, $NetBSD: rmixl_nand.c,v 1.1 2011/03/18 01:04:46 cliff Exp $); + +#include opt_flash.h + +#include sys/param.h +#include sys/systm.h +#include sys/cdefs.h +#include sys/device.h +#include sys/endian.h + +#include machine/bus.h + +#include mips/rmi/rmixlreg.h +#include mips/rmi/rmixlvar.h +#include mips/rmi/rmixl_iobusvar.h +#include mips/rmi/rmixl_intr.h + +#include dev/nand/nand.h +#include dev/nand/onfi.h + + +static int rmixl_nand_match(struct device *, struct cfdata *, void *); +static void rmixl_nand_attach(struct device *, struct device *, void *); +static int rmixl_nand_detach(device_t, int); +static void rmixl_nand_command(device_t, uint8_t); +static void rmixl_nand_address(device_t, uint8_t); +static void rmixl_nand_busy(device_t); +static void rmixl_nand_read_byte(device_t, uint8_t *); +static void rmixl_nand_write_byte(device_t, uint8_t); +static void rmixl_nand_read_word(device_t, uint16_t *); +static void rmixl_nand_write_word(device_t, uint16_t); +static void rmixl_nand_read_buf(device_t, void *, size_t); +static void rmixl_nand_write_buf(device_t, const void *, size_t); + + +struct rmixl_nand_softc { + device_t sc_dev; + device_t sc_nanddev; + struct iobus_softc *sc_iobus_sc; + + int sc_cs; /* chip select index */ + int sc_buswidth; /* in bytes */ + + struct nand_interface sc_nand_if; + + bus_space_tag_t sc_obio_bst; + bus_space_handle_t sc_obio_bsh; + u_long sc_cmd_reg; + u_long sc_addr_reg; + + bus_addr_t sc_iobus_addr; + bus_size_t sc_iobus_size; + bus_space_tag_t sc_iobus_bst; + bus_space_handle_t sc_iobus_bsh; + u_long sc_data_reg; + +}; + +CFATTACH_DECL_NEW(rmixl_nand, sizeof(struct rmixl_nand_softc), rmixl_nand_match, +rmixl_nand_attach, rmixl_nand_detach, NULL); + +static int +rmixl_nand_match(struct device *parent, struct cfdata *match, void *aux) +{ + struct rmixl_iobus_attach_args *ia = aux; + bus_space_handle_t bsh; + volatile uint32_t *vaddr; + int err; + int rv = 0; + + if ((ia-ia_dev_parm RMIXL_FLASH_CSDEV_NANDEN) == 0) + return rv; /* not NAND */ + + if (cpu_rmixlp(mips_options.mips_cpu)) { + aprint_error(%s: NAND not yet supported on XLP, __func__); + return rv; + } + + if (! cpu_rmixls(mips_options.mips_cpu)) { + aprint_error(%s: NAND not supported on this processor, + __func__); + return rv; + } + + /* + * probe for NAND -- this may be redundant + * if the device isn't there, the NANDEN test (above) + * should have failed + */ + err = bus_space_map(ia-ia_iobus_bst, ia-ia_iobus_addr, +
CVS commit: src/sys/arch/mips/rmi
Module Name:src Committed By: cliff Date: Fri Mar 18 01:05:57 UTC 2011 Added Files: src/sys/arch/mips/rmi: rmixl_iobus.c Log Message: - add support for Peripherals IO Bus for RMI XL* chips To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/arch/mips/rmi/rmixl_iobus.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/sys/arch/mips/rmi/rmixl_iobus.c diff -u /dev/null src/sys/arch/mips/rmi/rmixl_iobus.c:1.1 --- /dev/null Fri Mar 18 01:05:57 2011 +++ src/sys/arch/mips/rmi/rmixl_iobus.c Fri Mar 18 01:05:57 2011 @@ -0,0 +1,385 @@ +/* $NetBSD: rmixl_iobus.c,v 1.1 2011/03/18 01:05:57 cliff Exp $ */ + +/*- + * Copyright (c) 2011 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Cliff Neighbors + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +/* + * RMI Peripherals IO Bus support + * - interface to NOR, NAND, PCMCIA Memory controlers, etc. + * - manages the 10 Chip Selects + * - manages the Flash interrupts + * - manages the Flash errors + */ + +/* + * iobus control registers are accessed as 32 bits. + * ALEn and CLEn NAND control registers are defined as 8 bits wide + * but that seems to be a documentation error. + * + * iobus data access may be as 1 or 2 or 4 bytes, even if device is 1 byte wide; + * the controller will sequence the bytes, in big-endian order. + */ + +#include sys/cdefs.h +__KERNEL_RCSID(0, $NetBSD: rmixl_iobus.c,v 1.1 2011/03/18 01:05:57 cliff Exp $); + +#include locators.h + +#include sys/param.h +#include sys/systm.h +#include sys/device.h + +#include machine/bus.h + +#include mips/rmi/rmixlreg.h +#include mips/rmi/rmixlvar.h +#include mips/rmi/rmixl_intr.h +#include mips/rmi/rmixl_obiovar.h +#include mips/rmi/rmixl_iobusvar.h +// #include mips/rmi/rmixl_gpiovar.h + +typedef struct { + bool cs_allocated; + uint32_t cs_addr; /* base address on the Peripherals I/O Bus */ + uint32_t cs_mask; /* address mask on the Peripherals I/O Bus */ + uint32_t cs_dev_parm; +} rmixl_iobus_csconfig_t; + +typedef struct rmixl_iobus_softc { + device_t sc_dev; + bus_space_tag_t sc_obio_bst; /* for iobus device controler access */ + bus_space_handle_t sc_obio_bsh; /* */ + bus_addr_t sc_obio_addr; + bus_size_t sc_obio_size; + bus_space_tag_t sc_iobus_bst; /* for iobus access */ + rmixl_iobus_csconfig_t sc_csconfig[RMIXL_FLASH_NCS]; +} rmixl_iobus_softc_t; + + +static int rmixl_iobus_match(device_t, cfdata_t, void *); +static void rmixl_iobus_attach(device_t, device_t, void *); +static void rmixl_iobus_csconfig_init(struct rmixl_iobus_softc *); +static int rmixl_iobus_print(void *, const char *); +static int rmixl_iobus_search(device_t, cfdata_t, const int *, void *); +#ifdef NOTYET +static int rmixl_iobus_intr(void *); +#endif + +#ifdef RMIXL_IOBUS_DEBUG +rmixl_iobus_softc_t *rmixl_iobus_sc; +#endif + + +CFATTACH_DECL_NEW(rmixl_iobus, sizeof (rmixl_iobus_softc_t), +rmixl_iobus_match, rmixl_iobus_attach, NULL, NULL); + +int +rmixl_iobus_match(device_t parent, cfdata_t match, void *aux) +{ + struct obio_attach_args *obio = aux; + +if (obio-obio_addr == RMIXL_IO_DEV_FLASH) + return rmixl_probe_4((volatile uint32_t *) + RMIXL_IOREG_VADDR(obio-obio_addr)); + +return 0; +} + +void +rmixl_iobus_attach(device_t parent, device_t self, void *aux) +{ + rmixl_iobus_softc_t *sc = device_private(self); + struct obio_attach_args *obio = aux; + struct rmixl_config *rcp = rmixl_configuration; + uint64_t r; + int err; + +#ifdef RMIXL_IOBUS_DEBUG + rmixl_iobus_sc = sc; +#endif +
CVS commit: src/sys/arch/mips/rmi
Module Name:src Committed By: cliff Date: Fri Mar 18 01:21:34 UTC 2011 Modified Files: src/sys/arch/mips/rmi: rmixl_iobus.c Log Message: - fix typo when clearing pre-existing intrs in attach To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/mips/rmi/rmixl_iobus.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/mips/rmi/rmixl_iobus.c diff -u src/sys/arch/mips/rmi/rmixl_iobus.c:1.1 src/sys/arch/mips/rmi/rmixl_iobus.c:1.2 --- src/sys/arch/mips/rmi/rmixl_iobus.c:1.1 Fri Mar 18 01:05:57 2011 +++ src/sys/arch/mips/rmi/rmixl_iobus.c Fri Mar 18 01:21:34 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: rmixl_iobus.c,v 1.1 2011/03/18 01:05:57 cliff Exp $ */ +/* $NetBSD: rmixl_iobus.c,v 1.2 2011/03/18 01:21:34 cliff Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -47,7 +47,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: rmixl_iobus.c,v 1.1 2011/03/18 01:05:57 cliff Exp $); +__KERNEL_RCSID(0, $NetBSD: rmixl_iobus.c,v 1.2 2011/03/18 01:21:34 cliff Exp $); #include locators.h @@ -156,7 +156,7 @@ /* write-1-to-clear Flash interrupt status */ bus_space_write_4(sc-sc_obio_bst, sc-sc_obio_bsh, - RMIXL_FLASH_INT_STATUS, 0); + RMIXL_FLASH_INT_STATUS, ~0); rmixl_iobus_csconfig_init(sc);
CVS commit: src/sys/arch/mips/rmi
Module Name:src Committed By: cliff Date: Fri Mar 18 02:01:45 UTC 2011 Modified Files: src/sys/arch/mips/rmi: rmixl_nand.c Log Message: cosmetics To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/mips/rmi/rmixl_nand.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/mips/rmi/rmixl_nand.c diff -u src/sys/arch/mips/rmi/rmixl_nand.c:1.1 src/sys/arch/mips/rmi/rmixl_nand.c:1.2 --- src/sys/arch/mips/rmi/rmixl_nand.c:1.1 Fri Mar 18 01:04:46 2011 +++ src/sys/arch/mips/rmi/rmixl_nand.c Fri Mar 18 02:01:45 2011 @@ -1,5 +1,4 @@ -/* $NetBSD: rmixl_nand.c,v 1.1 2011/03/18 01:04:46 cliff Exp $ */ -/* $NetBSD: rmixl_nand.c,v 1.1 2011/03/18 01:04:46 cliff Exp $ */ +/* $NetBSD: rmixl_nand.c,v 1.2 2011/03/18 02:01:45 cliff Exp $ */ /*- * Copyright (c) 2010 Department of Software Engineering, @@ -37,7 +36,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: rmixl_nand.c,v 1.1 2011/03/18 01:04:46 cliff Exp $); +__KERNEL_RCSID(0, $NetBSD: rmixl_nand.c,v 1.2 2011/03/18 02:01:45 cliff Exp $); #include opt_flash.h @@ -105,20 +104,20 @@ bus_space_handle_t bsh; volatile uint32_t *vaddr; int err; - int rv = 0; + int rv; if ((ia-ia_dev_parm RMIXL_FLASH_CSDEV_NANDEN) == 0) - return rv; /* not NAND */ + return 0; /* not NAND */ if (cpu_rmixlp(mips_options.mips_cpu)) { aprint_error(%s: NAND not yet supported on XLP, __func__); - return rv; + return 0; } if (! cpu_rmixls(mips_options.mips_cpu)) { aprint_error(%s: NAND not supported on this processor, __func__); - return rv; + return 0; } /* @@ -132,7 +131,7 @@ aprint_debug(%s: bus_space_map err %d, iobus space addr %# PRIxBUSADDR \n, __func__, err, ia-ia_iobus_addr); - return rv; + return 0; } vaddr = bus_space_vaddr(ia-ia_iobus_bst, bsh); @@ -201,8 +200,7 @@ sc-sc_buswidth = 4; /* 32 bit */ break; } - aprint_debug_dev(self, bus width %d bits\n, - 8 * sc-sc_buswidth); + aprint_debug_dev(self, bus width %d bits\n, 8 * sc-sc_buswidth); sc-sc_nand_if.select = nand_default_select; sc-sc_nand_if.command = rmixl_nand_command; @@ -247,8 +245,7 @@ if (sc-sc_nanddev != NULL) rv = config_detach(sc-sc_nanddev, flags); - bus_space_unmap(sc-sc_iobus_bst, sc-sc_iobus_bsh, - sc-sc_iobus_size); + bus_space_unmap(sc-sc_iobus_bst, sc-sc_iobus_bsh, sc-sc_iobus_size); return rv; } @@ -313,8 +310,7 @@ { struct rmixl_nand_softc *sc = device_private(self); - *data = bus_space_read_2(sc-sc_iobus_bst, sc-sc_iobus_bsh, - 0); + *data = bus_space_read_2(sc-sc_iobus_bst, sc-sc_iobus_bsh, 0); } static void
CVS commit: src/sys/arch/mips/conf
Module Name:src Committed By: cliff Date: Fri Mar 18 02:13:46 UTC 2011 Modified Files: src/sys/arch/mips/conf: files.rmixl Log Message: - add config for gpio - add config for iobus, nand, flash To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/mips/conf/files.rmixl 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/mips/conf/files.rmixl diff -u src/sys/arch/mips/conf/files.rmixl:1.3 src/sys/arch/mips/conf/files.rmixl:1.4 --- src/sys/arch/mips/conf/files.rmixl:1.3 Sun Feb 20 07:45:46 2011 +++ src/sys/arch/mips/conf/files.rmixl Fri Mar 18 02:13:46 2011 @@ -1,4 +1,4 @@ -# $NetBSD: files.rmixl,v 1.3 2011/02/20 07:45:46 matt Exp $ +# $NetBSD: files.rmixl,v 1.4 2011/03/18 02:13:46 cliff Exp $ # # Configuration info for RMI XLP, XLR, XLS # @@ -41,6 +41,11 @@ file arch/mips/rmi/rmixl_com.c com_rmixl defparam opt_com.hCONSADDR CONSFREQ CONSPEED CONMODE +# GPIO +device rmixl_gpio: gpiobus +attach rmixl_gpio at obio +file arch/mips/rmi/rmixl_gpio.c rmixl_gpio + # PCIe device rmixl_pcie: pcibus attach rmixl_pcie at obio @@ -51,6 +56,23 @@ attach rmixl_pcix at obio filearch/mips/rmi/rmixl_pcix.c rmixl_pcix needs-flag +# RMI Periperal IO Bus to Flash, PCMCIA memory controllers +define rmixl_iobus { [cs=-1], [addr=-1], [size=-1], [intr=-1] } +device rmixl_iobus: rmixl_iobus +attach rmixl_iobus at obio +filearch/mips/rmi/rmixl_iobus_space.c rmixl_iobus +filearch/mips/rmi/rmixl_iobus.c rmixl_iobus + +# NAND flash controller +device rmixl_nand: nandbus +attach rmixl_nand at rmixl_iobus +filearch/mips/rmi/rmixl_nand.c rmixl_nand + +# PCMCIA controller +device rmixl_pcic: pcmciabus +attach rmixl_pcic at rmixl_iobus +filearch/mips/rmi/rmixl_pcic.c rmixl_pcic + # On-chip USB interface define rmixl_usbi { [addr=-1], [size=-1], [intr=-1] } device rmixl_usbi: rmixl_usbi
CVS commit: src/sys/arch/evbmips/conf
Module Name:src Committed By: cliff Date: Fri Mar 18 02:14:56 UTC 2011 Modified Files: src/sys/arch/evbmips/conf: XLSATX Log Message: - add config for gpio, iobus, nand, flash - config for pcic, pcmcia stubbed for now (drivers TBD) - ensure space-tab is used to maintain format when commented To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/evbmips/conf/XLSATX 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/evbmips/conf/XLSATX diff -u src/sys/arch/evbmips/conf/XLSATX:1.2 src/sys/arch/evbmips/conf/XLSATX:1.3 --- src/sys/arch/evbmips/conf/XLSATX:1.2 Sun Feb 20 07:48:33 2011 +++ src/sys/arch/evbmips/conf/XLSATX Fri Mar 18 02:14:55 2011 @@ -1,8 +1,8 @@ -# $NetBSD: XLSATX,v 1.2 2011/02/20 07:48:33 matt Exp $ +# $NetBSD: XLSATX,v 1.3 2011/03/18 02:14:55 cliff Exp $ include arch/evbmips/conf/std.rmixl -#ident XLSATX-$Revision: 1.2 $ +#ident XLSATX-$Revision: 1.3 $ #options INCLUDE_CONFIG_FILE # embed config file in kernel binary @@ -11,13 +11,13 @@ # # MEMSIZE can be used to limit memory amount used # -##options MEMSIZE=0x1000 # 256MB +#options MEMSIZE=0x1000 # 256MB # # MEMLIMIT can be used to limit memory address used # defparam opt_memsize.h MEMLIMIT -##options MEMLIMIT=0x1000 # 256MB +#options MEMLIMIT=0x1000 # 256MB options NOFPU # No FPU #options FPEMUL # emulate FPU insn @@ -39,12 +39,13 @@ options USERCONF # userconf(4) support #options SYSCTL_INCLUDE_DESCR # Include sysctl descriptions in kernel options DDB # kernel dynamic debugger -options MIPS_DDB_WATCH # enable T_WATCH (see IEU_DEFAUTURE[DBE]) +options MIPS_DDB_WATCH # enable T_WATCH (see IEU_DEFAUTURE[DBE]) options DDB_HISTORY_SIZE=100 # enable history editing in DDB makeoptions DEBUG=-g # compile full symbol table options SYMTAB_SPACE=50 # size for embedded symbol table -#options DDB_COMMANDONENTER=trace;show registers -options DB_MAX_LINE=-1 +#options DDB_COMMANDONENTER=trace;show registers +options DB_MAX_LINE=-1 +options LOCKDEBUG # Compatibility options #options COMPAT_43 # compatibility with 4.3BSD binaries @@ -140,16 +141,25 @@ mainbus0 at root -cpunode* at mainbus? node ? -cpucore* at cpunode? core ? +cpunode* at mainbus? node ? +cpucore* at cpunode? core ? cpu* at cpucore? thread ? obio0 at cpunode? com0 at obio0 addr 0x14000 intr 9 com1 at obio0 addr 0x15000 intr 10 -options COM_REGMAP -rmixl_pcix0 at obio0 +options COM_REGMAP +rmixl_gpio0 at obio0 addr 0x18000 intr 14 +gpio* at rmixl_gpio? +rmixl_iobus0 at obio0 addr 0x19000 +rmixl_nand* at rmixl_iobus? addr 0x0180 +#rmixl_nand* at rmixl_iobus? cs 2 +nand* at rmixl_nand? +flash* at nand? +#rmixl_pcic* at rmixl_iobus? cs 6 addr 0x0100 +#pcmcia* at rmixl_pcic +rmixl_pcix0 at obio0 pci* at rmixl_pcix0 -rmixl_pcie0 at obio0 +rmixl_pcie0 at obio0 pci* at rmixl_pcie0 ppb* at pci? pci* at ppb? @@ -160,11 +170,11 @@ msk* at mskc? makphy* at mii? phy ? # Marvell 88E1000 PHYs ukphy* at mii? phy ? # unknown PHY -rmixl_usbi0 at obio0 addr 0x25000 intr 31 +rmixl_usbi0 at obio0 addr 0x25000 intr 31 ohci0 at rmixl_usbi0 addr 0x24400 size 0x400 intr 0 ohci1 at rmixl_usbi0 addr 0x24800 size 0x400 intr 1 ehci0 at rmixl_usbi0 addr 0x24000 size 0x400 intr 2 -siisata* at pci? dev ? function ? +siisata* at pci? dev ? function ? atabus* at ata? wd* at atabus? drive ? flags 0x @@ -175,7 +185,7 @@ uhub* at uhub? port ? umass* at uhub? port ? configuration ? interface ? wd* at umass? -scsibus* at umass? channel ? +scsibus* at umass? channel ? sd* at scsibus? target ? lun ?
CVS commit: src/regress/sys/arch/i386/ldt
Module Name:src Committed By: joerg Date: Fri Mar 18 03:06:22 UTC 2011 Modified Files: src/regress/sys/arch/i386/ldt: testldt.c Log Message: Kill a redundant lvalue cast in assembler constrained. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/regress/sys/arch/i386/ldt/testldt.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/regress/sys/arch/i386/ldt/testldt.c diff -u src/regress/sys/arch/i386/ldt/testldt.c:1.14 src/regress/sys/arch/i386/ldt/testldt.c:1.15 --- src/regress/sys/arch/i386/ldt/testldt.c:1.14 Mon Apr 28 20:23:05 2008 +++ src/regress/sys/arch/i386/ldt/testldt.c Fri Mar 18 03:06:21 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: testldt.c,v 1.14 2008/04/28 20:23:05 martin Exp $ */ +/* $NetBSD: testldt.c,v 1.15 2011/03/18 03:06:21 joerg Exp $ */ /*- * Copyright (c) 1993 The NetBSD Foundation, Inc. @@ -58,7 +58,7 @@ { unsigned short _v; - __asm (movw %%cs,%0: =r ((unsigned short) _v)); + __asm (movw %%cs,%0: =r (_v)); return _v; }