Remove support for OMAP based Gumstix platforms.

These changes are to prepare for the removal of arch/arm/omap. Support
for Xscale based Gumstix platforms remains.

(If someone wants to resurrect DuoVero and Pepper platforms, it's best
to do that in the GENERIC kernel using FDT.)
This commit is contained in:
jmcneill 2022-10-29 13:10:25 +00:00
parent f980ceeb47
commit 5e697dbfa9
9 changed files with 10 additions and 2729 deletions

View File

@ -1,4 +1,4 @@
.\" $NetBSD: gxio.4,v 1.1 2017/04/06 14:35:15 wiz Exp $
.\" $NetBSD: gxio.4,v 1.2 2022/10/29 13:10:26 jmcneill Exp $
.\"
.\" Copyright (c) 2017 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 April 3, 2017
.Dd October 29, 2022
.Dt GXIO 4
.Os
.Sh NAME
@ -46,11 +46,10 @@ using boot time parameter.
The supported extension boards is system specific.
.Pp
.Nm
is available for OMAP based Overo/DouVero and Pepper
as well as for XScale based Gumstix boards.
is available for XScale based Gumstix boards.
To setup the expansion board on boot the parameter
.Dq expansion
for OMAP and XScale can be used.
can be used.
Additionally, some XScale systems can connect two expansion boards.
The second board can be configured by the
.Dq busheader
@ -99,27 +98,6 @@ For Xscale based boards the following values are supported:
.It wfistix
.It wfistix-cf
.El
.Pp
For Overo the following values are supported:
.Bl -column
.It chestnut43
.It gallop43
.It summit
.It tobi
.It tobi-duo
.El
.Pp
For DuoVero the following value is supported:
.Bl -column
.It parlor
.El
.Pp
For Pepper the following values are supported:
.Bl -column
.It 43c
.It 43r
.It dvi
.El
.El
.Sh SEE ALSO
.Xr pxaip 4 ,

View File

@ -1,297 +0,0 @@
#
# $NetBSD: DUOVERO,v 1.24 2022/08/07 02:52:25 simonb Exp $
#
# DUOOVERO -- Gumstix. Inc. DuoVero COMS platforms kernel
#
include "arch/evbarm/conf/std.overo"
#options INCLUDE_CONFIG_FILE # embed config file in kernel binary
# estimated number of users
maxusers 32
# CPU options
options CPU_CORTEX
options OMAP_4430
options MULTIPROCESSOR
options __HAVE_CPU_UAREA_ALLOC_IDLELWP # need for MULTIPROCESSOR
options FPU_VFP
#options PMAPCOUNTERS
options ARM_HAS_VBAR
options __HAVE_MM_MD_DIRECT_MAPPED_PHYS
makeoptions CPUFLAGS="-mcpu=cortex-a9 -mfpu=neon"
# Architecture options
makeoptions BOARDTYPE="duovero"
options EVBARM_BOARDTYPE=duovero
# Gumstix options
options DUOVERO
# Can specify 'expansion=' in args from u-boot.
options GUMSTIX_NETBSD_ARGS_EXPANSION
options GXIO_DEFAULT_EXPANSION="\"Parlor\""
# Standard system options
options RTC_OFFSET=0 # hardware clock is this many mins. west of GMT
#options NTP # NTP phase/frequency locked loop
# File systems
file-system FFS # UFS
file-system EXT2FS # second extended file system (linux)
#file-system LFS # log-structured file system
file-system MFS # memory file system
file-system NFS # Network file system
#file-system NTFS # Windows/NT file system (experimental)
#file-system CD9660 # ISO 9660 + Rock Ridge file system
file-system MSDOSFS # MS-DOS file system
file-system FDESC # /dev/fd
file-system KERNFS # /kern
#file-system NULLFS # loopback file system
#file-system OVERLAY # overlay file system
#file-system PROCFS # /proc
#file-system PUFFS # Userspace file systems (e.g. ntfs-3g & sshfs)
#file-system UMAPFS # NULLFS + uid and gid remapping
file-system UNION # union file system
#file-system CODA # Coda File System; also needs vcoda (below)
file-system TMPFS # memory file system
file-system PTYFS # /dev/pts/N support
#file-system UDF # experimental - OSTA UDF CD/DVD file-system
#file-system HFS # experimental - Apple HFS+ (read-only)
# File system options
#options FFS_EI # FFS Endian Independent support
#options FFS_NO_SNAPSHOT # No FFS snapshot support
#options QUOTA # legacy UFS quotas
#options QUOTA2 # new, in-filesystem UFS quotas
options UFS_DIRHASH # UFS Large Directory Hashing
options UFS_EXTATTR # Extended attribute support for UFS1
options WAPBL # File system journaling support
#options EXT2FS_SYSTEM_FLAGS # makes ext2fs file flags (append and
# immutable) behave as system flags.
#options DISKLABEL_EI # disklabel Endian Independent support
#options NFSSERVER # Network File System server
# Networking options
#options GATEWAY # packet forwarding
options INET # IP + ICMP + TCP + UDP
options INET6 # IPV6
#options IPSEC # IP security
#options IPSEC_DEBUG # debug for IP security
#options MROUTING # IP multicast routing
#options PIM # Protocol Independent Multicast
#options NETATALK # AppleTalk networking
#options PPP_BSDCOMP # BSD-Compress compression support for PPP
#options PPP_DEFLATE # Deflate compression support for PPP
#options PPP_FILTER # Active filter support for PPP (requires bpf)
#options TCP_DEBUG # Record last TCP_NDEBUG packets with SO_DEBUG
options NFS_BOOT_BOOTP
options NFS_BOOT_DHCP
#options NFS_BOOT_BOOTPARAM
# Compatibility options
include "conf/compat_netbsd30.config"
options COMPAT_NETBSD32 # allow running arm (e.g. non-earm) binaries
# Shared memory options
#options SYSVMSG # System V-like message queues
#options SYSVSEM # System V-like semaphores
#options SYSVSHM # System V-like memory sharing
# Device options
#options MEMORY_DISK_HOOKS # boottime setup of ramdisk
#options MEMORY_DISK_IS_ROOT # use memory disk as root
#options MEMORY_DISK_DYNAMIC
#options MEMORY_DISK_ROOT_SIZE=8192 # Size in blocks
# Miscellaneous kernel options
options KTRACE # system call tracing, a la ktrace(1)
options IRQSTATS # manage IRQ statistics
#options MIIVERBOSE # verbose PHY autoconfig messages
#options USBVERBOSE # verbose USB device autoconfig messages
#options DDB_KEYCODE=0x40
#options USERCONF # userconf(4) support
#options PIPE_SOCKETPAIR # smaller, but slower pipe(2)
#options SYSCTL_INCLUDE_DESCR # Include sysctl descriptions in kernel
# Development and Debugging options
options DIAGNOSTIC # internal consistency checks
options DEBUG
#options LOCKDEBUG
#options UVMHIST # kernhist for uvm/pmap subsystems
#options VERBOSE_INIT_ARM # verbose bootstraping messages
options DDB # in-kernel debugger
options DDB_ONPANIC=1
options DDB_HISTORY_SIZE=100 # Enable history editing in DDB
#options KGDB
makeoptions DEBUG="-g" # compile full symbol table
makeoptions COPY_SYMTAB=1
config netbsd root on ? type ?
# The main bus device
mainbus0 at root
# The boot cpu
cpu* at mainbus?
# A9 core devices
armperiph0 at mainbus?
arml2cc0 at armperiph? # L2 Cache Controller
armgic0 at armperiph? # Interrupt Controller
arma9tmr0 at armperiph? # Global Timer
arma9wdt0 at armperiph? # Watchdog
# L3 Interconnect
L3i0 at mainbus?
# OBIO
obio0 at mainbus? base 0x4a000000 size 0x1000000 # L4 CORE (CFG)
obio1 at mainbus? base 0x4a300000 size 0x0100000 # L4 WAKEUP
obio2 at mainbus? base 0x48000000 size 0x1000000 # L4 PERIPHERAL
obio3 at mainbus? base 0x49000000 size 0x1000000 # L4 ABE
# General Purpose Memory Controller
gpmc0 at mainbus? base 0x50000000
omapgpio0 at obio1 addr 0x4a310000 size 0x0400 intrbase 160 intr 61
omapgpio1 at obio2 addr 0x48055000 size 0x0400 intrbase 192 intr 62
omapgpio2 at obio2 addr 0x48057000 size 0x0400 intrbase 224 intr 63
omapgpio3 at obio2 addr 0x48059000 size 0x0400 intrbase 256 intr 64
omapgpio4 at obio2 addr 0x4805b000 size 0x0400 intrbase 288 intr 65
omapgpio5 at obio2 addr 0x4805d000 size 0x0400 intrbase 320 intr 66
gpio* at omapgpio?
gpiobutton* at gpio3 offset 0 mask 0x02000000 flag 0x01
# I2C Controller
tiiic0 at obio2 addr 0x48070000 size 0x100 intr 88 # I2C1
tiiic1 at obio2 addr 0x48350000 size 0x100 intr 94 # I2C4
#tiiic2 at obio2 addr 0x48072000 size 0x100 intr 89 # I2C2
iic* at tiiic?
# Power Management and System Companion Device
#twl6030pm0 at iic0 addr 0x48
#twl6030pm1 at iic0 addr 0x49
#twl6030pm2 at iic0 addr 0x4a
#twl6040 at iic0 addr 0x4b
# On-board 16550 UARTs
com0 at obio2 addr 0x48020000 intr 106 mult 4 # UART3 (console)
options CONSADDR=0x48020000, CONSPEED=115200
#com1 at obio2 addr 0x4806c000 intr 105 mult 4 # UART2
# Power, Reset and Clock Management
prcm* at obio1 addr 0x4a306000 size 0x2000 # PRM Module
# MMC/SDIO
sdhc0 at obio2 addr 0x4809c000 size 0x1000 intr 115 # MMCHS1
#sdhc1 at obio2 addr 0x480d5000 size 0x1000 intr 91 # MMCHS5
#sdhc2 at obio2 addr 0x480ad000 size 0x1000 intr 126 # MMCHS3
sdmmc* at sdhc? # SD/MMC bus
ld* at sdmmc?
#wi2wi at sdmmc? # W2CBW0015 (ZEPHER)
#wl18xx at sdmmc? # TI WiLink8 (ZEPHER-Y)
# duovero expansion boards
# SMSC LAN9221
smsh0 at gpmc? cs 5 intr 204 # PARLOR
ukphy* at mii? phy ? # smsh(4) internal PHY
# On-board USB
ohci* at obio0 addr 0x4a064800 size 0x0400 intr 108
ehci* at obio0 addr 0x4a064c00 size 0x0400 intr 109
usb* at ohci?
usb* at ehci?
# USB Hubs
uhub* at usb?
uhub* at uhub? port ?
umass* at uhub? port ?
scsibus* at scsi?
sd* at scsibus? target ? lun ?
# Pseudo-Devices
# disk/mass storage pseudo-devices
#pseudo-device bio # RAID control device driver
#pseudo-device ccd # concatenated/striped disk devices
pseudo-device cgd # cryptographic disk devices
#pseudo-device raid # RAIDframe disk driver
#options RAID_AUTOCONFIG # auto-configuration of RAID components
# Options to enable various other RAIDframe RAID types.
#options RF_INCLUDE_EVENODD=1
#options RF_INCLUDE_RAID5_RS=1
#options RF_INCLUDE_PARITYLOGGING=1
#options RF_INCLUDE_CHAINDECLUSTER=1
#options RF_INCLUDE_INTERDECLUSTER=1
#options RF_INCLUDE_PARITY_DECLUSTERING=1
#options RF_INCLUDE_PARITY_DECLUSTERING_DS=1
#pseudo-device fss # file system snapshot device
#pseudo-device md # memory disk device (ramdisk)
pseudo-device vnd # disk-like interface to files
options VND_COMPRESSION # compressed vnd(4)
#pseudo-device putter # for puffs and pud
# network pseudo-devices
pseudo-device bpfilter # Berkeley packet filter
#pseudo-device carp # Common Address Redundancy Protocol
pseudo-device npf # NPF packet filter
pseudo-device loop # network loopback
#pseudo-device ppp # Point-to-Point Protocol
#pseudo-device pppoe # PPP over Ethernet (RFC 2516)
#pseudo-device sl # Serial Line IP
#pseudo-device irframetty # IrDA frame line discipline
pseudo-device tap # virtual Ethernet
#pseudo-device tun # network tunneling over tty
#pseudo-device gre # generic L3 over IP tunnel
#pseudo-device gif # IPv[46] over IPv[46] tunnel (RFC 1933)
#pseudo-device faith # IPv[46] TCP relay translation i/f
#pseudo-device stf # 6to4 IPv6 over IPv4 encapsulation
#pseudo-device vlan # IEEE 802.1q encapsulation
pseudo-device bridge # simple inter-network bridging
pseudo-device vether # Virtual Ethernet for bridge
#pseudo-device agr # IEEE 802.3ad link aggregation
# miscellaneous pseudo-devices
pseudo-device pty # pseudo-terminals
#pseudo-device sequencer # MIDI sequencer
options RND_COM
pseudo-device clockctl # user control of clock subsystem
pseudo-device ksyms # /dev/ksyms
#pseudo-device btuart # Bluetooth HCI UART (H4)
# a pseudo device needed for Coda # also needs CODA (above)
#pseudo-device vcoda # coda minicache <-> venus comm.
# wscons pseudo-devices
pseudo-device wsmux # mouse & keyboard multiplexor
pseudo-device wsfont
# data mover pseudo-devices
#pseudo-device swdmover # software dmover(9) back-end
#pseudo-device dmoverio # /dev/dmover dmover(9) interface
# userland interface to drivers, including autoconf and properties retrieval
pseudo-device drvctl
# Veriexec
# include "dev/veriexec.config"
#options PAX_MPROTECT=0 # PaX mprotect(2) restrictions
#options PAX_ASLR=0 # PaX Address Space Layout Randomization

View File

@ -1,360 +0,0 @@
#
# $NetBSD: PEPPER,v 1.22 2022/08/07 02:52:25 simonb Exp $
#
# PEPPER -- Gumstix. Inc. Pepper Single Board Computer platforms kernel
#
include "arch/evbarm/conf/std.overo"
#options INCLUDE_CONFIG_FILE # embed config file in kernel binary
# estimated number of users
maxusers 32
# CPU options
options CPU_CORTEX
options TI_AM335X
options FPU_VFP
#options PMAPCOUNTERS
options ARM_HAS_VBAR
options __HAVE_MM_MD_DIRECT_MAPPED_PHYS
makeoptions CPUFLAGS="-mcpu=cortex-a8 -mfpu=neon"
# Architecture options
makeoptions BOARDTYPE="pepper"
options EVBARM_BOARDTYPE=pepper
# Gumstix options
options PEPPER
# Can specify 'expansion=' in args from u-boot.
options GUMSTIX_NETBSD_ARGS_EXPANSION
options GXIO_DEFAULT_EXPANSION="\"43C\""
# Standard system options
options RTC_OFFSET=0 # hardware clock is this many mins. west of GMT
#options NTP # NTP phase/frequency locked loop
# File systems
file-system FFS # UFS
file-system EXT2FS # second extended file system (linux)
#file-system LFS # log-structured file system
file-system MFS # memory file system
file-system NFS # Network file system
#file-system NTFS # Windows/NT file system (experimental)
#file-system CD9660 # ISO 9660 + Rock Ridge file system
file-system MSDOSFS # MS-DOS file system
file-system FDESC # /dev/fd
file-system KERNFS # /kern
#file-system NULLFS # loopback file system
#file-system OVERLAY # overlay file system
#file-system PROCFS # /proc
#file-system PUFFS # Userspace file systems (e.g. ntfs-3g & sshfs)
#file-system UMAPFS # NULLFS + uid and gid remapping
file-system UNION # union file system
#file-system CODA # Coda File System; also needs vcoda (below)
file-system TMPFS # memory file system
file-system PTYFS # /dev/pts/N support
#file-system UDF # experimental - OSTA UDF CD/DVD file-system
#file-system HFS # experimental - Apple HFS+ (read-only)
# File system options
#options FFS_EI # FFS Endian Independent support
#options FFS_NO_SNAPSHOT # No FFS snapshot support
#options QUOTA # legacy UFS quotas
#options QUOTA2 # new, in-filesystem UFS quotas
options UFS_DIRHASH # UFS Large Directory Hashing
#options UFS_EXTATTR # Extended attribute support for UFS1
options WAPBL # File system journaling support
#options EXT2FS_SYSTEM_FLAGS # makes ext2fs file flags (append and
# immutable) behave as system flags.
#options DISKLABEL_EI # disklabel Endian Independent support
#options NFSSERVER # Network File System server
# Networking options
#options GATEWAY # packet forwarding
options INET # IP + ICMP + TCP + UDP
options INET6 # IPV6
#options IPSEC # IP security
#options IPSEC_DEBUG # debug for IP security
#options MROUTING # IP multicast routing
#options PIM # Protocol Independent Multicast
#options NETATALK # AppleTalk networking
#options PPP_BSDCOMP # BSD-Compress compression support for PPP
#options PPP_DEFLATE # Deflate compression support for PPP
#options PPP_FILTER # Active filter support for PPP (requires bpf)
#options TCP_DEBUG # Record last TCP_NDEBUG packets with SO_DEBUG
options NFS_BOOT_BOOTP
options NFS_BOOT_DHCP
#options NFS_BOOT_BOOTPARAM
# Compatibility options
include "conf/compat_netbsd30.config"
options COMPAT_NETBSD32 # allow running arm (e.g. non-earm) binaries
# Shared memory options
#options SYSVMSG # System V-like message queues
#options SYSVSEM # System V-like semaphores
#options SYSVSHM # System V-like memory sharing
# Device options
#options MEMORY_DISK_HOOKS # boottime setup of ramdisk
#options MEMORY_DISK_IS_ROOT # use memory disk as root
#options MEMORY_DISK_DYNAMIC
#options MEMORY_DISK_ROOT_SIZE=8192 # Size in blocks
# Miscellaneous kernel options
options KTRACE # system call tracing, a la ktrace(1)
options IRQSTATS # manage IRQ statistics
#options MIIVERBOSE # verbose PHY autoconfig messages
#options USBVERBOSE # verbose USB device autoconfig messages
#options DDB_KEYCODE=0x40
#options USERCONF # userconf(4) support
#options PIPE_SOCKETPAIR # smaller, but slower pipe(2)
#options SYSCTL_INCLUDE_DESCR # Include sysctl descriptions in kernel
# Development and Debugging options
options DIAGNOSTIC # internal consistency checks
options DEBUG
#options LOCKDEBUG
#options UVMHIST # kernhist for uvm/pmap subsystems
#options VERBOSE_INIT_ARM # verbose bootstraping messages
options DDB # in-kernel debugger
options DDB_ONPANIC=1
options DDB_HISTORY_SIZE=100 # Enable history editing in DDB
#options KGDB
makeoptions DEBUG="-g" # compile full symbol table
makeoptions COPY_SYMTAB=1
config netbsd root on ? type ?
# The main bus device
mainbus0 at root
# The boot cpu
cpu0 at mainbus?
# L3 Interconnect
#L3i0 at mainbus?
# OBIO
obio0 at mainbus? base 0x44c00000 size 0x00400000 # L4_WKUP
obio1 at mainbus? base 0x48000000 size 0x01000000 # L4_PER
obio2 at mainbus? base 0x4a000000 size 0x01000000 # L4_FAST
# Enhanced Direct Memory Access controller
edma0 at mainbus? base 0x49000000 size 0x100000 intrbase 12
# General Purpose Memory Controller
gpmc0 at mainbus? base 0x50000000
# Interrupt Controller
omapicu0 at obio1 addr 0x48200000 size 0x1000 intrbase 0
# Power, Reset and Clock Management
prcm0 at obio0 addr 0x44e00000 size 0x2000 # PRM Module
# Control Module
sitaracm0 at obio0 addr 0x44e10000 size 0x2000
# SDHC controllers
sdhc0 at obio1 addr 0x48060000 size 0x1000 intr 64 edmabase 24
sdmmc0 at sdhc0
ld* at sdmmc?
sdhc1 at mainbus? base 0x47810000 size 0x1000 irq 29 #edmabase X-bar 1
sdmmc1 at sdhc1
#wi2wi at sdmmc? # W2CBW0015
#wl18xx at sdmmc? # TI WiLink8 Wifi and Bluetooth module
#options SDMMC_DEBUG
#options SDHC_DEBUG
# General-purpose I/O pins
omapgpio0 at obio0 addr 0x44e07000 size 0x1000 intrbase 128 intr 96
gpio0 at omapgpio0
omapgpio1 at obio1 addr 0x4804c000 size 0x1000 intrbase 160 intr 98
gpio1 at omapgpio1
omapgpio2 at obio1 addr 0x481ac000 size 0x1000 intrbase 192 intr 32
gpio2 at omapgpio2
omapgpio3 at obio1 addr 0x481ae000 size 0x1000 intrbase 224 intr 62
gpio3 at omapgpio3
gpiobutton* at gpio1 offset 0 mask 0x00400000 flag 0x01
# I2C Controller
tiiic0 at obio0 addr 0x44e0b000 size 0x1000 intr 70
tiiic1 at obio1 addr 0x4802a000 size 0x1000 intr 71
tiiic2 at obio1 addr 0x4819c000 size 0x1000 intr 30
iic* at tiiic?
tps65217pmic0 at iic0 addr 0x24
seeprom* at iic0 addr 0x50 flags 0x8
dsrtc* at iic0 addr 0x68 flags 1340 # RTC with Trickle Charger
#LIS33DE at iic0 addr 0x1c # 43 only
#TLV320AIC3106 at iic? addr 0x1b # TLV320AIC3106 Audio Codec
#lsm303d at iic1 addr 0x1e # MPU9150?
#MPU9150 at iic1 addr 0x6a
#edt-ft5306 at iic2 addr 0x38 # True Multi-Touch Capacitive Touch Panel Controller
#omapspi0 at obio1 addr 0x48030000 size 0x1000 intr 65
#spi? at omapspi?
#ADS7846RGV at spi? # 4-wire Touch Screen Controller
# On-board 16550 UARTs
com0 at obio0 addr 0x44e09000 size 0x1000 intr 72 mult 4 # UART0
options CONSADDR=0x44e09000, CONSPEED=115200
#
# 1st gen, DVI: Export to pin-header. Configure to GPIO, if diabled.
# 43[CR]: Connect to WiLink8 Bluetooth.
#com1 at obio1 addr 0x48022000 size 0x1000 intr 73 mult 4 # UART1
#
# Configure to GPIO, if diabled. (43[CR] only)
#com2 at obio1 addr 0x48024000 size 0x1000 intr 74 mult 4 # UART2
#com3 at obio1 addr 0x481a6000 size 0x1000 intr 44 mult 4 # UART3
# XXX Clock assignment is kinda random. My DM timer 3 seems to be
# unhappy and I don't know why. DM timer 0 doesn't seem to deliver
# interrupts for the hard clock, although it seems to be the obvious
# choice.
# Hardclock timer
omapdmtimer0 at obio1 addr 0x48040000 size 0x1000 intr 68 # DM Timer 2
# Time counter
omapdmtimer1 at obio0 addr 0x44e31000 size 0x1000 intr 67 # DM Timer 1ms
# Statclock timer
omapdmtimer2 at obio1 addr 0x48044000 size 0x1000 intr 92 # DM Timer 4
# Watchdog timers
omapwdt32k* at obio0 addr 0x44e35000 size 0x1000 # WDT1
# Random number generator
trng* at obio1 addr 0x48310000 size 0x2000 intr 111 # TRNG
# onboard video, experimental. Video mode is hardcoded in the driver
tifb* at obio1 addr 0x4830e000 size 0x1000 intr 36
# make sure the console display is always wsdisplay0
wsdisplay* at wsemuldisplaydev?
# various options for wscons - we try to look as much like a standard
# sun console as possible
options WSEMUL_VT100
options WSDISPLAY_COMPAT_PCVT
options WSDISPLAY_COMPAT_SYSCONS
options WSDISPLAY_COMPAT_USL
options WSDISPLAY_SCROLLSUPPORT
options WS_KERNEL_FG=WSCOL_GREEN
options WSDISPLAY_DEFAULTSCREENS=4
options FONT_GALLANT12x22
options FONT_BOLD8x16
# compatibility to other console drivers
options WSDISPLAY_COMPAT_RAWKBD # can get raw scancodes
# Ethernet
cpsw* at obio2 addr 0x4a100000 size 0x8000 intrbase 40
micphy* at mii? phy ? # Micrel KSZ9021RNI PHYs
# On-board USB. Experimental
tiotg* at mainbus? base 0x47400000 size 0x5000 intrbase 17
motg* at tiotg? port ?
usb* at motg?
uhub* at usb?
uhub* at uhub? port ?
uhidev* at uhub?
# USB Keyboards
ukbd* at uhidev? reportid ?
wskbd* at ukbd? console ? mux 1
# USB Mice
ums* at uhidev? reportid ?
wsmouse* at ums? mux 0
umass* at uhub? port ? configuration ? interface ?
# SCSI bus support
scsibus* at scsi?
# SCSI devices
sd* at scsibus? target ? lun ? # SCSI disk drives
# Pseudn-Devices
# disk/mass storage pseudo-devices
#pseudo-device bio # RAID control device driver
#pseudo-device ccd # concatenated/striped disk devices
pseudo-device cgd # cryptographic disk devices
#pseudo-device raid # RAIDframe disk driver
#options RAID_AUTOCONFIG # auto-configuration of RAID components
# Options to enable various other RAIDframe RAID types.
#options RF_INCLUDE_EVENODD=1
#options RF_INCLUDE_RAID5_RS=1
#options RF_INCLUDE_PARITYLOGGING=1
#options RF_INCLUDE_CHAINDECLUSTER=1
#options RF_INCLUDE_INTERDECLUSTER=1
#options RF_INCLUDE_PARITY_DECLUSTERING=1
#options RF_INCLUDE_PARITY_DECLUSTERING_DS=1
#pseudo-device fss # file system snapshot device
#pseudo-device md # memory disk device (ramdisk)
pseudo-device vnd # disk-like interface to files
options VND_COMPRESSION # compressed vnd(4)
#pseudo-device putter # for puffs and pud
# network pseudo-devices
pseudo-device bpfilter # Berkeley packet filter
#pseudo-device carp # Common Address Redundancy Protocol
pseudo-device npf # NPF packet filter
pseudo-device loop # network loopback
#pseudo-device ppp # Point-to-Point Protocol
#pseudo-device pppoe # PPP over Ethernet (RFC 2516)
#pseudo-device sl # Serial Line IP
#pseudo-device irframetty # IrDA frame line discipline
pseudo-device tap # virtual Ethernet
#pseudo-device tun # network tunneling over tty
#pseudo-device gre # generic L3 over IP tunnel
#pseudo-device gif # IPv[46] over IPv[46] tunnel (RFC 1933)
#pseudo-device faith # IPv[46] TCP relay translation i/f
#pseudo-device stf # 6to4 IPv6 over IPv4 encapsulation
#pseudo-device vlan # IEEE 802.1q encapsulation
pseudo-device bridge # simple inter-network bridging
pseudo-device vether # Virtual Ethernet for bridge
#pseudo-device agr # IEEE 802.3ad link aggregation
# miscellaneous pseudo-devices
pseudo-device pty # pseudo-terminals
#pseudo-device sequencer # MIDI sequencer
options RND_COM
pseudo-device clockctl # user control of clock subsystem
pseudo-device ksyms # /dev/ksyms
#pseudo-device btuart # Bluetooth HCI UART (H4)
# TI WL18xx (WiLink 8) module
# a pseudo device needed for Coda # also needs CODA (above)
#pseudo-device vcoda # coda minicache <-> venus comm.
# wscons pseudo-devices
pseudo-device wsmux # mouse & keyboard multiplexor
pseudo-device wsfont
# data mover pseudo-devices
#pseudo-device swdmover # software dmover(9) back-end
#pseudo-device dmoverio # /dev/dmover dmover(9) interface
# userland interface to drivers, including autoconf and properties retrieval
pseudo-device drvctl
# Veriexec
# include "dev/veriexec.config"
#options PAX_MPROTECT=0 # PaX mprotect(2) restrictions
#options PAX_ASLR=0 # PaX Address Space Layout Randomization

View File

@ -1,4 +1,4 @@
$NetBSD: README.evbarm,v 1.35 2022/10/29 08:33:45 jmcneill Exp $
$NetBSD: README.evbarm,v 1.36 2022/10/29 13:10:25 jmcneill Exp $
config date boards
-------------------------------------------------------------------------------
@ -11,7 +11,6 @@ BCM56340 2013/10/28 Broadcom BCM56340 iProc based switch
CP3100 2006/11/08 Certance IOP321 CP-3100
CUBOX 2017/01/07 SolidRun Cubox
DNS323 2010/10/02 D-Link DNS-323 Marvell SoC based NAS
DUOVERO 2016/10/15 Gumstix Inc. DuoVero COMS boards
GEMINI 2008/10/24 Cortina Systems SL3516 eval board
GENERIC 2018/04/01 ARMv7 FDT based boards
GENERIC64 2018/04/01 ARMv8 (aarch64) FDT based boards
@ -46,7 +45,6 @@ OPENBLOCKS_A6 2012/08/01 Plat'Home. OpenBlockS A6
OPENBLOCKS_AX3 2013/09/30 Plat'Home. OpenBlockS AX3
OPENRD 2012/08/10 open-rd.org Marvell Orion board
OSK5912 2007/01/06 TI OMAP 5912 OSK board
PEPPER 2016/10/15 Gumstix Inc. Pepper SBC(Single Board Computer)
POGO 2016/05/12 CloudEngines Pogoplug NAS
RPI 2012/07/26 Raspberry Pi
RPI2 2015/03/04 Raspberry Pi 2

View File

@ -1,26 +0,0 @@
# $NetBSD: files.overo,v 1.5 2014/05/23 13:56:18 kiyohara Exp $
#
# Gumstix. Inc. Overo boards configuration info
#
file arch/arm/arm32/arm32_boot.c
file arch/arm/arm32/arm32_kvminit.c
file arch/arm/arm32/arm32_reboot.c
file arch/evbarm/gumstix/gumstix_machdep.c
defflag opt_gumstix.h OVERO
GUMSTIX_NETBSD_ARGS_EXPANSION
defparam opt_gxio.h GXIO_DEFAULT_EXPANSION
file arch/evbarm/gumstix/gxio.c
# CPU support and integrated peripherals
include "arch/arm/omap/files.omap2"
# NS16550 compatible serial ports
attach com at obio with obiouart
file arch/arm/omap/obio_com.c obiouart
# SMSC LAN9118
attach smsh at gpmc with smsh_gpmc
file arch/evbarm/gumstix/if_smsh_gpmc.c smsh_gpmc

View File

@ -1,19 +0,0 @@
# $NetBSD: std.overo,v 1.11 2019/05/18 08:49:23 skrll Exp $
#
# standard NetBSD/evbarm for OVERO options
machine evbarm arm
include "arch/evbarm/conf/std.evbarm"
include "arch/evbarm/conf/files.overo"
options ARM_GENERIC_TODR
options ARM_INTR_IMPL="<arch/arm/omap/omap2_intr.h>"
options CORTEX_PMC
options MD_CPU_HATCH=gumstix_cpu_hatch
options TPIDRPRW_IS_CURCPU
options __HAVE_FAST_SOFTINTS # should be in types.h
options __HAVE_GENERIC_START
makeoptions LOADADDRESS="0x80200000"
makeoptions BOARDMKFRAG="${THISARM}/conf/mk.gumstix"

View File

@ -1,4 +1,4 @@
/* $NetBSD: gumstix_machdep.c,v 1.71 2020/12/03 07:45:53 skrll Exp $ */
/* $NetBSD: gumstix_machdep.c,v 1.72 2022/10/29 13:10:25 jmcneill Exp $ */
/*
* Copyright (C) 2005, 2006, 2007 WIDE Project and SOUM Corporation.
* All rights reserved.
@ -144,18 +144,6 @@
#include "opt_evbarm_boardtype.h"
#include "opt_gumstix.h"
#include "opt_kgdb.h"
#include "opt_multiprocessor.h"
#if defined(OVERO) || defined(DUOVERO) || defined(PEPPER)
#include "opt_omap.h"
#if defined(DUOVERO)
#include "arml2cc.h"
#endif
#include "prcm.h"
#include "arma9tmr.h"
#include "armgtmr.h"
#endif
#include <sys/param.h>
#include <sys/conf.h>
@ -182,33 +170,12 @@
#include <arm/arm32/machdep.h>
#include <arm/omap/omap2_obiovar.h>
#include <arm/omap/am335x_prcm.h>
#include <arm/omap/omap2_gpio.h>
#include <arm/omap/omap2_gpmcreg.h>
#include <arm/omap/omap2_prcm.h>
#if defined(OVERO) || defined(DUOVERO) || defined(PEPPER)
#include <arm/omap/omap2_reg.h> /* Must required "opt_omap.h" */
#endif
#include <arm/omap/omap3_sdmmcreg.h>
#include <arm/omap/omap_var.h>
#include <arm/omap/omap_com.h>
#include <arm/omap/tifbvar.h>
#include <arm/xscale/pxa2x0reg.h>
#include <arm/xscale/pxa2x0var.h>
#include <arm/xscale/pxa2x0_gpio.h>
#include <evbarm/gumstix/gumstixreg.h>
#include <evbarm/gumstix/gumstixvar.h>
#include <arm/cortex/pl310_var.h>
#include <arm/cortex/pl310_reg.h>
#include <arm/cortex/scu_reg.h>
#include <arm/cortex/a9tmr_var.h>
#include <arm/cortex/gtmr_var.h>
#include <dev/cons.h>
#ifdef KGDB
@ -226,7 +193,6 @@
* Core-logic registers and I/O mappings occupy
*
* 0xfd000000 - 0xfd800000 on gumstix
* 0xc0000000 - 0xc0400000 on overo, duovero and pepper
*/
#ifndef KERNEL_VM_BASE
#define KERNEL_VM_BASE 0xc8000000
@ -245,10 +211,6 @@ uint32_t system_serial_low;
#if defined(GUMSTIX)
static void read_system_serial(void);
#endif
#if defined(OMAP2)
static void omap_reset(void);
static void find_cpu_clock(void);
#endif
static void process_kernel_args(int, char *[]);
static void process_kernel_args_liner(char *);
#ifdef KGDB
@ -376,95 +338,6 @@ static const struct pmap_devmap gumstix_devmap[] = {
VM_PROT_READ | VM_PROT_WRITE,
PTE_NOCACHE,
},
#elif defined(OVERO)
{ /* SCM, PRCM */
OVERO_L4_CORE_VBASE,
_A(OMAP3530_L4_CORE_BASE),
_S(L1_S_SIZE), /* No need 16MB. Use only first 1MB */
VM_PROT_READ | VM_PROT_WRITE,
PTE_NOCACHE
},
{ /* Console, GPIO[2-6] */
OVERO_L4_PERIPHERAL_VBASE,
_A(OMAP3530_L4_PERIPHERAL_BASE),
_S(OMAP3530_L4_PERIPHERAL_SIZE),
VM_PROT_READ | VM_PROT_WRITE,
PTE_NOCACHE
},
{ /* GPIO1 */
OVERO_L4_WAKEUP_VBASE,
_A(OMAP3530_L4_WAKEUP_BASE),
_S(OMAP3530_L4_WAKEUP_SIZE),
VM_PROT_READ | VM_PROT_WRITE,
PTE_NOCACHE
},
{
OVERO_GPMC_VBASE,
_A(GPMC_BASE),
_S(GPMC_SIZE),
VM_PROT_READ | VM_PROT_WRITE,
PTE_NOCACHE
},
{
OVERO_SRDC_VBASE,
_A(OMAP3530_SDRC_BASE),
_S(OMAP3530_SDRC_SIZE),
VM_PROT_READ | VM_PROT_WRITE,
PTE_NOCACHE
},
#elif defined(DUOVERO)
{
DUOVERO_L4_CM_VBASE,
_A(OMAP4430_L4_CORE_BASE + 0x100000),
_S(L1_S_SIZE),
VM_PROT_READ | VM_PROT_WRITE,
PTE_NOCACHE
},
{ /* Console, SCU, L2CC, GPIO[2-6] */
DUOVERO_L4_PERIPHERAL_VBASE,
_A(OMAP4430_L4_PERIPHERAL_BASE),
_S(L1_S_SIZE * 3),
VM_PROT_READ | VM_PROT_WRITE,
PTE_NOCACHE
},
{ /* PRCM, GPIO1 */
DUOVERO_L4_WAKEUP_VBASE,
_A(OMAP4430_L4_WAKEUP_BASE),
_S(OMAP4430_L4_WAKEUP_SIZE),
VM_PROT_READ | VM_PROT_WRITE,
PTE_NOCACHE
},
{
DUOVERO_GPMC_VBASE,
_A(GPMC_BASE),
_S(GPMC_SIZE),
VM_PROT_READ | VM_PROT_WRITE,
PTE_NOCACHE
},
{
DUOVERO_DMM_VBASE,
_A(OMAP4430_DMM_BASE),
_S(OMAP4430_DMM_SIZE),
VM_PROT_READ | VM_PROT_WRITE,
PTE_NOCACHE
},
#elif defined(PEPPER)
{
/* CM, Control Module, GPIO0, Console */
PEPPER_PRCM_VBASE,
_A(OMAP2_CM_BASE),
_S(L1_S_SIZE),
VM_PROT_READ | VM_PROT_WRITE,
PTE_NOCACHE
},
{
/* GPIO[1-3] */
PEPPER_L4_PERIPHERAL_VBASE,
_A(TI_AM335X_L4_PERIPHERAL_BASE),
_S(L1_S_SIZE),
VM_PROT_READ | VM_PROT_WRITE,
PTE_NOCACHE
},
#endif
{ 0, 0, 0, 0, 0 }
};
@ -472,93 +345,7 @@ static const struct pmap_devmap gumstix_devmap[] = {
#undef _A
#undef _S
#ifdef MULTIPROCESSOR
void gumstix_cpu_hatch(struct cpu_info *);
void
gumstix_cpu_hatch(struct cpu_info *ci)
{
#if NARMA9TMR > 0
if (CPU_ID_CORTEX_A9_P(curcpu()->ci_arm_cpuid)) {
a9tmr_init_cpu_clock(ci);
}
#endif
#if NARMGTMR > 0
if (CPU_ID_CORTEX_A7_P(curcpu()->ci_arm_cpuid) ||
CPU_ID_CORTEX_A15_P(curcpu()->ci_arm_cpuid)) {
gtmr_init_cpu_clock(ci);
}
#endif
}
#endif
static void
gumstix_mpstart(void)
{
#if defined(MULTIPROCESSOR)
const bus_space_tag_t iot = &omap_bs_tag;
int error;
if (CPU_ID_CORTEX_A9_P(curcpu()->ci_arm_cpuid)) {
bus_space_handle_t scu_ioh;
error = bus_space_map(iot, OMAP4_SCU_BASE, OMAP4_SCU_SIZE, 0, &scu_ioh);
if (error)
panic("Could't map OMAP4_SCU_BASE");
/*
* Invalidate all SCU cache tags. That is, for all cores (0-3)
*/
bus_space_write_4(iot, scu_ioh, SCU_INV_ALL_REG, 0xffff);
uint32_t diagctl = bus_space_read_4(iot, scu_ioh, SCU_DIAG_CONTROL);
diagctl |= SCU_DIAG_DISABLE_MIGBIT;
bus_space_write_4(iot, scu_ioh, SCU_DIAG_CONTROL, diagctl);
uint32_t scu_ctl = bus_space_read_4(iot, scu_ioh, SCU_CTL);
scu_ctl |= SCU_CTL_SCU_ENA;
bus_space_write_4(iot, scu_ioh, SCU_CTL, scu_ctl);
armv7_dcache_wbinv_all();
}
bus_space_handle_t wugen_ioh;
error = bus_space_map(iot, OMAP4_WUGEN_BASE, OMAP4_WUGEN_SIZE, 0,
&wugen_ioh);
if (error)
panic("Couldn't map OMAP4_WUGEN_BASE");
const paddr_t mpstart = KERN_VTOPHYS((vaddr_t)cpu_mpstart);
bus_space_write_4(iot, wugen_ioh, OMAP4_AUX_CORE_BOOT1, mpstart);
for (size_t i = 1; i < arm_cpu_max; i++) {
uint32_t boot = bus_space_read_4(iot, wugen_ioh, OMAP4_AUX_CORE_BOOT0);
boot |= __SHIFTIN(0xf, i * 4);
bus_space_write_4(iot, wugen_ioh, OMAP4_AUX_CORE_BOOT0, boot);
}
dsb(sy);
sev();
u_int i;
for (i = 0x10000000; i > 0; i--) {
if (cpu_hatched_p(cpuindex))
break;
}
if (i == 0) {
aprint_error("cpu%d: WARNING: AP failed to start\n",
cpuindex);
}
#endif
}
#if defined(CPU_CORTEX)
/* filled in before cleaning bss. keep in .data */
u_int uboot_args[4] __attribute__((__section__(".data")));
#else
extern uint32_t *uboot_args;
#endif
/*
* vaddr_t initarm(...)
@ -580,10 +367,6 @@ initarm(void *arg)
uint32_t ram_size = 0x400000;
enum { r0 = 0, r1 = 1, r2 = 2, r3 = 3 }; /* args from u-boot */
#if defined(OVERO) || defined(DUOVERO) /* || defined(PEPPER) */
const bus_space_tag_t iot = &omap_bs_tag;
#endif
#if defined(CPU_XSCALE)
/*
@ -602,10 +385,6 @@ initarm(void *arg)
xscale_cache_clean_addr = 0xff000000U;
cpu_reset_address = NULL;
#elif defined(OMAP2)
cpu_reset_address = omap_reset;
find_cpu_clock();
#endif
/*
@ -628,62 +407,6 @@ initarm(void *arg)
pxa2x0_gpio_bootstrap(GUMSTIX_GPIO_VBASE);
pxa2x0_clkman_bootstrap(GUMSTIX_CLKMAN_VBASE);
#endif
#if defined(OVERO)
#define OMAP3530_SRDC_MCFG_p(p) (0x80 + ((p) * 0x30))
#define OMAP3530_SRDC_MCFG_RAMSIZE __BITS(17,8)
bus_space_handle_t sdrcioh;
if (bus_space_map(iot, OMAP3530_SDRC_BASE, OMAP3530_SDRC_SIZE,
0, &sdrcioh) != 0)
panic("OMAP_SDRC_BASE map failed\n");
ram_size = 0;
for (u_int p = 0; p < 2; p++) {
uint32_t mcfg = bus_space_read_4(iot, sdrcioh,
OMAP3530_SRDC_MCFG_p(p));
ram_size += __SHIFTOUT(mcfg, OMAP3530_SRDC_MCFG_RAMSIZE) *
(2 * 1024 * 1024);
}
#elif defined(DUOVERO)
#define OMAP4_DMM_LISA_MAP_i(i) (0x40 + ((i) * 0x4))
#define OMAP4_DMM_LISA_SYS_ADDR __BITS(31,24)
#define OMAP4_DMM_LISA_SYS_SIZE __BITS(22,20)
#define OMAP4_DMM_LISA_SDRC_ADDRSPC __BITS(17,16)
bus_space_handle_t dmmioh;
if (bus_space_map(iot, OMAP4430_DMM_BASE, OMAP4430_DMM_SIZE, 0,
&dmmioh) != 0)
panic("OMAP4_DMM_BASE map failed\n");
ram_size = 0;
for (u_int i = 0; i < 4; i++) {
const uint32_t lisa = bus_space_read_4(iot, dmmioh,
OMAP4_DMM_LISA_MAP_i(i));
const uint32_t sys_addr =
__SHIFTOUT(lisa, OMAP4_DMM_LISA_SYS_ADDR);
/* skip non-physical */
if ((sys_addr & 0x80) != 0)
continue;
const uint32_t sdrc_addrspc =
__SHIFTOUT(lisa, OMAP4_DMM_LISA_SDRC_ADDRSPC);
/* Skip reserced areas */
if (sdrc_addrspc == 2)
continue;
const uint32_t sys_size =
__SHIFTOUT(lisa, OMAP4_DMM_LISA_SYS_SIZE);
ram_size += (16 * 1024 * 1024) << sys_size;
}
#endif
cpu_domains((DOMAIN_CLIENT << (PMAP_DOMAIN_KERNEL*2)) | DOMAIN_CLIENT);
@ -704,8 +427,6 @@ initarm(void *arg)
*/
#if defined(GUMSTIX)
#define SDRAM_START 0xa0000000UL
#elif defined(OVERO) || defined(DUOVERO) || defined(PEPPER)
#define SDRAM_START 0x80000000UL
#endif
if (uboot_args[r0] < SDRAM_START ||
uboot_args[r0] >= SDRAM_START + ram_size)
@ -733,27 +454,6 @@ initarm(void *arg)
VPRINTF("initarm: Configuring system ...\n");
#if defined(OMAP_4430)
bus_space_handle_t ioh;
#if NARML2CC > 0
/*
* Initialize L2-Cache parameters
*/
if (bus_space_map(iot, OMAP4_L2CC_BASE, OMAP4_L2CC_SIZE, 0, &ioh) != 0)
panic("OMAP4_L2CC_BASE map failed\n");
arml2cc_init(iot, ioh, 0);
#endif
#ifdef MULTIPROCESSOR
if (bus_space_map(iot, OMAP4_SCU_BASE, SCU_SIZE, 0, &ioh) != 0)
panic("OMAP4_SCU_BASE map failed\n");
arm_cpu_max =
1 + (bus_space_read_4(iot, ioh, SCU_CFG) & SCU_CFG_CPUMAX);
#endif
#endif
/* Fake bootconfig structure for the benefit of pmap.c */
/* XXX must make the memory description h/w independent */
bootconfig.dramblocks = 1;
@ -767,21 +467,12 @@ initarm(void *arg)
arm32_kernel_vm_init(KERNEL_VM_BASE,
#if defined(CPU_XSCALE)
ARM_VECTORS_LOW,
#elif defined(CPU_CORTEX)
ARM_VECTORS_HIGH,
#endif
0, gumstix_devmap, true);
evbarm_device_register = gumstix_device_register;
vaddr_t sp = initarm_common(KERNEL_VM_BASE, KERNEL_VM_SIZE, NULL, 0);
/*
* initarm_common flushes cache if required before AP start
*/
gumstix_mpstart();
return sp;
return initarm_common(KERNEL_VM_BASE, KERNEL_VM_SIZE, NULL, 0);
}
#if defined(GUMSTIX)
@ -830,89 +521,6 @@ read_system_serial(void)
}
#endif
#if defined(OMAP2)
static void
omap_reset(void)
{
#if defined(TI_AM335X)
vaddr_t prm_base = (PEPPER_PRCM_VBASE + AM335X_PRCM_PRM_DEVICE);
*(volatile uint32_t *)(prm_base + PRM_RSTCTRL) = RST_GLOBAL_WARM_SW;
#elif defined(OMAP_4430)
*(volatile uint32_t *)(DUOVERO_L4_WAKEUP_VBASE + OMAP4_PRM_RSTCTRL) =
OMAP4_PRM_RSTCTRL_WARM;
#endif
#if NPRCM > 0
prcm_cold_reset();
#endif
}
static void
find_cpu_clock(void)
{
const vaddr_t prm_base __unused = OMAP2_PRM_BASE;
const vaddr_t cm_base = OMAP2_CM_BASE;
#if defined(OMAP_3530)
const uint32_t prm_clksel =
*(volatile uint32_t *)(prm_base + PLL_MOD + OMAP3_PRM_CLKSEL);
static const uint32_t prm_clksel_freqs[] = OMAP3_PRM_CLKSEL_FREQS;
const uint32_t sys_clk =
prm_clksel_freqs[__SHIFTOUT(prm_clksel, OMAP3_PRM_CLKSEL_CLKIN)];
const uint32_t dpll1 =
*(volatile uint32_t *)(cm_base + OMAP3_CM_CLKSEL1_PLL_MPU);
const uint32_t dpll2 =
*(volatile uint32_t *)(cm_base + OMAP3_CM_CLKSEL2_PLL_MPU);
const uint32_t m =
__SHIFTOUT(dpll1, OMAP3_CM_CLKSEL1_PLL_MPU_DPLL_MULT);
const uint32_t n = __SHIFTOUT(dpll1, OMAP3_CM_CLKSEL1_PLL_MPU_DPLL_DIV);
const uint32_t m2 =
__SHIFTOUT(dpll2, OMAP3_CM_CLKSEL2_PLL_MPU_DPLL_CLKOUT_DIV);
/*
* MPU_CLK supplies ARM_FCLK which is twice the CPU frequency.
*/
curcpu()->ci_data.cpu_cc_freq =
((sys_clk * m) / ((n + 1) * m2 * 2)) * OMAP3_PRM_CLKSEL_MULT;
omap_sys_clk = sys_clk * OMAP3_PRM_CLKSEL_MULT;
#elif defined(OMAP_4430)
const uint32_t prm_clksel =
*(volatile uint32_t *)(prm_base + OMAP4_CM_SYS_CLKSEL);
static const uint32_t cm_clksel_freqs[] = OMAP4_CM_CLKSEL_FREQS;
const uint32_t sys_clk =
cm_clksel_freqs[__SHIFTOUT(prm_clksel, OMAP4_CM_SYS_CLKSEL_CLKIN)];
const uint32_t dpll1 =
*(volatile uint32_t *)(cm_base + OMAP4_CM_CLKSEL_DPLL_MPU);
const uint32_t dpll2 =
*(volatile uint32_t *)(cm_base + OMAP4_CM_DIV_M2_DPLL_MPU);
const uint32_t m =
__SHIFTOUT(dpll1, OMAP4_CM_CLKSEL_DPLL_MPU_DPLL_MULT);
const uint32_t n = __SHIFTOUT(dpll1, OMAP4_CM_CLKSEL_DPLL_MPU_DPLL_DIV);
const uint32_t m2 =
__SHIFTOUT(dpll2, OMAP4_CM_DIV_M2_DPLL_MPU_DPLL_CLKOUT_DIV);
/*
* MPU_CLK supplies ARM_FCLK which is twice the CPU frequency.
*/
curcpu()->ci_data.cpu_cc_freq =
((sys_clk * 2 * m) / ((n + 1) * m2)) * OMAP4_CM_CLKSEL_MULT / 2;
omap_sys_clk = sys_clk * OMAP4_CM_CLKSEL_MULT;
#elif defined(TI_AM335X)
prcm_bootstrap(cm_base);
am335x_sys_clk(TI_AM335X_CTLMOD_BASE);
am335x_cpu_clk();
#endif
}
#endif
#ifdef GUMSTIX_NETBSD_ARGS_BUSHEADER
static const char busheader_name[] = "busheader=";
#endif
@ -1160,13 +768,7 @@ consinit(void)
}
#endif /* HWUARTCONSOLE */
#elif defined(OVERO) || defined(DUOVERO) || defined(PEPPER)
if (comcnattach(&omap_a4x_bs_tag, CONSADDR, comcnspeed,
OMAP_COM_FREQ, COM_TYPE_NORMAL, comcnmode) == 0)
return;
#endif /* GUMSTIX or OVERO */
#endif /* GUMSTIX */
#endif /* NCOM */
@ -1218,52 +820,7 @@ gumstix_device_register(device_t dev, void *aux)
{
prop_dictionary_t dict = device_properties(dev);
if (device_is_a(dev, "arma9tmr") ||
device_is_a(dev, "a9wdt")) {
/*
* We need to tell the A9 Global/Watchdog Timer
* what frequency it runs at.
*/
/*
* This clock always runs at (arm_clk div 2) and only goes
* to timers that are part of the A9 MP core subsystem.
*/
prop_dictionary_set_uint32(dict, "frequency",
curcpu()->ci_data.cpu_cc_freq / 2);
}
if (device_is_a(dev, "armperiph")) {
if (device_is_a(device_parent(dev), "mainbus")) {
#if defined(OMAP2)
/*
* XXX KLUDGE ALERT XXX
* The iot mainbus supplies is completely wrong since
* it scales addresses by 2. The simpliest remedy is
* to replace with our bus space used for the armcore
* registers (which armperiph uses).
*/
struct mainbus_attach_args * const mb = aux;
mb->mb_iot = &omap_bs_tag;
#endif
}
}
if (device_is_a(dev, "ehci")) {
#if defined(OVERO)
prop_dictionary_set_uint16(dict, "nports", 2);
prop_dictionary_set_bool(dict, "phy-reset", true);
prop_dictionary_set_cstring(dict, "port0-mode", "none");
prop_dictionary_set_int16(dict, "port0-gpio", -1);
prop_dictionary_set_cstring(dict, "port1-mode", "phy");
prop_dictionary_set_int16(dict, "port1-gpio", 183);
prop_dictionary_set_bool(dict, "port1-gpioval", true);
#elif defined(DUOVERO)
prop_dictionary_set_uint16(dict, "nports", 1);
prop_dictionary_set_bool(dict, "phy-reset", true);
prop_dictionary_set_cstring(dict, "port0-mode", "phy");
prop_dictionary_set_int16(dict, "port0-gpio", 62);
prop_dictionary_set_bool(dict, "port0-gpioval", false);
prop_dictionary_set_bool(dict, "port0-extclk", true);
#endif
prop_dictionary_set_uint16(dict, "dpll5-m", 443);
prop_dictionary_set_uint16(dict, "dpll5-n", 11);
prop_dictionary_set_uint16(dict, "dpll5-m2", 4);
@ -1285,87 +842,4 @@ gumstix_device_register(device_t dev, void *aux)
" property for %s\n", device_xname(dev));
}
}
if (device_is_a(dev, "omapmputmr")) {
struct obio_attach_args *obio = aux;
switch (obio->obio_addr) {
case 0x49032000: /* GPTIMER2 */
case 0x49034000: /* GPTIMER3 */
case 0x49036000: /* GPTIMER4 */
case 0x49038000: /* GPTIMER5 */
case 0x4903a000: /* GPTIMER6 */
case 0x4903c000: /* GPTIMER7 */
case 0x4903e000: /* GPTIMER8 */
case 0x49040000: /* GPTIMER9 */
#if defined(OVERO)
{
/* Ensure enable PRCM.CM_[FI]CLKEN_PER[3:10]. */
const int en =
1 << (((obio->obio_addr >> 13) & 0x3f) - 0x16);
ioreg_write(OVERO_L4_CORE_VBASE + 0x5000,
ioreg_read(OVERO_L4_CORE_VBASE + 0x5000) | en);
ioreg_write(OVERO_L4_CORE_VBASE + 0x5010,
ioreg_read(OVERO_L4_CORE_VBASE + 0x5010) | en);
}
#endif
break;
}
}
if (device_is_a(dev, "sdhc")) {
bool dualvolt = false;
#if defined(OVERO) || defined(DUOVERO)
if (device_is_a(device_parent(dev), "obio")) {
struct obio_attach_args *obio = aux;
#if defined(OVERO)
if (obio->obio_addr == SDMMC2_BASE_3530)
dualvolt = true;
#elif defined(DUOVERO)
if (obio->obio_addr == SDMMC5_BASE_4430)
dualvolt = true;
#endif
}
#endif
#if defined(PEPPER)
if (device_is_a(device_parent(dev), "mainbus")) {
struct mainbus_attach_args * const mb = aux;
if (mb->mb_iobase == SDMMC3_BASE_TIAM335X)
dualvolt = true;
}
#endif
prop_dictionary_set_bool(dict, "dual-volt", dualvolt);
}
if (device_is_a(dev, "tifb")) {
prop_data_t panel_info;
panel_info = prop_data_create_data_nocopy(tifb_panel_info,
sizeof(struct tifb_panel_info));
KASSERT(panel_info != NULL);
prop_dictionary_set(dict, "panel-info", panel_info);
prop_object_release(panel_info);
#if defined(OMAP2)
/* enable LCD */
omap2_gpio_ctl(59, GPIO_PIN_OUTPUT);
omap2_gpio_write(59, 0); /* reset */
delay(100);
omap2_gpio_write(59, 1);
#endif
}
if (device_is_a(dev, "tps65217pmic")) {
#if defined(TI_AM335X)
extern const char *mpu_supply;
mpu_supply = "DCDC3";
#endif
if (use_tps65217_wled) {
prop_dictionary_set_int32(dict, "isel", 1);
prop_dictionary_set_int32(dict, "fdim", 200);
prop_dictionary_set_int32(dict, "brightness", 80);
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -1,130 +0,0 @@
/* $NetBSD: if_smsh_gpmc.c,v 1.3 2012/09/04 22:58:35 matt Exp $ */
/*
* Copyright (c) 2010 KIYOHARA Takashi
* All rights reserved.
*
* 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.
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_smsh_gpmc.c,v 1.3 2012/09/04 22:58:35 matt Exp $");
#include "locators.h"
#include <sys/param.h>
#include <sys/device.h>
#include <sys/errno.h>
#include <sys/bus.h>
#include <sys/systm.h>
#include <net/if.h>
#include <net/if_ether.h>
#include <net/if_media.h>
#include <dev/mii/miivar.h>
#include <dev/ic/lan9118var.h>
#include <dev/ic/lan9118reg.h>
#include <arm/omap/omap2_gpmcvar.h>
static int smsh_gpmc_match(device_t, struct cfdata *, void *);
static void smsh_gpmc_attach(device_t, device_t, void *);
CFATTACH_DECL_NEW(smsh_gpmc, sizeof(struct lan9118_softc),
smsh_gpmc_match, smsh_gpmc_attach, NULL, NULL);
/* ARGSUSED */
static int
smsh_gpmc_match(device_t parent, struct cfdata *match, void *aux)
{
struct gpmc_attach_args *gpmc = aux;
bus_space_tag_t iot = gpmc->gpmc_iot;
bus_space_handle_t ioh;
uint32_t val;
int rv = 0;
/* Disallow wildcarded values. */
if (gpmc->gpmc_addr == GPMCCF_ADDR_DEFAULT)
return 0;
if (gpmc->gpmc_intr == GPMCCF_INTR_DEFAULT)
return 0;
if (bus_space_map(iot, gpmc->gpmc_addr, LAN9118_IOSIZE, 0, &ioh) != 0)
return 0;
bus_space_write_4(iot, ioh, LAN9118_BYTE_TEST, 0);
val = bus_space_read_4(iot, ioh, LAN9118_BYTE_TEST);
if (val == LAN9118_BYTE_TEST_VALUE)
/* Assume we have an SMSC LAN9221 */
rv = 1;
bus_space_unmap(iot, ioh, LAN9118_IOSIZE);
return rv;
}
/* ARGSUSED */
static void
smsh_gpmc_attach(device_t parent, device_t self, void *aux)
{
struct lan9118_softc *sc = device_private(self);
struct gpmc_attach_args *gpmc = aux;
prop_dictionary_t dict = device_properties(self);
void *ih;
sc->sc_dev = self;
/*
* Prefer the Ethernet address in device properties.
*/
prop_data_t ea = prop_dictionary_get(dict, "mac-address");
if (ea != NULL) {
KASSERT(prop_object_type(ea) == PROP_TYPE_DATA);
KASSERT(prop_data_size(ea) == ETHER_ADDR_LEN);
memcpy(sc->sc_enaddr, prop_data_data_nocopy(ea),
ETHER_ADDR_LEN);
sc->sc_flags |= LAN9118_FLAGS_NO_EEPROM;
}
/* Map i/o space. */
if (bus_space_map(gpmc->gpmc_iot, gpmc->gpmc_addr, LAN9118_IOSIZE, 0,
&sc->sc_ioh))
panic("smsh_gpmc_attach: can't map i/o space");
sc->sc_iot = gpmc->gpmc_iot;
if (lan9118_attach(sc) != 0) {
bus_space_unmap(sc->sc_iot, sc->sc_ioh, LAN9118_IOSIZE);
return;
}
/* Establish the interrupt handler. */
ih = intr_establish(gpmc->gpmc_intr, IPL_NET, IST_LEVEL_LOW,
lan9118_intr, sc);
if (ih == NULL) {
aprint_error_dev(self,
"couldn't establish interrupt handler\n");
bus_space_unmap(sc->sc_iot, sc->sc_ioh, LAN9118_IOSIZE);
return;
}
}