Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch Split mdio/mii access into its own "device" and upd...
details: https://anonhg.NetBSD.org/src/rev/f609c0f8b819
branches: trunk
changeset: 780416:f609c0f8b819
user: matt <matt%NetBSD.org@localhost>
date: Sun Jul 22 23:46:10 2012 +0000
description:
Split mdio/mii access into its own "device" and update accordingly.
(on the P1025 the mdio functionality is separate from the etsec functions).
Provide locking for mii access.
diffstat:
sys/arch/evbppc/conf/MPC8536DS | 9 +-
sys/arch/evbppc/conf/MPC8548CDS | 9 +-
sys/arch/evbppc/conf/P2020DS | 26 +-
sys/arch/evbppc/conf/P2020RDB | 21 +-
sys/arch/evbppc/conf/RB800 | 9 +-
sys/arch/evbppc/conf/TWRP1025 | 14 +-
sys/arch/evbppc/mpc85xx/machdep.c | 14 +-
sys/arch/powerpc/booke/dev/pq3etsec.c | 346 +++++++++++++++++++--------------
sys/arch/powerpc/conf/files.booke | 13 +-
9 files changed, 268 insertions(+), 193 deletions(-)
diffs (truncated from 830 to 300 lines):
diff -r 304ad88f052d -r f609c0f8b819 sys/arch/evbppc/conf/MPC8536DS
--- a/sys/arch/evbppc/conf/MPC8536DS Sun Jul 22 22:44:28 2012 +0000
+++ b/sys/arch/evbppc/conf/MPC8536DS Sun Jul 22 23:46:10 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: MPC8536DS,v 1.10 2011/12/18 05:49:26 dholland Exp $
+# $NetBSD: MPC8536DS,v 1.11 2012/07/22 23:46:10 matt Exp $
#
# MPC8536DS -- everything that's currently supported
#
@@ -7,7 +7,7 @@
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
-ident "MPC8536DS-$Revision: 1.10 $"
+ident "MPC8536DS-$Revision: 1.11 $"
maxusers 32
@@ -163,8 +163,9 @@
options CONSPEED=9600
options CONSADDR="DUART1_BASE"
-tsec0 at cpunode? flags 0x002 # Enhanced 3-Speed Ethernet Controller
-tsec1 at cpunode? flags 0x101 # Enhanced 3-Speed Ethernet Controller
+tsec0 at cpunode? phy 1 # Enhanced 3-Speed Ethernet Controller
+mdio0 at tsec0
+tsec1 at cpunode? mdio 0 phy 0 # Enhanced 3-Speed Ethernet Controller
ciphy* at mii? # Cicada PHY
ukphy* at mii?
#options ETSEC_EVENT_COUNTERS
diff -r 304ad88f052d -r f609c0f8b819 sys/arch/evbppc/conf/MPC8548CDS
--- a/sys/arch/evbppc/conf/MPC8548CDS Sun Jul 22 22:44:28 2012 +0000
+++ b/sys/arch/evbppc/conf/MPC8548CDS Sun Jul 22 23:46:10 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: MPC8548CDS,v 1.9 2011/12/18 05:49:26 dholland Exp $
+# $NetBSD: MPC8548CDS,v 1.10 2012/07/22 23:46:10 matt Exp $
#
# MPC8548CDS -- everything that's currently supported
#
@@ -7,7 +7,7 @@
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
-ident "MPC8548CDS-$Revision: 1.9 $"
+ident "MPC8548CDS-$Revision: 1.10 $"
maxusers 32
@@ -157,8 +157,9 @@
com* at duart? port ?
options CONSPEED=115200
-tsec0 at cpunode? flags 1 # Enhanced 3-Speed Ethernet Controller
-tsec1 at cpunode? flags 1 # Enhanced 3-Speed Ethernet Controller
+tsec0 at cpunode? phy 0 # Enhanced 3-Speed Ethernet Controller
+mdio0 at tsec0
+tsec1 at cpunode? mdio 0 phy 1 # Enhanced 3-Speed Ethernet Controller
makphy* at mii? # Marvell PHY
ukphy* at mii?
#options ETSEC_EVENT_COUNTERS
diff -r 304ad88f052d -r f609c0f8b819 sys/arch/evbppc/conf/P2020DS
--- a/sys/arch/evbppc/conf/P2020DS Sun Jul 22 22:44:28 2012 +0000
+++ b/sys/arch/evbppc/conf/P2020DS Sun Jul 22 23:46:10 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: P2020DS,v 1.11 2011/12/18 05:49:26 dholland Exp $
+# $NetBSD: P2020DS,v 1.12 2012/07/22 23:46:10 matt Exp $
#
# P2020DS -- everything that's currently supported
#
@@ -8,7 +8,7 @@
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
-ident "P2020DS-$Revision: 1.11 $"
+ident "P2020DS-$Revision: 1.12 $"
maxusers 32
@@ -20,13 +20,16 @@
#options SYS_CLK=100000000
#options HZ=1000
#options MEMSIZE=0x40000000
+#options PMAP_MINIMALTLB
+#makeoptions KERNLDSCRIPT="${POWERPC}/conf/kern-mb.ldscript"
makeoptions NEED_BINARY="yes"
makeoptions NEED_UBOOTIMAGE="yes"
-#options INSECURE # disable kernel security levels
+options INSECURE # disable kernel security levels
#options NTP # NTP phase/frequency locked loop
options KTRACE # system call tracing via ktrace(1)
+options MODULAR # new style module(7) framework
options SYSVMSG # System V message queues
options SYSVSEM # System V semaphores
@@ -43,7 +46,7 @@
options DDB # in-kernel debugger
options DDB_HISTORY_SIZE=512 # enable history editing in DDB
options TRAP_PANICWAIT
-options SYMTAB_SPACE=410000 # size for embedded symbol table
+options SYMTAB_SPACE=425000 # size for embedded symbol table
makeoptions DEBUG="-g" # compile full symbol table
@@ -78,7 +81,7 @@
file-system KERNFS # /kern
file-system NULLFS # loopback file system
#file-system OVERLAY # overlay file system
-#file-system PUFFS # Userspace file systems (e.g. ntfs-3g & sshfs)
+file-system PUFFS # Userspace file systems (e.g. ntfs-3g & sshfs)
file-system PROCFS # /proc
#file-system UMAPFS # NULLFS + uid and gid remapping
#file-system UNION # union file system
@@ -102,7 +105,7 @@
options INET_CSUM_COUNTERS
options TCP_CSUM_COUNTERS
options UDP_CSUM_COUNTERS
-#options INET6 # IPV6
+options INET6 # IPV6
#options IPSEC # IP security
#options IPSEC_ESP # IP security (encryption part; define w/IPSEC)
#options IPSEC_NAT_T # IPsec NAT traversal (NAT-T)
@@ -167,9 +170,10 @@
options CONSPEED=115200
options CONSADDR="DUART1_BASE"
-tsec0 at cpunode? flags 0x001 # Enhanced 3-Speed Ethernet Controller
-tsec1 at cpunode? flags 0x102 # Enhanced 3-Speed Ethernet Controller
-tsec2 at cpunode? flags 0x103 # Enhanced 3-Speed Ethernet Controller
+tsec0 at cpunode? phy 0 # Enhanced 3-Speed Ethernet Controller
+mdio0 at tsec0
+tsec1 at cpunode? mdio 0 phy 1 # Enhanced 3-Speed Ethernet Controller
+tsec2 at cpunode? mdio 0 phy 2 # Enhanced 3-Speed Ethernet Controller
options ETSEC_EVENT_COUNTERS
ehci* at cpunode? # usb
@@ -177,7 +181,7 @@
diic* at cpunode? # i2c bus
iic* at diic?
spdmem* at iic0 addr 0x51 # DDR
-dsrtc* at iic1 addr 0x68 # RTC
+dsrtc* at iic1 addr 0x68 flags 3232 # RTC - DS3232
pq3pcie* at cpunode? # PCI-Express controller
pq3pci* at cpunode? # PCI(X)
@@ -233,3 +237,5 @@
pseudo-device pty # pseudo-terminals
pseudo-device kttcp # kernel ttcp
pseudo-device vlan # 802.1Q VLANs
+pseudo-device putter # for puffs and pud
+pseudo-device vnd # disk-like interface to files
diff -r 304ad88f052d -r f609c0f8b819 sys/arch/evbppc/conf/P2020RDB
--- a/sys/arch/evbppc/conf/P2020RDB Sun Jul 22 22:44:28 2012 +0000
+++ b/sys/arch/evbppc/conf/P2020RDB Sun Jul 22 23:46:10 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: P2020RDB,v 1.12 2011/12/18 05:49:26 dholland Exp $
+# $NetBSD: P2020RDB,v 1.13 2012/07/22 23:46:10 matt Exp $
#
# P2020RBD -- everything that's currently supported
#
@@ -7,7 +7,7 @@
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
-ident "P2020RBD-$Revision: 1.12 $"
+ident "P2020RBD-$Revision: 1.13 $"
maxusers 32
@@ -21,6 +21,8 @@
options SYS_CLK=100000000
#options HZ=1000
+#options SDHC_DEBUG
+
#options INSECURE # disable kernel security levels
#options NTP # NTP phase/frequency locked loop
options KTRACE # system call tracing via ktrace(1)
@@ -165,15 +167,16 @@
com* at duart? port ?
options CONSADDR="DUART1_BASE"
-tsec0 at cpunode? flags 0x021 # Enhanced 3-Speed Ethernet Controller
-tsec1 at cpunode? flags 0x101 # Enhanced 3-Speed Ethernet Controller
-tsec2 at cpunode? flags 0x102 # Enhanced 3-Speed Ethernet Controller
+tsec0 at cpunode? phy 32 # Enhanced 3-Speed Ethernet Controller
+mdio0 at tsec0
+tsec1 at cpunode? mdio 0 phy 0 # Enhanced 3-Speed Ethernet Controller
+tsec2 at cpunode? mdio 0 phy 1 # Enhanced 3-Speed Ethernet Controller
ukphy* at mii?
#options ETSEC_EVENT_COUNTERS
diic* at cpunode? # i2c bus
iic* at diic?
-dsrtc* at iic1 addr 0x68 # RTC
+dsrtc* at iic1 addr 0x68 flags 1339 # RTC DS1339
pq3pcie* at cpunode? # PCI-Express controller
pq3pci* at cpunode? # PCI(X)
@@ -194,9 +197,9 @@
scsibus* at umass? channel ?
sd* at scsibus? target ? lun ?
-#sdhc* at cpunode? # sdmmc
-#sdmmc* at sdhc? # SD/MMC bus
-#ld* at sdmmc?
+sdhc* at cpunode? # sdmmc
+sdmmc* at sdhc? # SD/MMC bus
+ld* at sdmmc?
#siisata* at pci? dev ? function ?
#atabus* at siisata? channel ?
diff -r 304ad88f052d -r f609c0f8b819 sys/arch/evbppc/conf/RB800
--- a/sys/arch/evbppc/conf/RB800 Sun Jul 22 22:44:28 2012 +0000
+++ b/sys/arch/evbppc/conf/RB800 Sun Jul 22 23:46:10 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: RB800,v 1.16 2012/01/19 23:37:23 matt Exp $
+# $NetBSD: RB800,v 1.17 2012/07/22 23:46:10 matt Exp $
#
# RB800 -- everything that's currently supported
#
@@ -7,7 +7,7 @@
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
-ident "RB800-$Revision: 1.16 $"
+ident "RB800-$Revision: 1.17 $"
maxusers 32
@@ -169,8 +169,9 @@
options CONSPEED=115200
options CONSADDR="DUART1_BASE"
-tsec0 at cpunode? flags 0x003 # 3-Speed Ethernet Controller (phy 2)
-tsec1 at cpunode? flags 0x102 # 3-Speed Ethernet Controller (phy 1)
+tsec0 at cpunode? phy 2 # 3-Speed Ethernet Controller (phy 2)
+mdio0 at tsec0
+tsec1 at cpunode? mdio 0 phy 1 # 3-Speed Ethernet Controller (phy 1)
atphy* at mii? # Attansic PHY
ukphy* at mii?
#options TSEC_EVENT_COUNTERS
diff -r 304ad88f052d -r f609c0f8b819 sys/arch/evbppc/conf/TWRP1025
--- a/sys/arch/evbppc/conf/TWRP1025 Sun Jul 22 22:44:28 2012 +0000
+++ b/sys/arch/evbppc/conf/TWRP1025 Sun Jul 22 23:46:10 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: TWRP1025,v 1.4 2012/07/18 19:39:54 matt Exp $
+# $NetBSD: TWRP1025,v 1.5 2012/07/22 23:46:10 matt Exp $
#
# TWRP1025 -- everything that's currently supported
#
@@ -7,7 +7,7 @@
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
-ident "TWRP1025-$Revision: 1.4 $"
+ident "TWRP1025-$Revision: 1.5 $"
maxusers 32
@@ -21,8 +21,6 @@
options SYS_CLK=66666667
#options HZ=1000
-#options SDHC_DEBUG
-
#options INSECURE # disable kernel security levels
#options NTP # NTP phase/frequency locked loop
options KTRACE # system call tracing via ktrace(1)
@@ -171,8 +169,10 @@
com* at duart? port ?
options CONSADDR="DUART1_BASE"
-tsec0 at cpunode? instance 1 flags 0x003 # Enhanced 3-Speed Ethernet Controller
-tsec1 at cpunode? instance 3 flags 0x102 # Enhanced 3-Speed Ethernet Controller
+mdio0 at cpunode? instance 1
+tsec0 at cpunode? instance 1 mdio 0 phy 2 # Enhanced 3-Speed Ethernet Controller
+tsec1 at cpunode? instance 3 mdio 0 phy 1 # Enhanced 3-Speed Ethernet Controller
+atphy* at mii?
ukphy* at mii?
#options ETSEC_EVENT_COUNTERS
@@ -198,6 +198,8 @@
scsibus* at umass? channel ?
sd* at scsibus? target ? lun ?
+#options SDHC_DEBUG
+#options SDMMC_DEBUG
sdhc* at cpunode? # sdmmc
sdmmc* at sdhc? # SD/MMC bus
ld* at sdmmc?
diff -r 304ad88f052d -r f609c0f8b819 sys/arch/evbppc/mpc85xx/machdep.c
--- a/sys/arch/evbppc/mpc85xx/machdep.c Sun Jul 22 22:44:28 2012 +0000
+++ b/sys/arch/evbppc/mpc85xx/machdep.c Sun Jul 22 23:46:10 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.27 2012/07/18 19:38:26 matt Exp $ */
+/* $NetBSD: machdep.c,v 1.28 2012/07/22 23:46:10 matt Exp $ */
/*-
* Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
Home |
Main Index |
Thread Index |
Old Index