From owner-freebsd-arm@FreeBSD.ORG Mon Jul 30 11:07:10 2012 Return-Path: Delivered-To: freebsd-arm@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7979A106566B for ; Mon, 30 Jul 2012 11:07:10 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 61BAD8FC1C for ; Mon, 30 Jul 2012 11:07:10 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q6UB7Ats001717 for ; Mon, 30 Jul 2012 11:07:10 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q6UB79Bj001715 for freebsd-arm@FreeBSD.org; Mon, 30 Jul 2012 11:07:09 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 30 Jul 2012 11:07:09 GMT Message-Id: <201207301107.q6UB79Bj001715@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-arm@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-arm@FreeBSD.org X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jul 2012 11:07:10 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o arm/166256 arm build fail in pmap.c o arm/162159 arm [panic] USB errors leading to panic on DockStar 9.0-RC o arm/161110 arm /usr/src/sys/arm/include/signal.h is bad o arm/161044 arm devel/icu does not build on arm o arm/158950 arm arm/sheevaplug fails fsx when mmap operations are enab o arm/156814 arm OpenRD Ultimate does not boot on DB-88F6XXX or SHEEVAP o arm/155894 arm [patch] Enable at91 booting from SDHC (high capacity) o arm/155214 arm [patch] MMC/SD IO slow on Atmel ARM with modern large o arm/154227 arm [geli] using GELI leads to panic on ARM o arm/153380 arm Panic / translation fault with wlan on ARM o arm/150581 arm [irq] Unknown error generates IRQ address decoding err o arm/149288 arm mail/dovecot causes panic during configure on Sheevapl o arm/134368 arm [patch] nslu2_led driver for the LEDs on the NSLU2 p arm/134338 arm [patch] Lock GPIO accesses on ixp425 14 problems total. From owner-freebsd-arm@FreeBSD.ORG Tue Jul 31 19:37:12 2012 Return-Path: Delivered-To: arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C6BBB106566C for ; Tue, 31 Jul 2012 19:37:12 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-gh0-f182.google.com (mail-gh0-f182.google.com [209.85.160.182]) by mx1.freebsd.org (Postfix) with ESMTP id CC20C8FC0A for ; Tue, 31 Jul 2012 19:37:11 +0000 (UTC) Received: by ghbz22 with SMTP id z22so7513285ghb.13 for ; Tue, 31 Jul 2012 12:37:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer :x-gm-message-state; bh=2qdrefToJ0VL/AV7bAS+A6pUC91ark0fxsdlfGGMI8w=; b=HMQLBPMVT+ss3f87F9ZIE6K3VpCJEg1DxEIlPcvMPnuNCN8fNRNVtT3BdHI1PXkQYP opEMz1Vo09DG7aZgDoZiG4AxpVyN8effTRCYqpXRloS4PG0VDrprrU+7MsYJ0fEOhFQq dr5ZjumVYZU9CBR/La1J+bPt06TAjTQ4Z7hRulXep0i9H4KXqFlt5mcon+cBtUmNN01l gnuNGFHBosR0GNCf38xGPg777MLloiiT3JP76kScs5F6BTMOco6L0m9m4aU4bXi/XDeh DgRzaAjCMxakky4hVCDgijG2pfo6gXhnL7zt77rnNH7N8e7SqLMcTDqlMC6PRCxH0736 ma8w== Received: by 10.60.31.165 with SMTP id b5mr24916814oei.58.1343763429475; Tue, 31 Jul 2012 12:37:09 -0700 (PDT) Received: from [10.30.101.53] ([209.117.142.2]) by mx.google.com with ESMTPS id qd7sm758909obc.5.2012.07.31.12.37.08 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 31 Jul 2012 12:37:08 -0700 (PDT) Sender: Warner Losh Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <201207310028.12533.Daan@vitsch.nl> Date: Tue, 31 Jul 2012 13:37:04 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <8A50DD5A-4329-4CAB-949D-22606527B7E4@bsdimp.com> References: <201206290418.q5T4IqpX018099@svn.freebsd.org> <201207310028.12533.Daan@vitsch.nl> To: Daan Vreeken X-Mailer: Apple Mail (2.1084) X-Gm-Message-State: ALoCoQlrR5u9OI0gYoY5OHELrV4eo1YaNugqNDJQ6G7Y2ZG9r4TNRDzt9bcj7/JC9Ly9mgfHlH7n Cc: "arm@freebsd.org" Subject: Re: svn commit: r237742 - in head/sys/arm: at91 conf X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jul 2012 19:37:12 -0000 Hi Daan, thanks for your feedback. Comments inline below. I've also redirected = this to the ARM list. On Jul 30, 2012, at 4:28 PM, Daan Vreeken wrote: > Hi Warner, >=20 >=20 > On Friday 29 June 2012 06:18:52 Warner Losh wrote: >> Author: imp >> Date: Fri Jun 29 04:18:52 2012 >> New Revision: 237742 >> URL: http://svn.freebsd.org/changeset/base/237742 >>=20 >> Log: >> Initital support for AT91SAM9X25 SoC and the SAM9X25-EK evaluation >> board. Much work remains. > ... >> Added: head/sys/arm/at91/at91sam9x25.c >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= >> =3D=3D=3D --- /dev/null 00:00:00 1970 (empty, because file is = newly added) >> +++ head/sys/arm/at91/at91sam9x25.c Fri Jun 29 04:18:52 2012 = (r237742) >> @@ -0,0 +1,343 @@ > ... >> +static uint32_t >> +at91_pll_outa(int freq) >> +{ >> + >> + switch (freq / 10000000) { >=20 > You seem to be dividing freq into multiples of 10MHz instead of 1MHz = here. I=20 > think dividing by 1e6 was the intention. You're right. That was wrong in the 9g20 code too. I'll correct it = there as well. >> + case 747 ... 801: return ((1 << 29) | (0 << 14)); >> + case 697 ... 746: return ((1 << 29) | (1 << 14)); >> + case 647 ... 696: return ((1 << 29) | (2 << 14)); >> + case 597 ... 646: return ((1 << 29) | (3 << 14)); >> + case 547 ... 596: return ((1 << 29) | (1 << 14)); >> + case 497 ... 546: return ((1 << 29) | (2 << 14)); >> + case 447 ... 496: return ((1 << 29) | (3 << 14)); >=20 >> + case 397 ... 446: return ((1 << 29) | (4 << 14)); >=20 > The (4 << 14) looks a bit strange here, as OUTA only occupies bit 14 = and 15 of=20 > CKGR_PLLAR. (See Atmel doc11054, page 201 and 1103.) Yes. I've never liked this code, and had an item on my todo list to go = dig into it. Thanks for doing the digging for me :) > Maybe this entire routine could be written as something like: > uint8_t outa; >=20 > freq /=3D 1000000; > // optional: > //freq +=3D 3; > // see doc11054, page 1103 > outa =3D 3 - ((freq / 50) & 3); >=20 > return ((1 << 29) | (outa << 14)); I like this code a lot. In fact, it looks like all the other PLLA OUTA = calculations are wrong for all the other chips. > Just glancing at the code, setting ICPLLA in PMC_PLLICPR for = frequencies <=3D=20 > 600MHz seems to be missing at this moment (or I'm just not seeing it). > (see page 212 and 1103) You're right. But it doesn't matter since we never seem to actually set = PLLA on startup. I've gone through and fixed things, and put better labels on the = references to the data sheets. See http://people.freebsd.org/~imp/clocks.diff for my fix. Does that = look good to you? How about to the arm@ peanut gallery? Warner= From owner-freebsd-arm@FreeBSD.ORG Tue Jul 31 20:59:00 2012 Return-Path: Delivered-To: arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F2ED1106566C for ; Tue, 31 Jul 2012 20:58:59 +0000 (UTC) (envelope-from Daan@vitsch.nl) Received: from VM01.VEHosting.nl (VM016.VEHosting.nl [IPv6:2001:1af8:2100:b020::140]) by mx1.freebsd.org (Postfix) with ESMTP id 8CE0A8FC08 for ; Tue, 31 Jul 2012 20:58:59 +0000 (UTC) Received: from [2001:470:d233:2:224:8cff:fe82:66cd] ([IPv6:2001:470:d233:2:224:8cff:fe82:66cd]) (authenticated bits=0) by VM01.VEHosting.nl (8.14.3/8.13.8) with ESMTP id q6VKx0lC053026; Tue, 31 Jul 2012 22:59:00 +0200 (CEST) (envelope-from Daan@vitsch.nl) From: Daan Vreeken Organization: Vitsch Electronics To: Warner Losh Date: Tue, 31 Jul 2012 22:58:55 +0200 User-Agent: KMail/1.9.10 References: <201206290418.q5T4IqpX018099@svn.freebsd.org> <201207310028.12533.Daan@vitsch.nl> <8A50DD5A-4329-4CAB-949D-22606527B7E4@bsdimp.com> In-Reply-To: <8A50DD5A-4329-4CAB-949D-22606527B7E4@bsdimp.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <201207312258.55870.Daan@vitsch.nl> x-ve-auth-version: mi-1.1.5 2011-02-07 - Copyright (c) 2008, 2011 - Daan Vreeken - VEHosting x-ve-auth: authenticated as 'pa4dan' on VM01.VEHosting.nl Cc: "arm@freebsd.org" Subject: Re: svn commit: r237742 - in head/sys/arm: at91 conf X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jul 2012 20:59:00 -0000 Hi Warner, On Tuesday 31 July 2012 21:37:04 Warner Losh wrote: > Hi Daan, > > thanks for your feedback. Comments inline below. I've also redirected > this to the ARM list. > > On Jul 30, 2012, at 4:28 PM, Daan Vreeken wrote: > > Hi Warner, > > > > On Friday 29 June 2012 06:18:52 Warner Losh wrote: > >> Author: imp > >> Date: Fri Jun 29 04:18:52 2012 > >> New Revision: 237742 > >> URL: http://svn.freebsd.org/changeset/base/237742 > >> > >> Log: > >> Initital support for AT91SAM9X25 SoC and the SAM9X25-EK evaluation > >> board. Much work remains. > > > > ... > > > >> Added: head/sys/arm/at91/at91sam9x25.c > >> ======================================================================== > >>=== === --- /dev/null 00:00:00 1970 (empty, because file is newly added) > >> +++ head/sys/arm/at91/at91sam9x25.c Fri Jun 29 04:18:52 2012 (r237742) > >> @@ -0,0 +1,343 @@ > > > > ... > > > >> +static uint32_t > >> +at91_pll_outa(int freq) > >> +{ > >> + > >> + switch (freq / 10000000) { > > > > You seem to be dividing freq into multiples of 10MHz instead of 1MHz > > here. I think dividing by 1e6 was the intention. > > You're right. That was wrong in the 9g20 code too. I'll correct it there > as well. Ok. > >> + case 747 ... 801: return ((1 << 29) | (0 << 14)); > >> + case 697 ... 746: return ((1 << 29) | (1 << 14)); > >> + case 647 ... 696: return ((1 << 29) | (2 << 14)); > >> + case 597 ... 646: return ((1 << 29) | (3 << 14)); > >> + case 547 ... 596: return ((1 << 29) | (1 << 14)); > >> + case 497 ... 546: return ((1 << 29) | (2 << 14)); > >> + case 447 ... 496: return ((1 << 29) | (3 << 14)); > >> > >> + case 397 ... 446: return ((1 << 29) | (4 << 14)); > > > > The (4 << 14) looks a bit strange here, as OUTA only occupies bit 14 and > > 15 of CKGR_PLLAR. (See Atmel doc11054, page 201 and 1103.) > > Yes. I've never liked this code, and had an item on my todo list to go dig > into it. Thanks for doing the digging for me :) You're welcome. > > Maybe this entire routine could be written as something like: > > uint8_t outa; > > > > freq /= 1000000; > > // optional: > > //freq += 3; > > // see doc11054, page 1103 > > outa = 3 - ((freq / 50) & 3); > > > > return ((1 << 29) | (outa << 14)); > > I like this code a lot. In fact, it looks like all the other PLLA OUTA > calculations are wrong for all the other chips. > > > Just glancing at the code, setting ICPLLA in PMC_PLLICPR for frequencies > > <= 600MHz seems to be missing at this moment (or I'm just not seeing it). > > (see page 212 and 1103) > > You're right. But it doesn't matter since we never seem to actually set > PLLA on startup. > > I've gone through and fixed things, and put better labels on the references > to the data sheets. > > See http://people.freebsd.org/~imp/clocks.diff for my fix. Does that look > good to you? How about to the arm@ peanut gallery? Almost perfect :) Although I think you've got the overlap-fix backwards. With 'freq -= 3', freq has to be 3 higher instead of lower before the next range is selected. I see that you've also fixed 195MHz to 155MHz in the 9260 PLL code. I've had the same diff in one of our local patch sets at work for a while. I'll see if I can find some time to filter out more local changes that could aid others. Regards, -- Daan Vreeken Vitsch Electronics http://Vitsch.nl/ http://VitschVPN.nl/ tel: +31-(0)40-7113051 KvK nr: 17174380 From owner-freebsd-arm@FreeBSD.ORG Tue Jul 31 23:58:21 2012 Return-Path: Delivered-To: arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B53A7106566C; Tue, 31 Jul 2012 23:58:21 +0000 (UTC) (envelope-from tinderbox@freebsd.org) Received: from freebsd-current.sentex.ca (freebsd-current.sentex.ca [64.7.128.98]) by mx1.freebsd.org (Postfix) with ESMTP id 8686A8FC0A; Tue, 31 Jul 2012 23:58:21 +0000 (UTC) Received: from freebsd-current.sentex.ca (localhost [127.0.0.1]) by freebsd-current.sentex.ca (8.14.5/8.14.5) with ESMTP id q6VNwFnX050094; Tue, 31 Jul 2012 19:58:15 -0400 (EDT) (envelope-from tinderbox@freebsd.org) Received: (from tinderbox@localhost) by freebsd-current.sentex.ca (8.14.5/8.14.5/Submit) id q6VNwF0b050093; Tue, 31 Jul 2012 23:58:15 GMT (envelope-from tinderbox@freebsd.org) Date: Tue, 31 Jul 2012 23:58:15 GMT Message-Id: <201207312358.q6VNwF0b050093@freebsd-current.sentex.ca> X-Authentication-Warning: freebsd-current.sentex.ca: tinderbox set sender to FreeBSD Tinderbox using -f Sender: FreeBSD Tinderbox From: FreeBSD Tinderbox To: FreeBSD Tinderbox , , Precedence: bulk Cc: Subject: [head tinderbox] failure on arm/arm X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jul 2012 23:58:21 -0000 TB --- 2012-07-31 22:50:00 - tinderbox 2.9 running on freebsd-current.sentex.ca TB --- 2012-07-31 22:50:00 - FreeBSD freebsd-current.sentex.ca 8.3-PRERELEASE FreeBSD 8.3-PRERELEASE #0: Mon Mar 26 13:54:12 EDT 2012 des@freebsd-current.sentex.ca:/usr/obj/usr/src/sys/GENERIC amd64 TB --- 2012-07-31 22:50:00 - starting HEAD tinderbox run for arm/arm TB --- 2012-07-31 22:50:00 - cleaning the object tree TB --- 2012-07-31 22:50:00 - cvsupping the source tree TB --- 2012-07-31 22:50:00 - /usr/bin/csup -z -r 3 -g -L 1 -h cvsup.sentex.ca /tinderbox/HEAD/arm/arm/supfile TB --- 2012-07-31 22:52:25 - building world TB --- 2012-07-31 22:52:25 - CROSS_BUILD_TESTING=YES TB --- 2012-07-31 22:52:25 - MAKEOBJDIRPREFIX=/obj TB --- 2012-07-31 22:52:25 - PATH=/usr/bin:/usr/sbin:/bin:/sbin TB --- 2012-07-31 22:52:25 - SRCCONF=/dev/null TB --- 2012-07-31 22:52:25 - TARGET=arm TB --- 2012-07-31 22:52:25 - TARGET_ARCH=arm TB --- 2012-07-31 22:52:25 - TZ=UTC TB --- 2012-07-31 22:52:25 - __MAKE_CONF=/dev/null TB --- 2012-07-31 22:52:25 - cd /src TB --- 2012-07-31 22:52:25 - /usr/bin/make -B buildworld >>> World build started on Tue Jul 31 22:52:26 UTC 2012 >>> Rebuilding the temporary build tree >>> stage 1.1: legacy release compatibility shims >>> stage 1.2: bootstrap tools >>> stage 2.1: cleaning up the object tree >>> stage 2.2: rebuilding the object tree >>> stage 2.3: build tools >>> stage 3: cross tools >>> stage 4.1: building includes >>> stage 4.2: building libraries >>> stage 4.3: make dependencies >>> stage 4.4: building everything >>> World build completed on Tue Jul 31 23:54:48 UTC 2012 TB --- 2012-07-31 23:54:48 - cd /src/sys/arm/conf TB --- 2012-07-31 23:54:48 - /usr/sbin/config -m ATMEL TB --- 2012-07-31 23:54:48 - building ATMEL kernel TB --- 2012-07-31 23:54:48 - CROSS_BUILD_TESTING=YES TB --- 2012-07-31 23:54:48 - MAKEOBJDIRPREFIX=/obj TB --- 2012-07-31 23:54:48 - PATH=/usr/bin:/usr/sbin:/bin:/sbin TB --- 2012-07-31 23:54:48 - SRCCONF=/dev/null TB --- 2012-07-31 23:54:48 - TARGET=arm TB --- 2012-07-31 23:54:48 - TARGET_ARCH=arm TB --- 2012-07-31 23:54:48 - TZ=UTC TB --- 2012-07-31 23:54:48 - __MAKE_CONF=/dev/null TB --- 2012-07-31 23:54:48 - cd /src TB --- 2012-07-31 23:54:48 - /usr/bin/make -B buildkernel KERNCONF=ATMEL >>> Kernel build for ATMEL started on Tue Jul 31 23:54:49 UTC 2012 >>> stage 1: configuring the kernel >>> stage 2.1: cleaning up the object tree >>> stage 2.2: rebuilding the object tree >>> stage 2.3: build tools >>> stage 3.1: making dependencies >>> stage 3.2: building everything [...] cc -mlittle-endian -c -O2 -pipe -fno-strict-aliasing -std=c99 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option -nostdinc -I. -I/src/sys -I/src/sys/contrib/altq -I/src/sys/contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -mcpu=arm9 -ffreestanding -Werror /src/sys/arm/at91/at91_rst.c cc -mlittle-endian -c -O2 -pipe -fno-strict-aliasing -std=c99 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option -nostdinc -I. -I/src/sys -I/src/sys/contrib/altq -I/src/sys/contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -mcpu=arm9 -ffreestanding -Werror /src/sys/arm/at91/at91_rtc.c cc -mlittle-endian -c -O2 -pipe -fno-strict-aliasing -std=c99 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option -nostdinc -I. -I/src/sys -I/src/sys/contrib/altq -I/src/sys/contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -mcpu=arm9 -ffreestanding -Werror /src/sys/arm/at91/at91_spi.c /src/sys/arm/at91/at91_spi.c: In function 'at91_spi_transfer': /src/sys/arm/at91/at91_spi.c:294: error: 'struct spi_command' has no member named 'cs' /src/sys/arm/at91/at91_spi.c:294: error: 'struct spi_command' has no member named 'cs' /src/sys/arm/at91/at91_spi.c:296: error: 'struct spi_command' has no member named 'cs' /src/sys/arm/at91/at91_spi.c:316: error: 'struct spi_command' has no member named 'cs' *** Error code 1 Stop in /obj/arm.arm/src/sys/ATMEL. *** Error code 1 Stop in /src. *** Error code 1 Stop in /src. TB --- 2012-07-31 23:58:15 - WARNING: /usr/bin/make returned exit code 1 TB --- 2012-07-31 23:58:15 - ERROR: failed to build ATMEL kernel TB --- 2012-07-31 23:58:15 - 2634.23 user 600.47 system 4094.91 real http://tinderbox.freebsd.org/tinderbox-head-HEAD-arm-arm.full From owner-freebsd-arm@FreeBSD.ORG Wed Aug 1 18:32:53 2012 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 75A81106566B for ; Wed, 1 Aug 2012 18:32:53 +0000 (UTC) (envelope-from freebsd@damnhippie.dyndns.org) Received: from qmta02.emeryville.ca.mail.comcast.net (qmta02.emeryville.ca.mail.comcast.net [76.96.30.24]) by mx1.freebsd.org (Postfix) with ESMTP id 5411D8FC08 for ; Wed, 1 Aug 2012 18:32:53 +0000 (UTC) Received: from omta08.emeryville.ca.mail.comcast.net ([76.96.30.12]) by qmta02.emeryville.ca.mail.comcast.net with comcast id hS4l1j0050FhH24A2WYntC; Wed, 01 Aug 2012 18:32:47 +0000 Received: from damnhippie.dyndns.org ([24.8.232.202]) by omta08.emeryville.ca.mail.comcast.net with comcast id hWYm1j00G4NgCEG8UWYnDd; Wed, 01 Aug 2012 18:32:47 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id q71IWj1s001934; Wed, 1 Aug 2012 12:32:45 -0600 (MDT) (envelope-from freebsd@damnhippie.dyndns.org) From: Ian Lepore To: Dave Hayes In-Reply-To: <5008728C.5040100@jetcafe.org> References: <5008728C.5040100@jetcafe.org> Content-Type: multipart/mixed; boundary="=-/83oDyvDRjrBuKR4E5GQ" Date: Wed, 01 Aug 2012 12:32:44 -0600 Message-ID: <1343845964.1128.28.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Cc: freebsd-arm@freebsd.org Subject: Re: Globalscale Dreamplug and 8.3 RELEASE X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Aug 2012 18:32:53 -0000 --=-/83oDyvDRjrBuKR4E5GQ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Thu, 2012-07-19 at 13:48 -0700, Dave Hayes wrote: > Hello. :) I'm using FreeBSD 8.3 RELEASE and attempting to get this > running on my dreamplug. I've successfully gotten it to boot off of a > usb stick (after many adventures) but I've run into a problem. It seems > that mge1 is not found (the 2nd ethernet interface). > > I really need this to work, so I did some digging on this list but it > seems there's a .dts file needed. FreeBSD 8 doesn't use dts files as far > as I can tell, though I could be horribly wrong there. > > Can anyone point me to some patches which would get the 2nd ethernet > interface to work? I finally found some time yesterday to play around with this (sorry to take so long to respond). I made some small progress towards getting the second ethernet interface working, but didn't achieve complete success. The attached patch (for freebsd 8) gets things to the point where the mge1 device is created at boot time. You can manually configure the interface and packets will be received, but no packets ever go out. I did some driver debugging to the point where I see the outgoing packet buffers being handed to the hardware, and then shortly thereafter TX-done interrupts happen, as if the packet was sent just fine. But either the bits never hit the wire, or the packets are malformed in some way such that other boxes on my network can't see them arrive (using tcpdump; I don't have any wire-level debugging tools). I get the same results with a freshly-sync'd -current, so this isn't specific to freebsd 8. I have a feeling there's some simple little thing I'm overlooking because I don't know the arm/mv code well. Like the PHY needs to be powered on or a clock enabled for it or something like that. I don't think I've got much more time to play with this right now, so I figured I should post what I've learned along with the patches that get it this far; maybe someone else can make some more progress. -- Ian --=-/83oDyvDRjrBuKR4E5GQ Content-Disposition: attachment; filename="dreamplug_8_mge1.diff" Content-Type: text/x-patch; name="dreamplug_8_mge1.diff"; charset="us-ascii" Content-Transfer-Encoding: 7bit Index: sys/arm/mv/kirkwood/kirkwood.c =================================================================== --- sys/arm/mv/kirkwood/kirkwood.c (revision 234710) +++ sys/arm/mv/kirkwood/kirkwood.c (working copy) @@ -95,6 +95,12 @@ { -1 }, CPU_PM_CTRL_GE0 }, + { "mge", MV_ETH1_BASE, MV_ETH_SIZE, + { MV_INT_GBE1RX, MV_INT_GBE1TX, MV_INT_GBE1MISC, + MV_INT_GBE1SUM, MV_INT_GBE1ERR, -1 }, + { -1 }, + CPU_PM_CTRL_GE1 + }, { "twsi", MV_TWSI0_BASE, MV_TWSI_SIZE, { -1 }, { -1 }, CPU_PM_CTRL_NONE Index: sys/arm/mv/common.c =================================================================== --- sys/arm/mv/common.c (revision 234710) +++ sys/arm/mv/common.c (working copy) @@ -307,7 +307,7 @@ decode_win_cpu_setup(); decode_win_usb_setup(); decode_win_eth_setup(MV_ETH0_BASE); - if (dev == MV_DEV_MV78100 || dev == MV_DEV_MV78100_Z0) + if (dev == MV_DEV_MV78100 || dev == MV_DEV_MV78100_Z0 || dev == MV_DEV_88F6281) decode_win_eth_setup(MV_ETH1_BASE); if (dev == MV_DEV_88F6281 || dev == MV_DEV_MV78100 || dev == MV_DEV_MV78100_Z0) Index: sys/dev/mge/if_mge.c =================================================================== --- sys/dev/mge/if_mge.c (revision 234710) +++ sys/dev/mge/if_mge.c (working copy) @@ -69,10 +69,6 @@ #include #include -#ifndef MII_ADDR_BASE -#define MII_ADDR_BASE 8 -#endif - #include #include #include @@ -619,13 +615,6 @@ /* Set chip version-dependent parameters */ mge_ver_params(sc); - /* - * We assume static PHY address <=> device unit mapping: - * PHY Address = MII_ADDR_BASE + devce unit. - * This is true for most Marvell boards. - */ - phy = MII_ADDR_BASE + device_get_unit(dev); - /* Initialize mutexes */ mtx_init(&sc->transmit_lock, device_get_nameunit(dev), "mge TX lock", MTX_DEF); mtx_init(&sc->receive_lock, device_get_nameunit(dev), "mge RX lock", MTX_DEF); @@ -687,13 +676,15 @@ ether_ifattach(ifp, hwaddr); callout_init(&sc->wd_callout, 0); - /* Attach PHY(s) */ + /* Attach PHY. We assume static PHY address <=> device unit mapping: + * PHY Address = MGE_REG_PHYDEV + device unit. This is true for most + * Marvell boards. + */ + phy = (MGE_READ(sc_mge0, MGE_REG_PHYDEV) & 0xf) + device_get_unit(dev); error = mii_attach(dev, &sc->miibus, ifp, mge_ifmedia_upd, mge_ifmedia_sts, BMSR_DEFCAPMASK, phy, MII_OFFSET_ANY, 0); if (error) { device_printf(dev, "attaching PHYs failed\n"); - if_free(ifp); - sc->ifp = NULL; mge_detach(dev); return (error); } @@ -742,6 +733,7 @@ if (sc->ifp) { ether_ifdetach(sc->ifp); if_free(sc->ifp); + sc->ifp = NULL; } /* Free DMA resources */ --=-/83oDyvDRjrBuKR4E5GQ-- From owner-freebsd-arm@FreeBSD.ORG Wed Aug 1 18:43:00 2012 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 86255106564A for ; Wed, 1 Aug 2012 18:43:00 +0000 (UTC) (envelope-from freebsd@damnhippie.dyndns.org) Received: from qmta10.emeryville.ca.mail.comcast.net (qmta10.emeryville.ca.mail.comcast.net [76.96.30.17]) by mx1.freebsd.org (Postfix) with ESMTP id 67A7A8FC12 for ; Wed, 1 Aug 2012 18:43:00 +0000 (UTC) Received: from omta04.emeryville.ca.mail.comcast.net ([76.96.30.35]) by qmta10.emeryville.ca.mail.comcast.net with comcast id hUvU1j0040lTkoCAAWhuol; Wed, 01 Aug 2012 18:41:54 +0000 Received: from damnhippie.dyndns.org ([24.8.232.202]) by omta04.emeryville.ca.mail.comcast.net with comcast id hWht1j00U4NgCEG8QWhu8M; Wed, 01 Aug 2012 18:41:54 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id q71Ifpr4001940; Wed, 1 Aug 2012 12:41:51 -0600 (MDT) (envelope-from freebsd@damnhippie.dyndns.org) From: Ian Lepore To: Dave Hayes In-Reply-To: <5008728C.5040100@jetcafe.org> References: <5008728C.5040100@jetcafe.org> Content-Type: text/plain; charset="us-ascii" Date: Wed, 01 Aug 2012 12:41:51 -0600 Message-ID: <1343846511.1128.34.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: freebsd-arm@freebsd.org Subject: Re: Globalscale Dreamplug and 8.3 RELEASE X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Aug 2012 18:43:00 -0000 On Thu, 2012-07-19 at 13:48 -0700, Dave Hayes wrote: > As a related question, I'm noting some conversation by various > developers about issues with arm...if there are any patches that > experienced people could point me to that might get arm to work better > for FreeBSD 8.3 that would be great. > > Thanks in advance! As to this other part of your message that I didn't answer with my last reply... I think the most important fix you need that isn't already in 8.3 is the change to avoid leaving the i-cache bit disabled on executable pages after loading a program or shared lib. I had posted a workaround patch for that on this list a few months ago, which was oriented towards being as small a change as possible to implement the workaround. Since then, my patch was reworked by kib@ into a much more complete and robust change, but that change hasn't found its way back to freebsd 8.x yet. The change that got committed to 9 and 10 doesn't apply cleanly to 8, but this is something we need at work, so I'll get it back-ported to 8 and post the patch Sometime Soon(tm). -- Ian From owner-freebsd-arm@FreeBSD.ORG Wed Aug 1 20:32:46 2012 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 70B85106564A for ; Wed, 1 Aug 2012 20:32:46 +0000 (UTC) (envelope-from kp@sigsegv.be) Received: from mercury.codepro.be (mercury.codepro.be [IPv6:2001:4b98:dc0:51:216:3eff:feb7:3147]) by mx1.freebsd.org (Postfix) with ESMTP id 025798FC12 for ; Wed, 1 Aug 2012 20:32:44 +0000 (UTC) Received: from adrastea.jupiter.sigsegv.be (adrastea.jupiter.sigsegv.be [IPv6:2001:6f8:1498:1::3]) by mercury.codepro.be (Postfix) with ESMTP id 08232AD; Wed, 1 Aug 2012 22:32:43 +0200 (CEST) Received: from thebe.jupiter.sigsegv.be (thebe.jupiter.sigsegv.be [172.16.1.5]) by adrastea.jupiter.sigsegv.be (Postfix) with ESMTP id 88D731208F; Wed, 1 Aug 2012 22:32:12 +0200 (CEST) Received: by thebe.jupiter.sigsegv.be (Postfix, from userid 1000) id 5E2C317B7D; Wed, 1 Aug 2012 22:32:12 +0200 (CEST) Date: Wed, 1 Aug 2012 22:32:12 +0200 From: Kristof Provost To: Ian Lepore Message-ID: <20120801203211.GL36837@thebe.jupiter.sigsegv.be> References: <5008728C.5040100@jetcafe.org> <1343845964.1128.28.camel@revolution.hippie.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1343845964.1128.28.camel@revolution.hippie.lan> X-PGP-Fingerprint: E114 D9EA 909E D469 8F57 17A5 7D15 91C6 9EFA F286 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-arm@freebsd.org Subject: Re: Globalscale Dreamplug and 8.3 RELEASE X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Aug 2012 20:32:46 -0000 On 2012-08-01 12:32:44 (-0600), Ian Lepore wrote: > I did some driver debugging to the point where I see the outgoing packet > buffers being handed to the hardware, and then shortly thereafter > TX-done interrupts happen, as if the packet was sent just fine. But > either the bits never hit the wire, or the packets are malformed in some > way such that other boxes on my network can't see them arrive (using > tcpdump; I don't have any wire-level debugging tools). > At a guess, the problem is that the PHY address isn't getting programmed in the MAC. There should be a fix in 9.0 or 10.0. It's the /* Tell the MAC where to find the PHY so autoneg works */ bit in mge_attach in current. Regards, Kristof From owner-freebsd-arm@FreeBSD.ORG Wed Aug 1 20:47:02 2012 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 568D2106566B for ; Wed, 1 Aug 2012 20:47:02 +0000 (UTC) (envelope-from r.neese@gmail.com) Received: from mail-gg0-f182.google.com (mail-gg0-f182.google.com [209.85.161.182]) by mx1.freebsd.org (Postfix) with ESMTP id 0B1A98FC16 for ; Wed, 1 Aug 2012 20:47:01 +0000 (UTC) Received: by ggnk4 with SMTP id k4so1119734ggn.13 for ; Wed, 01 Aug 2012 13:47:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=Q20PfVtDWPBC6vkxb32FTlMb43Zouzwx5c1PZvCbFFo=; b=tREtDLJX388L7X4yxBPTHtFomRUGcnl6ggTn7yAcoltN640zavaJMkRQre2EjKa2fK 0X6IHbfxoNQV+ldHXEprTckCVK2Ej7JZtIX9I2PE5ZaFGKm4EF5PeXI/LiMuCMsNttUw ZC03GeX5zZx9FmobH+TVJtgn5x9sy+l8+5hjaTrjVmRb+eGT6+/OtVHwZJggQ2TQjubB cOtjGUfQpuK2K+mYy6GNJm0AUJdZRJ7CV+VqNVkFJ/SwcVUz+bbq5mkCL0u5XFyiemhj rUsZuJQ7txEiCyfp5UoUMWcfJRApHWKrl+/4Eq9kdJSicg4ygXe5AbkvwHHsnEwKSRxA zzEQ== Received: by 10.100.80.2 with SMTP id d2mr5709972anb.49.1343854021372; Wed, 01 Aug 2012 13:47:01 -0700 (PDT) Received: from [127.0.0.1] ([97.100.95.108]) by mx.google.com with ESMTPS id v8sm7332122yhi.15.2012.08.01.13.46.59 (version=SSLv3 cipher=OTHER); Wed, 01 Aug 2012 13:47:00 -0700 (PDT) Message-ID: <501995C2.3030501@gmail.com> Date: Wed, 01 Aug 2012 16:46:58 -0400 From: Richard E Neese User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20120713 Thunderbird/14.0 MIME-Version: 1.0 To: Kristof Provost References: <5008728C.5040100@jetcafe.org> <1343845964.1128.28.camel@revolution.hippie.lan> <20120801203211.GL36837@thebe.jupiter.sigsegv.be> In-Reply-To: <20120801203211.GL36837@thebe.jupiter.sigsegv.be> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: freebsd-arm@freebsd.org Subject: Re: Globalscale Dreamplug and 8.3 RELEASE X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Aug 2012 20:47:02 -0000 On 8/1/2012 4:32 PM, Kristof Provost wrote: > On 2012-08-01 12:32:44 (-0600), Ian Lepore wrote: >> I did some driver debugging to the point where I see the outgoing packet >> buffers being handed to the hardware, and then shortly thereafter >> TX-done interrupts happen, as if the packet was sent just fine. But >> either the bits never hit the wire, or the packets are malformed in some >> way such that other boxes on my network can't see them arrive (using >> tcpdump; I don't have any wire-level debugging tools). >> > At a guess, the problem is that the PHY address isn't getting programmed > in the MAC. There should be a fix in 9.0 or 10.0. > > It's the /* Tell the MAC where to find the PHY so autoneg works */ bit > in mge_attach in current. > > Regards, > Kristof > > _______________________________________________ > freebsd-arm@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-arm > To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org 8.x is going to need work for older device can you send me the dreamplg dts files from 8.x I can compair them to 9.x and ty to fix your issue From owner-freebsd-arm@FreeBSD.ORG Wed Aug 1 21:16:56 2012 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 48EC9106564A for ; Wed, 1 Aug 2012 21:16:56 +0000 (UTC) (envelope-from r.neese@gmail.com) Received: from mail-yx0-f182.google.com (mail-yx0-f182.google.com [209.85.213.182]) by mx1.freebsd.org (Postfix) with ESMTP id E56DE8FC08 for ; Wed, 1 Aug 2012 21:16:55 +0000 (UTC) Received: by yenl8 with SMTP id l8so9220984yen.13 for ; Wed, 01 Aug 2012 14:16:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type; bh=hyJVsYq8ErHib/P8H4umJeDZXuWwsQrcZuEcvEyhflQ=; b=euiKcE4NskjXlw0cNKRpjL0t7LX/i5CXrhxvdyHdgBmrLyhnTe8SLE8F7rx/ZCDx5q oM5hlF7EngDri04NHCex/Z9k1gmgfDJSXl7/pNz+arBB30zjJiqbnJpVMFz694gjc6nv L2g0GGClrcCQU5tvsxJW4mivcwsBvko6/jwe9x8+ih74vxgZ1lPGabWcitWprMub90sf Gj7oClZTWOa7989R2bPUkePsHTOkP9wypgoaHEqjuhsq+xrNJsa96cvjIqMxmVbNNnyk 2CKtNBNh0C0wziPEO+aWEs2Uf3Dr4wG4GugqxhxNVKOTMp2c8YJdG+ferHHkGysfaF3o m4hQ== Received: by 10.236.165.35 with SMTP id d23mr17964005yhl.127.1343855814852; Wed, 01 Aug 2012 14:16:54 -0700 (PDT) Received: from [127.0.0.1] ([97.100.95.108]) by mx.google.com with ESMTPS id h15sm3886141ank.1.2012.08.01.14.16.53 (version=SSLv3 cipher=OTHER); Wed, 01 Aug 2012 14:16:53 -0700 (PDT) Message-ID: <50199CC3.2070809@gmail.com> Date: Wed, 01 Aug 2012 17:16:51 -0400 From: Richard E Neese User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20120713 Thunderbird/14.0 MIME-Version: 1.0 To: Kristof Provost References: <5008728C.5040100@jetcafe.org> <1343845964.1128.28.camel@revolution.hippie.lan> <20120801203211.GL36837@thebe.jupiter.sigsegv.be> In-Reply-To: <20120801203211.GL36837@thebe.jupiter.sigsegv.be> Content-Type: multipart/mixed; boundary="------------050108080400000103000003" Cc: freebsd-arm@freebsd.org Subject: Re: Globalscale Dreamplug and 8.3 RELEASE X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Aug 2012 21:16:56 -0000 This is a multi-part message in MIME format. --------------050108080400000103000003 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 8/1/2012 4:32 PM, Kristof Provost wrote: > On 2012-08-01 12:32:44 (-0600), Ian Lepore wrote: >> I did some driver debugging to the point where I see the outgoing packet >> buffers being handed to the hardware, and then shortly thereafter >> TX-done interrupts happen, as if the packet was sent just fine. But >> either the bits never hit the wire, or the packets are malformed in some >> way such that other boxes on my network can't see them arrive (using >> tcpdump; I don't have any wire-level debugging tools). >> > At a guess, the problem is that the PHY address isn't getting programmed > in the MAC. There should be a fix in 9.0 or 10.0. > > It's the /* Tell the MAC where to find the PHY so autoneg works */ bit > in mge_attach in current. > > Regards, > Kristof > > _______________________________________________ > freebsd-arm@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-arm > To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org" have a look over this and try to appy it to your 8.x src even if manualy. as both nicks work on 9/10 --------------050108080400000103000003 Content-Type: text/plain; charset=windows-1252; name="freebsd-svn-head-071412-2314.diff" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="freebsd-svn-head-071412-2314.diff" SW5kZXg6IGxpYi9saWJsem1hL2NvbmZpZy5oCj09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIGxpYi9saWJs em1hL2NvbmZpZy5oCShyZXZpc2lvbiAyMzgzNjQpCisrKyBsaWIvbGlibHptYS9jb25maWcu aAkod29ya2luZyBjb3B5KQpAQCAtODUsOSArODUsOSBAQAogI2RlZmluZSBWRVJTSU9OICI1 LjAuMyIKICNpZiBkZWZpbmVkKF9fRnJlZUJTRF9fKQogI2luY2x1ZGUgPHN5cy9fdHlwZXMu aD4KLSNpZiBkZWZpbmVkKF9fTk9fU1RSSUNUX0FMSUdOTUVOVCkKKy8qI2lmIGRlZmluZWQo X19OT19TVFJJQ1RfQUxJR05NRU5UKQogI2RlZmluZSBUVUtMSUJfRkFTVF9VTkFMSUdORURf QUNDRVNTIDEKLSNlbmRpZgorI2VuZGlmKi8KICNpbmNsdWRlIDxtYWNoaW5lL2VuZGlhbi5o PgogI2lmIF9CWVRFX09SREVSID09IF9CSUdfRU5ESUFOCiAjIGRlZmluZSBXT1JEU19CSUdF TkRJQU4gMQpJbmRleDogZXRjL3JjLmQvZnNjawo9PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBldGMvcmMu ZC9mc2NrCShyZXZpc2lvbiAyMzgzNjQpCisrKyBldGMvcmMuZC9mc2NrCSh3b3JraW5nIGNv cHkpCkBAIC0yNyw3ICsyNywxNiBAQAogCQlpZiBjaGVja3llc25vIGJhY2tncm91bmRfZnNj azsgdGhlbgogCQkJZnNjayAtRiAtcAogCQllbHNlCi0JCQlmc2NrIC1wCisJCQkgICBpZiBj aGVja3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Ki8KKwkJCQkxNCAxCQkvKiBNUFBbMTRd OiBTRF9EWzBdICovCisJCQkJMTUgMQkJLyogTVBQWzE3XTogU0RfRFsxXSAqLworCQkJCTIx IDUgICAgICAgICAgICAvKiBNUFBbMjFdOiBTQVRBMF9BQyAqLworICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAyMyA1ICAgICAgICAgICAgLyogTVBQWzIzXTogU0FUQTBfUFIg Ki8KKwkJCQkyOCAwCQkvKiBNUFBbMjhdOiBHUElPWzI4XSAqLworCQkJCTI5IDEJCS8qIE1Q UFsyOV06IFRTTVBbOV0gKi8KKwkJCQkzNyA0CQkvKiBNUFBbMzddOiBBVV9TUERJRk8gKi8K KwkJCQkzOCA0CQkvKiBNUFBbMzhdOiBBVV9TUERPRlJNQ0xLICovCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIDM5IDQJCS8qIE1QUFszOV06IEFVX0kyU0JDTEsgKi8KKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNDAgNAkJLyogTVBQWzQwXTogQVVfSTJT RE8gKi8KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNDEgNAkJLyogTVBQWzQx XTogQVVfSTJTTFJDTEsgKi8KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNDIg NAkJLyogTVBQWzQyXTogQVVfSTJTTUNMSyAqLworICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICA0MyA0CQkvKiBNUFBbNDNdOiBBVV9JMlNESSAqLworICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICA0NCA0CQkvKiBNUFBbNDRdOiBBVV9FWFRDTEsgKi8KKwkJCQk0 NyAwCQkvKiBNUFBbNDddOiBHUElPWzQ3XSBCbHVldG9vdGggTEVEICovCisJCQkJNDggMAkJ LyogTVBQWzQ4XTogR1BJT1s0OF0gV2lmaSBMRUQgKi8KKwkJCQk0OSAwPjsJCS8qIE1QUFs0 OV06IEdQSU9bNDldIFdpZmkgQ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W9AMCB7CisJCQkJI2FkZHJlc3MtY2VsbHMgPSA8MT47 CisJCQkJI3NpemUtY2VsbHMgPSA8MD47CisJCQkJY29tcGF0aWJsZSA9ICJtcnZsLG1kaW8i OworCisJCQkJcGh5MDogZXRoZXJuZXQtcGh5QDAgeworCQkJCQlyZWcgPSA8MHgwPjsKKwkJ CQl9OworCisJCQkJcGh5MTogZXRoZXJuZXQtcGh5QDEgeworICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIHJlZyA9IDwweDE+OworICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICB9OworCQkJfTsKKwkJfTsKKworICAgICAgICAgICAgICAgIGVuZXQx OiBldGhlcm5ldEA3NjAwMCB7CisgICAgICAgICAgICAgICAgICAgICAgICAjYWRkcmVzcy1j ZWxscyA9IDwxPjsKKyAgICAgICAgICAgICAgICAgICAgICAgICNzaXplLWNlbGxzID0gPDE+ OworICAgICAgICAgICAgICAgICAgICAgICAgbW9kZWwgPSAiVjIiOworICAgICAgICAgICAg ICAgICAgICAgICAgY29tcGF0aWJsZSA9ICJtcnZsLGdlIjsKKyAgICAgICAgICAgICAgICAg ICAgICAgIHJlZyA9IDwweDc2MDAwIDB4MDIwMDA+OworICAgICAgICAgICAgICAgICAgICAg ICAgcmFuZ2VzID0gPDB4MCAweDc2MDAwIDB4MjAwMD47CisgICAgICAgICAgICAgICAgICAg ICAgICBsb2NhbC1tYWMtYWRkcmVzcyA9IFsgMDAgMDAgMDAgMDAgMDAgMDAgXTsKKyAgICAg ICAgICAgICAgICAgICAgICAgIGludGVycnVwdHMgPSA8MTYgMTcgMTggMTUgNDc+OworICAg ICAgICAgICAgICAgICAgICAgICAgaW50ZXJydXB0LXBhcmVudCA9IDwmUElDPjsKKyAgICAg ICAgICAgICAgICAgICAgICAgIHBoeS1oYW5kbGUgPSA8JnBoeTE+OworICAgICAgICAgICAg ICAgIH07CisKKworCQlzZXJpYWwwOiBzZXJpYWxAMTIwMDAgeworCQkJY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MDAwIHsKKwkJCWNvbXBhdGlibGUgPSAibXJ2bCxzYXRhIjsKKwkJCXJlZyA9IDwweDgwMDAw IDB4NjAwMD47CisJCQlpbnRlcnJ1cHRzID0gPDIxPjsKKwkJCWludGVycnVwdC1wYXJlbnQg PSA8JlBJQz47CisJCQlncGlvcyA9IDwmR1BJTyAyOSAxIDB4MDAwMzAwMDAgICAvKiBHUElP WzI5XTogIElOX1BPTF9MT1csIElSUSAoZWRnZSkgKi8KKwkJCSAgICAgICAgICZHUElPIDM0 IDIgMHgwMDAwMDAwMD47IC8qIEdQSU9bMzRdOiAgT1VUICovCisJCX07CisKKwkJc2Rpb0A5 MDAwMCB7CisJCQljb21wYXRpYmxlID0gIm1ydmwsc2RpbyI7CisJCQlyZWcgPSA8MHg5MDAw MCAweDEzND47CisJCQlpbnRlcnJ1cHRzID0gPDI4PjsKKwkJCWludGVycnVwdC1wYXJlbnQg PSA8JlBJQz47CisJCQorCQkJZ3Bpb3MgPSA8JkdQSU8gMjkgMSAweDAwMDMwMDAwICAgLyog R1BJT1syOV06ICBJTl9QT0xfTE9XLCBJUlEgKGVkZ2UpICovCisJCQkgICAgICAgICAmR1BJ TyAzNCAyIDB4MDAwMDAwMDA+OyAvKiBHUElPWzM0XTogIE9VVCAqLworCQkKKwkJfTsKKwl9 OworCisJU1JBTTogc3JhbUBmZDAwMDAwMCB7CisJCWNvbXBhdGlibGUgPSAibXJ2bCxjZXNh LXNyYW0iOworCQlyZWcgPSA8MHhmZDAwMDAwMCAweDAwMTAwMDAwPjsKKwl9OworCisJY2hv c2VuIHsKKwkJc3RkaW4gPSAic2VyaWFsMCI7CisJCXN0ZG91dCA9ICJzZXJpYWwwIjsKKwl9 OworCit9OwpJbmRleDogc3lzL2FybS9tdi9raXJrd29vZC9maWxlcy5kcmVhbXBsdWcKPT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PQotLS0gc3lzL2FybS9tdi9ra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bXZzCSNNYXJ2ZWxsIFNhdGEgZHJpdmVyCitkZXZpY2UgICAgICAgICAgYWhj aSAgICAjIEFIQ0ktY29tcGF0aWJsZSBTQVRBIGNvbnRyb2xsZXJzCisKKyMgUGFydGl0aW9u IHN1cHBvcnQKK29wdGlvbnMgCUdFT01fUEFSVF9HUFQKK29wdGlvbnMgCUdFT01fTEFCRUwK K29wdGlvbnMJCUdFT01fRUxJCisKKyMgVUZTCitvcHRpb25zIAlVRlNfQUNMCitvcHRpb25z IAlVRlNfRElSSEFTSAorb3B0aW9ucwkJVUZTX0dKT1VSTkFMIAorb3B0aW9ucyAJU09GVFVQ REFURVMKKworIyBGQVQgc3VwcG9ydAorb3B0aW9ucyAJTVNET1NGUworCisjIE1pc2MgRlNz CitvcHRpb25zIAlQUk9DRlMKK29wdGlvbnMJCUVYVDJGUyAKK2RldmljZQkJbWVtCitvcHRp b25zCQlQU0VVRE9GUyAgICAgICAgI1BzZXVkby1maWxlc3lzdGVtIGZyYW1ld29yayAKK29w dGlvbnMJCUNEOTY2MCAgICAgICAgICAgICNJU08gOTY2MCBmaWxlc3lzdGVtCitvcHRpb25z CQlWRlNfQUlPCitvcHRpb25zCQlDRDk2NjBfSUNPTlYKKworIyBTb3VuZAorZGV2aWNlIAkJ c291bmQKK2RldmljZSAJCXNuZF91YXVkaW8KKworIyBOZXR3b3JraW5nCitkZXZpY2UJCW1n ZQkJCSMgTWFydmVsbCBHaWdhYml0IEV0aGVybmV0IGNvbnRyb2xsZXIKK2RldmljZQkJbWlp CitkZXZpY2UJCW1paWJ1cworZGV2aWNlCQllMTAwMHBoeQorZGV2aWNlCQlicGYKK29wdGlv bnMJCUhaPTEwMDAKK29wdGlvbnMJCURFVklDRV9QT0xMSU5HCisKKyNNaXNjIEV4dHJhIE5l dHdyb2tpbmcKK29wdGlvbnMgICAgICAgICBORVRBVEFMSwkjQXBwbGV0YWxrIGNvbW11bmlj YXRpb25zIHByb3RvY29scworb3B0aW9ucyAgICAgICAgIE5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VRworCisjIE1ST1VUSU5HIGVuYWJsZXMgdGhl IGtlcm5lbCBtdWx0aWNhc3QgcGFja2V0IGZvcndhcmRlciwgd2hpY2ggd29ya3MKKyMgd2l0 aCBtcm91dGVkIGFuZCBYT1JQLgorb3B0aW9ucyAJTVJPVVRJTkcJCSMgTXVsdGljYXN0IHJv dXRpbmcKKworIyBBZGQgbXVsdGlwbGUgcm91dGUgdGFibGUgc3VwcG9ydAorb3B0aW9ucwkJ Uk9VVEVUQUJMRVM9MTYKKworIyBlbGltaW5hdGluZyBkYXRhIGNvcGllcyBvbiBzb2NrZXQg cmVhZHMgYW5kIHdyaXRlcy4KKyMgbWFuIDkgemVyb19jb3B5CitvcHRpb25zCQlaRVJPX0NP UFlfU09DS0VUUworCisjUEYgCitkZXZpY2UgICAgICAgICAgcGYKK2RldmljZSAgICAgICAg ICBwZmxvZworZGV2aWNlICAgICAgICAgIHBmc3luYwpJbmRleDogc3lzL2Rldi9tZ2UvaWZf bWdlLmMKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PQotLS0gc3lzL2Rldi9tZ2UvaWZfbWdlLmMJKHJldmlzaW9u IDIzODAzOCkKKysrIHN5cy9kZXYvbWdlL2lmX21nZS5jCSh3b3JraW5nIGNvcHkpCkBAIC0x NjM1LDkgKzE2MzUsOSBAQAogCQl9CiAKIAkJaWYgKGV0eXBlICE9IEVUSEVSVFlQRV9JUCkg ewotCQkJaWZfcHJpbnRmKHNjLT5pZnAsCisJCQkvKmlmX3ByaW50ZihzYy0+aWZwLAogCQkJ ICAgICJUQ1AvSVAgT2ZmbG9hZCBlbmFibGVkIGZvciB1bnN1cHBvcnRlZCAiCi0JCQkgICAg InByb3RvY29sIVxuIik7CisJCQkgICAgInByb3RvY29sIVxuIik7Ki8KIAkJCXJldHVybjsK IAkJfQogCg== --------------050108080400000103000003-- From owner-freebsd-arm@FreeBSD.ORG Wed Aug 1 21:19:32 2012 Return-Path: Delivered-To: freebsd-arm@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 58B97106566C for ; Wed, 1 Aug 2012 21:19:32 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from mail.allbsd.org (gatekeeper.allbsd.org [IPv6:2001:2f0:104:e001::32]) by mx1.freebsd.org (Postfix) with ESMTP id 4A5908FC15 for ; Wed, 1 Aug 2012 21:19:30 +0000 (UTC) Received: from alph.allbsd.org (p2214-ipbf2707funabasi.chiba.ocn.ne.jp [123.225.119.214]) (authenticated bits=128) by mail.allbsd.org (8.14.5/8.14.5) with ESMTP id q71LJDes022430 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 2 Aug 2012 06:19:23 +0900 (JST) (envelope-from hrs@FreeBSD.org) Received: from localhost (localhost [127.0.0.1]) (authenticated bits=0) by alph.allbsd.org (8.14.5/8.14.5) with ESMTP id q71LJBE7092399 for ; Thu, 2 Aug 2012 06:19:13 +0900 (JST) (envelope-from hrs@FreeBSD.org) Date: Thu, 02 Aug 2012 06:17:26 +0900 (JST) Message-Id: <20120802.061726.2254798913983129673.hrs@allbsd.org> To: freebsd-arm@FreeBSD.org From: Hiroki Sato X-PGPkey-fingerprint: BDB3 443F A5DD B3D0 A530 FFD7 4F2C D3D8 2793 CF2D X-Mailer: Mew version 6.5 on Emacs 23.4 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Multipart/Signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="--Security_Multipart0(Thu_Aug__2_06_17_26_2012_057)--" Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.97.4 at gatekeeper.allbsd.org X-Virus-Status: Clean X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (mail.allbsd.org [133.31.130.32]); Thu, 02 Aug 2012 06:19:23 +0900 (JST) X-Spam-Status: No, score=-95.8 required=13.0 tests=CONTENT_TYPE_PRESENT, FAKEDWORD_VERTICALLINE,FAKEDWORD_ZERO,ONLY1HOPDIRECT,RCVD_IN_RP_RNBL, SAMEHELOBY2HOP,USER_IN_WHITELIST autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on gatekeeper.allbsd.org Cc: Subject: DreamPlug LED X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Aug 2012 21:19:32 -0000 ----Security_Multipart0(Thu_Aug__2_06_17_26_2012_057)-- Content-Type: Multipart/Mixed; boundary="--Next_Part(Thu_Aug__2_06_17_26_2012_279)--" Content-Transfer-Encoding: 7bit ----Next_Part(Thu_Aug__2_06_17_26_2012_279)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi, I created the attached patch to add an LED control driver for DreamPlug. Can someone test it? /dev/led/* will appear and "echo 1 > /dev/led/BT" will turn the LED on. It is for stable/9 but almost applicable to head too. Please build a kernel after adding the following lines into the kernel config file: |include "../mv/kirkwood/std.dreamplug" |makeoptions FDT_DTS_FILE=dreamplug.dts -- Hiroki ----Next_Part(Thu_Aug__2_06_17_26_2012_279)-- Content-Type: Text/X-Patch; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="dreamplug-led-20120801-1.diff" Index: sys/boot/fdt/dts/dreamplug.dts =================================================================== --- sys/boot/fdt/dts/dreamplug.dts (revision 0) +++ sys/boot/fdt/dts/dreamplug.dts (working copy) @@ -0,0 +1,310 @@ +/* + * Copyright (c) 2010 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Semihalf under sponsorship from + * the FreeBSD Foundation. + * + * 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 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 AUTHOR 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. + * + * GlobalScale Technologies DreamPlug Device Tree Source. + * + * $FreeBSD$ + */ + +/dts-v1/; + +/ { + model = "GlobalScale Technologies Dreamplug"; + compatible = "globalscale,dreamplug-003-ds2001", "globalscale,dreamplug", "marvell,kirkwood-88f6281", "marvell,kirkwood"; + #address-cells = <1>; + #size-cells = <1>; + + aliases { + ethernet0 = &enet0; + ethernet1 = &enet1; + mpp = &MPP; + serial0 = &serial0; + serial1 = &serial1; + soc = &SOC; + sram = &SRAM; + }; + + cpus { + #address-cells = <1>; + #size-cells = <0>; + + cpu@0 { + device_type = "cpu"; + compatible = "ARM,88FR131"; + reg = <0x0>; + d-cache-line-size = <32>; // 32 bytes + i-cache-line-size = <32>; // 32 bytes + d-cache-size = <0x4000>; // L1, 16K + i-cache-size = <0x4000>; // L1, 16K + timebase-frequency = <0>; + bus-frequency = <0>; + clock-frequency = <0>; + }; + + }; + + memory { + device_type = "memory"; + reg = <0x0 0x20000000>; // 512M at 0x0 + }; + + localbus@f1000000 { + #address-cells = <2>; + #size-cells = <1>; + compatible = "mrvl,lbc"; + + /* This reflects CPU decode windows setup. */ + ranges = <0x0 0x0f 0xf9300000 0x00100000 + 0x1 0x1e 0xfa000000 0x00100000 + 0x2 0x1d 0xfa100000 0x02000000 + 0x3 0x1b 0xfc100000 0x00000400>; + + nor@0,0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "cfi-flash"; + reg = <0x0 0x0 0x00100000>; + bank-width = <2>; + device-width = <1>; + }; + + led@1,0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "led"; + reg = <0x1 0x0 0x00100000>; + }; + + nor@2,0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "cfi-flash"; + reg = <0x2 0x0 0x02000000>; + bank-width = <2>; + device-width = <1>; + }; + }; + + SOC: soc88f6281@f1000000 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "simple-bus"; + ranges = <0x0 0xf1000000 0x00100000>; + bus-frequency = <0>; + + PIC: pic@20200 { + interrupt-controller; + #address-cells = <0>; + #interrupt-cells = <1>; + reg = <0x20200 0x3c>; + compatible = "mrvl,pic"; + }; + + timer@20300 { + compatible = "mrvl,timer"; + reg = <0x20300 0x30>; + interrupts = <1>; + interrupt-parent = <&PIC>; + mrvl,has-wdt; + }; + + MPP: mpp@10000 { + #pin-cells = <2>; + compatible = "mrvl,mpp"; + reg = <0x10000 0x34>; + pin-count = <50>; + pin-map = < + 0 2 /* MPP[0]: SPI_SCn */ + 1 2 /* MPP[1]: SPI_MOSI */ + 2 2 /* MPP[2]: SPI_SCK */ + 3 2 /* MPP[3]: SPI_MISO */ + 6 1 /* MPP[6]: SYSRST_OUTn */ + 8 2 /* MPP[8]: UA0_RTS */ + 9 2 /* MPP[9]: UA0_CTS */ + 10 3 /* MPP[10]: UA0_TXD */ + 11 3 /* MPP[11]: UA0_RXD */ + 12 1 /* MPP[12]: SD_CLK */ + 13 1 /* MPP[13]: SD_CMD */ + 14 1 /* MPP[14]: SD_D[0] */ + 15 1 /* MPP[17]: SD_D[1] */ + 21 5 /* MPP[21]: SATA0_AC */ + 23 5 /* MPP[23]: SATA0_PR */ + 28 0 /* MPP[28]: GPIO[28] */ + 29 1 /* MPP[29]: TSMP[9] */ + 37 4 /* MPP[37]: AU_SPDIFO */ + 38 4 /* MPP[38]: AU_SPDOFRMCLK */ + 39 4 /* MPP[39]: AU_I2SBCLK */ + 40 4 /* MPP[40]: AU_I2SDO */ + 41 4 /* MPP[41]: AU_I2SLRCLK */ + 42 4 /* MPP[42]: AU_I2SMCLK */ + 43 4 /* MPP[43]: AU_I2SDI */ + 44 4 /* MPP[44]: AU_EXTCLK */ + 47 0 /* MPP[47]: GPIO[47] BT LED */ + 48 0 /* MPP[48]: GPIO[48] WLAN LED */ + 49 0>; /* MPP[49]: GPIO[49] WLAN AP */ + }; + + GPIO: gpio@10100 { + #gpio-cells = <3>; + compatible = "mrvl,gpio"; + reg = <0x10100 0x20>; + gpio-controller; + interrupts = <35 36 37 38 39 40 41>; + interrupt-parent = <&PIC>; + pin-count = <50>; + }; + + gpioled@0 { + compatible = "mrvl,gpioled"; + + gpios = <&GPIO 47 2 0 /* GPIO[47] BT LED: OUT */ + &GPIO 48 2 0 /* GPIO[48] WLAN LED: OUT */ + &GPIO 49 2 0>; /* GPIO[49] WLAN AP LED: OUT */ + }; + + rtc@10300 { + compatible = "mrvl,rtc"; + reg = <0x10300 0x08>; + }; + + twsi@11000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "mrvl,twsi"; + reg = <0x11000 0x20>; + interrupts = <43>; + interrupt-parent = <&PIC>; + }; + + enet0: ethernet@72000 { + #address-cells = <1>; + #size-cells = <1>; + model = "V2"; + compatible = "mrvl,ge"; + reg = <0x72000 0x2000>; + ranges = <0x0 0x72000 0x2000>; + local-mac-address = [ 00 00 00 00 00 00 ]; + interrupts = <12 13 14 11 46>; + interrupt-parent = <&PIC>; + phy-handle = <&phy0>; + + mdio@0 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "mrvl,mdio"; + + phy0: ethernet-phy@0 { + reg = <0x0>; + }; + + phy1: ethernet-phy@1 { + reg = <0x1>; + }; + }; + }; + + enet1: ethernet@76000 { + #address-cells = <1>; + #size-cells = <1>; + model = "V2"; + compatible = "mrvl,ge"; + reg = <0x76000 0x02000>; + ranges = <0x0 0x76000 0x2000>; + local-mac-address = [ 00 00 00 00 00 00 ]; + interrupts = <16 17 18 15 47>; + interrupt-parent = <&PIC>; + phy-handle = <&phy1>; + }; + + serial0: serial@12000 { + compatible = "ns16550"; + reg = <0x12000 0x20>; + reg-shift = <2>; + clock-frequency = <0>; + interrupts = <33>; + interrupt-parent = <&PIC>; + }; + + serial1: serial@12100 { + compatible = "ns16550"; + reg = <0x12100 0x20>; + reg-shift = <2>; + clock-frequency = <0>; + interrupts = <34>; + interrupt-parent = <&PIC>; + }; + + crypto@30000 { + compatible = "mrvl,cesa"; + reg = <0x30000 0x10000>; + interrupts = <22>; + interrupt-parent = <&PIC>; + + sram-handle = <&SRAM>; + }; + + usb@50000 { + compatible = "mrvl,usb-ehci", "usb-ehci"; + reg = <0x50000 0x1000>; + interrupts = <48 19>; + interrupt-parent = <&PIC>; + }; + + xor@60000 { + compatible = "mrvl,xor"; + reg = <0x60000 0x1000>; + interrupts = <5 6 7 8>; + interrupt-parent = <&PIC>; + }; + + sata@80000 { + compatible = "mrvl,sata"; + reg = <0x80000 0x6000>; + interrupts = <21>; + interrupt-parent = <&PIC>; + } + + sdio@90000 { + compatible = "mrvl,sdio"; + reg = <0x90000 0x134>; + interrupts = <28>; + interrupt-parent = <&PIC>; + }; + }; + + SRAM: sram@fd000000 { + compatible = "mrvl,cesa-sram"; + reg = <0xfd000000 0x00100000>; + }; + + chosen { + stdin = "serial0"; + stdout = "serial0"; + }; + +}; Index: sys/arm/mv/mvvar.h =================================================================== --- sys/arm/mv/mvvar.h (revision 238979) +++ sys/arm/mv/mvvar.h (working copy) @@ -45,6 +45,7 @@ #include #include #include +#include #define MV_TYPE_PCI 0 #define MV_TYPE_PCIE 1 @@ -55,6 +56,13 @@ int gc_output; /* GPIO output value */ }; +typedef int (*gpios_phandler_t)(phandle_t, pcell_t *, int); + +struct gpio_ctrl_entry { + const char *compat; + gpios_phandler_t handler; +}; + struct decode_win { int target; /* Mbus unit ID */ int attr; /* Attributes of the target interface */ Index: sys/arm/mv/gpioled.c =================================================================== --- sys/arm/mv/gpioled.c (revision 0) +++ sys/arm/mv/gpioled.c (working copy) @@ -0,0 +1,206 @@ +/*- + * Copyright (c) 2012 Hiroki Sato . + * 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 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 AUTHOR 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. + * + * GPIO-LED bridge driver for Marvell GPIO Controller. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include + +#include + +extern const char *gpioled_devdesc; +extern const char *gpioled_namelist[]; + +extern struct gpio_ctrl_entry gpio_controllers[]; + +struct gpioled_ledlist { + LIST_ENTRY(gpioled_ledlist) list; + + struct cdev *ll_cdev; + const char *ll_name; + int ll_pin; +}; + +struct gpioled_softc { + LIST_HEAD(, gpioled_ledlist) sc_llh; + + device_t sc_dev; +}; + +static MALLOC_DEFINE(M_GPIOLED, "GPIOLED", "GPIO LED driver"); + +static int +led_probe(device_t dev) +{ + + if (!ofw_bus_is_compatible(dev, "mrvl,gpioled")) + return (ENXIO); + + device_set_desc(dev, gpioled_devdesc); + + return (0); +} + +static void +led_onoff(void *args, int onoff) +{ + struct gpioled_ledlist *ll = (struct gpioled_ledlist *)args; + + mv_gpio_out(ll->ll_pin, 0, onoff); +} + +#define MAX_PINS_PER_NODE 5 +#define GPIOS_PROP_CELLS 4 +static int +led_attach(device_t dev) +{ + struct gpioled_softc *sc = device_get_softc(dev); + struct gpio_ctrl_entry *e; + struct gpioled_ledlist *ll = NULL; + phandle_t node, ctrl = 0; + ihandle_t ctrl_ihandle; + pcell_t *g; + pcell_t gpios[MAX_PINS_PER_NODE * GPIOS_PROP_CELLS]; + pcell_t gpio_cells, pincnt; + const char **nl; + int len, tuples, tuple_size; + int i; + + sc->sc_dev = dev; + LIST_INIT(&sc->sc_llh); + + if ((node = ofw_bus_get_node(dev)) == -1) + return (ENXIO); + if ((len = OF_getproplen(node, "gpios")) <= 0) + return (ENXIO); + OF_getprop(node, "gpios", &gpios, len); + + e = (struct gpio_ctrl_entry *)&gpio_controllers; + for (; e->compat; e++) { + ctrl_ihandle = (ihandle_t)gpios[0]; + ctrl_ihandle = fdt32_to_cpu(ctrl_ihandle); + ctrl = OF_instance_to_package(ctrl_ihandle); + if (fdt_is_compatible(ctrl, e->compat)) + break; + } + if (e == NULL) + return (ENXIO); + + if (OF_getprop(ctrl, "#gpio-cells", &gpio_cells, + sizeof(pcell_t)) < 0) + return (ENXIO); + gpio_cells = fdt32_to_cpu(gpio_cells); + if (gpio_cells != 3) + return (ENXIO); + + tuple_size = gpio_cells * sizeof(pcell_t) + sizeof(phandle_t); + tuples = len / tuple_size; + + if (OF_getprop(ctrl, "pin-count", &pincnt, sizeof(pcell_t)) < 0) + return (ENXIO); + pincnt = fdt32_to_cpu(pincnt); + + g = (pcell_t *)&gpios; + nl = gpioled_namelist; + + for (i = 0; i < tuples; i++) { + /* Ignore tuples if it too many than the name list. */ + if (nl[i] == NULL) + break; + + /* Skip controller reference. */ + g += sizeof(ihandle_t) / sizeof(pcell_t); + + /* The direction must be 2 (OUT). */ + if (fdt32_to_cpu(g[1]) != 2) + continue; + + /* Check maximum pin count. */ + if (fdt32_to_cpu(g[0]) > pincnt) + continue; + + ll = malloc(sizeof *ll, M_GPIOLED, M_WAITOK | M_ZERO); + ll->ll_pin = fdt32_to_cpu(g[0]); + ll->ll_name = nl[i]; + ll->ll_cdev = led_create(led_onoff, ll, ll->ll_name); + if (bootverbose) + device_printf(dev, "Add LED device: %s(%d)\n", + ll->ll_name, ll->ll_pin); + LIST_INSERT_HEAD(&sc->sc_llh, ll, list); + + g += gpio_cells; + } + + return (0); +} + +static int +led_detach(device_t dev) +{ + struct gpioled_softc *sc = device_get_softc(dev); + struct gpioled_ledlist *ll; + + while (!LIST_EMPTY(&sc->sc_llh)) { + ll = LIST_FIRST(&sc->sc_llh); + LIST_REMOVE(ll, list); + if (ll->ll_cdev != NULL) + led_destroy(ll->ll_cdev); + free(ll, M_GPIOLED); + } + + return (0); +} + +static device_method_t led_methods[] = { + DEVMETHOD(device_probe, led_probe), + DEVMETHOD(device_attach, led_attach), + DEVMETHOD(device_detach, led_detach), + {0, 0}, +}; + +static driver_t led_driver = { + "gpioled", + led_methods, + sizeof(struct gpioled_softc), +}; + +static devclass_t led_devclass; +DRIVER_MODULE(gpioled, simplebus, led_driver, led_devclass, 0, 0); +MODULE_VERSION(gpioled, 1); Index: sys/arm/mv/kirkwood/dreamplug_led.c =================================================================== --- sys/arm/mv/kirkwood/dreamplug_led.c (revision 0) +++ sys/arm/mv/kirkwood/dreamplug_led.c (working copy) @@ -0,0 +1,36 @@ +/*- + * Copyright (c) 2012 Hiroki Sato . + * 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 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 AUTHOR 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 +__FBSDID("$FreeBSD$"); + +const char *gpioled_namelist[] = { + "BT", /* GPIO[47] */ + "WLAN", /* GPIO[48] */ + "WLANAP", /* GPIO[49] */ + 0, +}; +const char *gpioled_devdesc = "DreamPlug Front Panel LED Driver"; Index: sys/arm/mv/kirkwood/files.dreamplug =================================================================== --- sys/arm/mv/kirkwood/files.dreamplug (revision 0) +++ sys/arm/mv/kirkwood/files.dreamplug (working copy) @@ -0,0 +1,6 @@ +# $FreeBSD: src/sys/arm/mv/kirkwood/files.sheevaplug,v 1.1.4.1 2011/09/23 00:51:37 kensmith Exp $ + +include "arm/mv/kirkwood/files.kirkwood" +arm/mv/kirkwood/sheevaplug.c standard +arm/mv/gpioled.c standard +arm/mv/kirkwood/dreamplug_led.c standard Index: sys/arm/mv/kirkwood/std.dreamplug =================================================================== --- sys/arm/mv/kirkwood/std.dreamplug (revision 0) +++ sys/arm/mv/kirkwood/std.dreamplug (working copy) @@ -0,0 +1,5 @@ +# $FreeBSD: src/sys/arm/mv/kirkwood/std.sheevaplug,v 1.3.2.1 2011/09/23 00:51:37 kensmith Exp $ + +include "../mv/std.mv" +include "../mv/kirkwood/std.kirkwood" +files "../mv/kirkwood/files.dreamplug" Index: sys/dev/ofw/ofw_bus_subr.c =================================================================== --- sys/dev/ofw/ofw_bus_subr.c (revision 238979) +++ sys/dev/ofw/ofw_bus_subr.c (working copy) @@ -167,7 +167,8 @@ onelen = strlen(onecompat); while (len > 0) { - if (strncasecmp(compat, onecompat, onelen) == 0) + if (strlen(compat) == onelen && + strncasecmp(compat, onecompat, onelen) == 0) /* Found it. */ return (1); @@ -183,16 +184,31 @@ ofw_bus_is_compatible_strict(device_t dev, const char *compatible) { const char *compat; + size_t len; if ((compat = ofw_bus_get_compat(dev)) == NULL) return (0); - if (strncasecmp(compat, compatible, strlen(compatible)) == 0) + len = strlen(compatible); + + if (strlen(compat) == len && + strncasecmp(compat, compatible, len) == 0) return (1); return (0); } +int +ofw_bus_has_prop(device_t dev, const char *propname) +{ + phandle_t node; + + if ((node = ofw_bus_get_node(dev)) == -1) + return (0); + + return (OF_hasprop(node, propname)); +} + #ifndef FDT void ofw_bus_setup_iinfo(phandle_t node, struct ofw_bus_iinfo *ii, int intrsz) Index: sys/dev/ofw/ofw_bus_subr.h =================================================================== --- sys/dev/ofw/ofw_bus_subr.h (revision 238979) +++ sys/dev/ofw/ofw_bus_subr.h (working copy) @@ -74,4 +74,7 @@ int ofw_bus_is_compatible(device_t, const char *); int ofw_bus_is_compatible_strict(device_t, const char *); +/* Helper routine for checking exsistence of a prop */ +int ofw_bus_has_prop(device_t, const char *); + #endif /* !_DEV_OFW_OFW_BUS_SUBR_H_ */ Index: sys/dev/ofw/openfirm.c =================================================================== --- sys/dev/ofw/openfirm.c (revision 238979) +++ sys/dev/ofw/openfirm.c (working copy) @@ -261,6 +261,14 @@ return (OFW_GETPROPLEN(ofw_obj, package, propname)); } +/* Check exsistence of a property of a package. */ +int +OF_hasprop(phandle_t package, const char *propname) +{ + + return (OF_getproplen(package, propname) >= 0 ? 1 : 0); +} + /* Get the value of a property of a package. */ ssize_t OF_getprop(phandle_t package, const char *propname, void *buf, size_t buflen) Index: sys/dev/ofw/openfirm.h =================================================================== --- sys/dev/ofw/openfirm.h (revision 238979) +++ sys/dev/ofw/openfirm.h (working copy) @@ -105,6 +105,7 @@ ssize_t OF_getproplen(phandle_t node, const char *propname); ssize_t OF_getprop(phandle_t node, const char *propname, void *buf, size_t len); +int OF_hasprop(phandle_t node, const char *propname); ssize_t OF_searchprop(phandle_t node, const char *propname, void *buf, size_t len); ssize_t OF_getprop_alloc(phandle_t node, const char *propname, ----Next_Part(Thu_Aug__2_06_17_26_2012_279)---- ----Security_Multipart0(Thu_Aug__2_06_17_26_2012_057)-- Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEABECAAYFAlAZnOYACgkQTyzT2CeTzy0B1QCfQrqXKh+3BHSw854XjbH1x5OI ouoAoKwsQfRAePMsTe36KKuy1Y6MzpDk =enZf -----END PGP SIGNATURE----- ----Security_Multipart0(Thu_Aug__2_06_17_26_2012_057)---- From owner-freebsd-arm@FreeBSD.ORG Wed Aug 1 21:46:46 2012 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1A8FD1065670; Wed, 1 Aug 2012 21:46:46 +0000 (UTC) (envelope-from r.neese@gmail.com) Received: from mail-yw0-f54.google.com (mail-yw0-f54.google.com [209.85.213.54]) by mx1.freebsd.org (Postfix) with ESMTP id A5F868FC1C; Wed, 1 Aug 2012 21:46:45 +0000 (UTC) Received: by yhfs35 with SMTP id s35so9187638yhf.13 for ; Wed, 01 Aug 2012 14:46:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=gQT292YRGgucxFSUk4KD5703o+4bQji+j3yn2SR/9jI=; b=RWsIyEUQFBmYVdu545xtgWKdiZBlcJ1Ju/u3SXWd4zhIhqftKDPTofeoJwr1l2KxTl uTb0gGNVcixRR9TzLBlM3N2GKu0Ux0LEB/hjF/EwFANT00u30yZTlZt+kpuatGg5BsMU ZOyUKxF36ZqSZFagLYuXgxkvD1mVlwBBudb+WmorR9eYzfLU3bCcLc0YbH9XpOSkEFtq E6yPNLAynflnvTbPQ+SqjQx99fPHzAjg2GQ2hU5yf2AhVw2ZTAxTJNRMr16cfysGuYJv G3u4wsGElwNgIIYykbaBP39XNx9I9pVM51XRt+saVCjLeeywRbuaiJSjAluMNYsVDx+s s92Q== Received: by 10.236.115.102 with SMTP id d66mr18250068yhh.67.1343857604806; Wed, 01 Aug 2012 14:46:44 -0700 (PDT) Received: from [127.0.0.1] ([97.100.95.108]) by mx.google.com with ESMTPS id i65sm7582239yhb.3.2012.08.01.14.46.43 (version=SSLv3 cipher=OTHER); Wed, 01 Aug 2012 14:46:44 -0700 (PDT) Message-ID: <5019A3C2.8020809@gmail.com> Date: Wed, 01 Aug 2012 17:46:42 -0400 From: Richard E Neese User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20120713 Thunderbird/14.0 MIME-Version: 1.0 To: Hiroki Sato References: <20120802.061726.2254798913983129673.hrs@allbsd.org> In-Reply-To: <20120802.061726.2254798913983129673.hrs@allbsd.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-arm@FreeBSD.org Subject: Re: DreamPlug LED X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Aug 2012 21:46:46 -0000 On 8/1/2012 5:17 PM, Hiroki Sato wrote: > Hi, > > I created the attached patch to add an LED control driver for > DreamPlug. Can someone test it? /dev/led/* will appear and "echo 1 > > /dev/led/BT" will turn the LED on. > > It is for stable/9 but almost applicable to head too. Please build a > kernel after adding the following lines into the kernel config file: > > |include "../mv/kirkwood/std.dreamplug" > |makeoptions FDT_DTS_FILE=dreamplug.dts > > -- Hiroki wich led is this for? wifi bt ? From owner-freebsd-arm@FreeBSD.ORG Wed Aug 1 21:51:33 2012 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7CEDF106566B; Wed, 1 Aug 2012 21:51:33 +0000 (UTC) (envelope-from r.neese@gmail.com) Received: from mail-yw0-f54.google.com (mail-yw0-f54.google.com [209.85.213.54]) by mx1.freebsd.org (Postfix) with ESMTP id 21E668FC08; Wed, 1 Aug 2012 21:51:33 +0000 (UTC) Received: by yhfs35 with SMTP id s35so9192727yhf.13 for ; Wed, 01 Aug 2012 14:51:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=5X68iLg0mkJ+wLkvkrse0EK8q1al/mBwPKG7jcD49iQ=; b=dn42lInLJnanKtksfIjHhj6lXjoo5uop4+wCAliJUittI1iC1d8I6igxBSSsbHg/Mq 9xRsbH+yTuo0gjAsnAcjXM737g9GkSLnSTRO9QSIq4T2BdcT7IxSJogpbPvWNGDXtG7G WYnN4kuUi81stOcnZ13/MTvkgOXiSrd/wAMhngYR2vyeMFv2P/qafYMuPLHldy5j3sG9 hc1+IQXAtKz57XMScMeIab42606h697KQLnYABc6f14qNSNHKjt84W0y25O/2sRzU4Eb +Xeo2NbBYvrR7Mb6B3bUkP6biTtUrnMX1mW3jE2nY+M9enoVqflpCzLmmzyOO2h/uMNd 6nnA== Received: by 10.100.236.39 with SMTP id j39mr5769098anh.35.1343857892674; Wed, 01 Aug 2012 14:51:32 -0700 (PDT) Received: from [127.0.0.1] ([97.100.95.108]) by mx.google.com with ESMTPS id v3sm3945517anm.16.2012.08.01.14.51.31 (version=SSLv3 cipher=OTHER); Wed, 01 Aug 2012 14:51:31 -0700 (PDT) Message-ID: <5019A4E2.6040907@gmail.com> Date: Wed, 01 Aug 2012 17:51:30 -0400 From: Richard E Neese User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20120713 Thunderbird/14.0 MIME-Version: 1.0 To: Hiroki Sato References: <20120802.061726.2254798913983129673.hrs@allbsd.org> In-Reply-To: <20120802.061726.2254798913983129673.hrs@allbsd.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-arm@FreeBSD.org Subject: Re: DreamPlug LED X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Aug 2012 21:51:33 -0000 On 8/1/2012 5:17 PM, Hiroki Sato wrote: > Hi, > > I created the attached patch to add an LED control driver for > DreamPlug. Can someone test it? /dev/led/* will appear and "echo 1 > > /dev/led/BT" will turn the LED on. > > It is for stable/9 but almost applicable to head too. Please build a > kernel after adding the following lines into the kernel config file: > > |include "../mv/kirkwood/std.dreamplug" > |makeoptions FDT_DTS_FILE=dreamplug.dts > > -- Hiroki this will be nice but will have issue son ver 9 and 10 of the plug as the 88w8787 chip is unsupported right now we need to get support into the src for the wifi and the bt chipset From owner-freebsd-arm@FreeBSD.ORG Thu Aug 2 04:42:50 2012 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B881A106564A for ; Thu, 2 Aug 2012 04:42:50 +0000 (UTC) (envelope-from r.neese@gmail.com) Received: from mail-yw0-f54.google.com (mail-yw0-f54.google.com [209.85.213.54]) by mx1.freebsd.org (Postfix) with ESMTP id 715418FC08 for ; Thu, 2 Aug 2012 04:42:50 +0000 (UTC) Received: by yhfs35 with SMTP id s35so9585628yhf.13 for ; Wed, 01 Aug 2012 21:42:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; bh=dgm7XQN3tkYLaQdobSdszp3yAICfKySs7iu5Sqo/GqY=; b=AFQsWsdYHJBCnAh79Qj7mfSeO/kPog7AK78wSqCwOtUo+gJqHhXousS1XEYv46VyXE tMgXNhrjPgCxWb926FGbOv8MziZoiJzJWucKPRzEna1n4oNhdj62ofpH5w9uzV2WRlNY KxWHDx9zCUwi1/R7fkKtftoukJ93IiFE86CAKPMm6I7YpkXD3lE06ecNIHvMCGCiG03A wnhaNaAmQzVy3fpbol+UssJpmvxHXXBIwTpP0JLh7iCJWR38/UjA9kV1kRe5mNvIoiaY qtjS2k78t3NbF/IbXXgFClxGOEKl1RWgxV63EnnulPtkVIEBz2wzqxnACppqEIx9gLhy sV+A== Received: by 10.101.60.16 with SMTP id n16mr5894543ank.16.1343882570006; Wed, 01 Aug 2012 21:42:50 -0700 (PDT) Received: from [127.0.0.1] ([97.100.95.108]) by mx.google.com with ESMTPS id e16sm4718486ani.22.2012.08.01.21.42.49 (version=SSLv3 cipher=OTHER); Wed, 01 Aug 2012 21:42:49 -0700 (PDT) Message-ID: <501A0547.8090209@gmail.com> Date: Thu, 02 Aug 2012 00:42:47 -0400 From: Richard E Neese User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20120713 Thunderbird/14.0 MIME-Version: 1.0 To: freebsd-arm@FreeBSD.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Subject: a full updated diff X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Aug 2012 04:42:50 -0000 i merged hrs@FreeBSD.org and my patches together for dreamplug updates. his added in the led lights I did not have in mine. But this gives 1 full dreamplug update. From owner-freebsd-arm@FreeBSD.ORG Thu Aug 2 12:05:40 2012 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C0AD9106566B for ; Thu, 2 Aug 2012 12:05:40 +0000 (UTC) (envelope-from raj@semihalf.com) Received: from smtp.semihalf.com (smtp.semihalf.com [213.17.239.109]) by mx1.freebsd.org (Postfix) with ESMTP id 5D6A48FC08 for ; Thu, 2 Aug 2012 12:05:40 +0000 (UTC) Received: from localhost (unknown [213.17.239.109]) by smtp.semihalf.com (Postfix) with ESMTP id AF883119C53; Thu, 2 Aug 2012 13:56:25 +0200 (CEST) X-Virus-Scanned: by amavisd-new at semihalf.com Received: from smtp.semihalf.com ([213.17.239.109]) by localhost (smtp.semihalf.com [213.17.239.109]) (amavisd-new, port 10024) with ESMTP id UZtpD1-m1IaP; Thu, 2 Aug 2012 13:56:25 +0200 (CEST) Received: from [10.0.0.22] (cardhu.semihalf.com [213.17.239.108]) by smtp.semihalf.com (Postfix) with ESMTPSA id E4C73119C39; Thu, 2 Aug 2012 13:56:24 +0200 (CEST) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Rafal Jaworowski In-Reply-To: <1343845964.1128.28.camel@revolution.hippie.lan> Date: Thu, 2 Aug 2012 13:56:53 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: <5008728C.5040100@jetcafe.org> <1343845964.1128.28.camel@revolution.hippie.lan> To: Ian Lepore X-Mailer: Apple Mail (2.1084) Cc: freebsd-arm@freebsd.org Subject: Re: Globalscale Dreamplug and 8.3 RELEASE X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Aug 2012 12:05:40 -0000 On 2012-08-01, at 20:32, Ian Lepore wrote: > On Thu, 2012-07-19 at 13:48 -0700, Dave Hayes wrote: >> Hello. :) I'm using FreeBSD 8.3 RELEASE and attempting to get this=20 >> running on my dreamplug. I've successfully gotten it to boot off of a=20= >> usb stick (after many adventures) but I've run into a problem. It = seems=20 >> that mge1 is not found (the 2nd ethernet interface). >>=20 >> I really need this to work, so I did some digging on this list but it=20= >> seems there's a .dts file needed. FreeBSD 8 doesn't use dts files as = far=20 >> as I can tell, though I could be horribly wrong there. >>=20 >> Can anyone point me to some patches which would get the 2nd ethernet=20= >> interface to work? >=20 > I finally found some time yesterday to play around with this (sorry to > take so long to respond). I made some small progress towards getting > the second ethernet interface working, but didn't achieve complete > success. >=20 > The attached patch (for freebsd 8) gets things to the point where the > mge1 device is created at boot time. You can manually configure the > interface and packets will be received, but no packets ever go out. =20= >=20 > I did some driver debugging to the point where I see the outgoing = packet > buffers being handed to the hardware, and then shortly thereafter > TX-done interrupts happen, as if the packet was sent just fine. But > either the bits never hit the wire, or the packets are malformed in = some > way such that other boxes on my network can't see them arrive (using > tcpdump; I don't have any wire-level debugging tools). >=20 > I get the same results with a freshly-sync'd -current, so this isn't > specific to freebsd 8. >=20 > I have a feeling there's some simple little thing I'm overlooking > because I don't know the arm/mv code well. Like the PHY needs to be > powered on or a clock enabled for it or something like that. I don't > think I've got much more time to play with this right now, so I = figured > I should post what I've learned along with the patches that get it = this > far; maybe someone else can make some more progress. Make sure the MPP settings are 100% correct for this board. The second = MGE unit is multiplexed with other peripherals integrated on the chip, = so there might be strange issues occuring if the multiplexed lines are = not correctly configured for use with the Ethernet i/f. Rafal From owner-freebsd-arm@FreeBSD.ORG Thu Aug 2 13:44:27 2012 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D1F74106566B for ; Thu, 2 Aug 2012 13:44:27 +0000 (UTC) (envelope-from freebsd@damnhippie.dyndns.org) Received: from qmta12.emeryville.ca.mail.comcast.net (qmta12.emeryville.ca.mail.comcast.net [76.96.27.227]) by mx1.freebsd.org (Postfix) with ESMTP id B5BDD8FC0A for ; Thu, 2 Aug 2012 13:44:27 +0000 (UTC) Received: from omta21.emeryville.ca.mail.comcast.net ([76.96.30.88]) by qmta12.emeryville.ca.mail.comcast.net with comcast id hpR61j0021u4NiLACpkMWc; Thu, 02 Aug 2012 13:44:21 +0000 Received: from damnhippie.dyndns.org ([24.8.232.202]) by omta21.emeryville.ca.mail.comcast.net with comcast id hpkH1j00T4NgCEG8hpkJXL; Thu, 02 Aug 2012 13:44:18 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id q72DiGaE002966; Thu, 2 Aug 2012 07:44:16 -0600 (MDT) (envelope-from freebsd@damnhippie.dyndns.org) From: Ian Lepore To: Richard E Neese In-Reply-To: <501A0547.8090209@gmail.com> References: <501A0547.8090209@gmail.com> Content-Type: text/plain; charset="us-ascii" Date: Thu, 02 Aug 2012 07:44:15 -0600 Message-ID: <1343915055.1128.35.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: freebsd-arm@freebsd.org Subject: Re: a full updated diff X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Aug 2012 13:44:27 -0000 On Thu, 2012-08-02 at 00:42 -0400, Richard E Neese wrote: > i merged hrs@FreeBSD.org and my patches together for dreamplug updates. > his added in the led lights I did not have in mine. > But this gives 1 full dreamplug update. Where's the diff? -- Ian From owner-freebsd-arm@FreeBSD.ORG Thu Aug 2 14:22:44 2012 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 724251065672 for ; Thu, 2 Aug 2012 14:22:44 +0000 (UTC) (envelope-from freebsd-arm@dino.sk) Received: from mailhost.netlab.sk (mailhost.netlab.sk [84.245.65.10]) by mx1.freebsd.org (Postfix) with ESMTP id EF0A28FC18 for ; Thu, 2 Aug 2012 14:22:43 +0000 (UTC) Received: from zeta.dino.sk (fw1.dino.sk [84.245.95.252]) (AUTH: LOGIN milan, TLS: TLSv1/SSLv3,128bits,AES128-SHA) by mailhost.netlab.sk with ESMTPSA; Wed, 01 Aug 2012 20:51:56 +0200 id 0056F8D7.50197ACC.00001DB9 Date: Wed, 1 Aug 2012 20:51:46 +0200 From: Milan Obuch To: freebsd-arm@freebsd.org Message-ID: <20120801205146.379ed29e@zeta.dino.sk> In-Reply-To: <1343845964.1128.28.camel@revolution.hippie.lan> References: <5008728C.5040100@jetcafe.org> <1343845964.1128.28.camel@revolution.hippie.lan> X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.6; amd64-portbld-freebsd9.0) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAGFBMVEX+/v7++v6YOTrq8PCcuIX989UvOSj++v0BNCbpAAAAB3RJTUUHsQwfFzs7RBhzUQAAAhJJREFUOI1dU8GOqzAMNKIoV1bvwD1i0ysqrHplIdBrVSX7ATSbd03VVvn9tQNtQy0hjAdn7LED4AAcPtWm9RV+MPSfxhBLx9ajd6X/ngB6/mTwnRSZua7i7Ca+0ctZKo4Qmz+JY13X6I3nFZBxIYW1PbgfQ5RP8g0XlltEWGf3cV03joYpRnFbvYDKbXjZlXyyhEZA4lI+cN3NaVXE4VKjSwTExO10eTEkkJVqIAD5z0nUBQJluQDRSQjcrBiHAJxZlAH5CUMBMC7OcJ4LMQNnxhZ1HYPscMc6J4UlWRMNwzOpCcAHKSICd1EDn83abdREIbXsHkD1OinP1aCUCOEVRaa1lMcvywUWdYgk13JQUpYNKmvXQ8Kw5ML9YI5h8SakctBc7E/IYuLhYd/zZIk+1gM1vNweQBvHE0j+oYah3sMqAytQYlZk6+ANaaawJdu3OFzYGMZ3iGpa3qMlq9ZH0VZTgrCtw/ngdYkEIIpSbP1bWQAdFdX9vocBdkH2qVjVmuMu3gI5rjs814EUdrCZgWlPaxZZ3RiLFUtr+ud0PXwp2dnQSNXgePt6AZpBj6UMJ7VQkzN4utVeaSW1Dhn/kblGrKeMvNGnzwX4zuEDarYz1KdPtR60Gul0Gued+515SJXhCsl+Tx/3kY/UDvicPll9mfu50t3tvQ/thZpJYgeuwdSKNJ6tCD98MCgoxLDaPxbwqqwPWaWiAAAAAElFTkSuQmCC X-Face: ak5rwz4-aUa>hPFZlcg,bXxn.(TN}e9DGFrKU\.i_'B[&5=pAd9o"j)5VSUYW:BRQG#^42Ev$Il|; Ztn=,C X-Operating-System: FreeBSD/amd64 8.2-STABLE Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: Globalscale Dreamplug and 8.3 RELEASE X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Aug 2012 14:22:44 -0000 On Wed, 01 Aug 2012 12:32:44 -0600 Ian Lepore wrote: > On Thu, 2012-07-19 at 13:48 -0700, Dave Hayes wrote: > > Hello. :) I'm using FreeBSD 8.3 RELEASE and attempting to get this > > running on my dreamplug. I've successfully gotten it to boot off of > > a usb stick (after many adventures) but I've run into a problem. It > > seems that mge1 is not found (the 2nd ethernet interface). > > > > I really need this to work, so I did some digging on this list but > > it seems there's a .dts file needed. FreeBSD 8 doesn't use dts > > files as far as I can tell, though I could be horribly wrong there. > > > > Can anyone point me to some patches which would get the 2nd > > ethernet interface to work? > > I finally found some time yesterday to play around with this (sorry to > take so long to respond). I made some small progress towards getting > the second ethernet interface working, but didn't achieve complete > success. > > The attached patch (for freebsd 8) gets things to the point where the > mge1 device is created at boot time. You can manually configure the > interface and packets will be received, but no packets ever go out. > > I did some driver debugging to the point where I see the outgoing > packet buffers being handed to the hardware, and then shortly > thereafter TX-done interrupts happen, as if the packet was sent just > fine. But either the bits never hit the wire, or the packets are > malformed in some way such that other boxes on my network can't see > them arrive (using tcpdump; I don't have any wire-level debugging > tools). > Did you properly set multiplexed pin functions? I did not play with 8.3 on my GuruPlug Server, which should be similar enough. Look in archives for message from me with subject 'Re: Guruplug Server Plus working to some extent... [mge1 problem SOLVED]' dated Wed, 27 Oct 2010 22:59:34 +0200. It contains some 9.0-CURRENT of that time patches, most probably MPP settings need to be changed a bit in your case too. > I get the same results with a freshly-sync'd -current, so this isn't > specific to freebsd 8. > > I have a feeling there's some simple little thing I'm overlooking > because I don't know the arm/mv code well. Like the PHY needs to be > powered on or a clock enabled for it or something like that. I don't > think I've got much more time to play with this right now, so I > figured I should post what I've learned along with the patches that > get it this far; maybe someone else can make some more progress. > > -- Ian > I hope you can find how to set MPP functions and mge1 will work for you. Regards, Milan N. B. This mail is somehow delayed, but nevertheless, hopefully you can find something in older post mentioned in it. From owner-freebsd-arm@FreeBSD.ORG Thu Aug 2 16:08:37 2012 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 34616106566C for ; Thu, 2 Aug 2012 16:08:37 +0000 (UTC) (envelope-from r.neese@gmail.com) Received: from mail-yx0-f182.google.com (mail-yx0-f182.google.com [209.85.213.182]) by mx1.freebsd.org (Postfix) with ESMTP id DE4DF8FC17 for ; Thu, 2 Aug 2012 16:08:36 +0000 (UTC) Received: by yenl8 with SMTP id l8so10469736yen.13 for ; Thu, 02 Aug 2012 09:08:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=D0AeT+YJ44dDL6K9qgOu5EROOJxaWA8BgLQgB6rPPig=; b=HD1BhcY3SiXU0avX3xqeiEa/AxoJAd4A+zH5m5X8SeLg0pxF5Yz0M5fMGZXX9Fso5K 9ug7JnJnD8lcLLTCKXUono4DBOdQzzZe08g0zmdVDjS1So6+Fy5YgSaXfGvRCx/yMSm0 JJWl4y893v7g7iS3AY4XZdd9YWW4YPVdZHbEiuEaZNBbVTEnCGJPD8WOSpzX4qGSOzf2 lgGNjRAq6+DLzPCdU1NyvHPEJ3Edt+E+5FYYVOjQOLHMyYJD501iZNmMdHg4bINZKJwo s5v1MPO+pI3LnrAvrFpJk2TMBiB5bXEV+50/Qx453GmB3rds7fPrbgIEYvnwpfhshrNx mH5A== Received: by 10.236.175.132 with SMTP id z4mr10092923yhl.60.1343923715635; Thu, 02 Aug 2012 09:08:35 -0700 (PDT) Received: from [127.0.0.1] ([97.100.95.108]) by mx.google.com with ESMTPS id n20sm3608942ani.18.2012.08.02.09.08.34 (version=SSLv3 cipher=OTHER); Thu, 02 Aug 2012 09:08:35 -0700 (PDT) Message-ID: <501AA601.5050609@gmail.com> Date: Thu, 02 Aug 2012 12:08:33 -0400 From: Richard E Neese User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20120713 Thunderbird/14.0 MIME-Version: 1.0 To: Milan Obuch References: <5008728C.5040100@jetcafe.org> <1343845964.1128.28.camel@revolution.hippie.lan> <20120801205146.379ed29e@zeta.dino.sk> In-Reply-To: <20120801205146.379ed29e@zeta.dino.sk> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-arm@freebsd.org Subject: Re: Globalscale Dreamplug and 8.3 RELEASE X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Aug 2012 16:08:37 -0000 On 8/1/2012 2:51 PM, Milan Obuch wrote: > On Wed, 01 Aug 2012 12:32:44 -0600 > Ian Lepore wrote: > >> On Thu, 2012-07-19 at 13:48 -0700, Dave Hayes wrote: >>> Hello. :) I'm using FreeBSD 8.3 RELEASE and attempting to get this >>> running on my dreamplug. I've successfully gotten it to boot off of >>> a usb stick (after many adventures) but I've run into a problem. It >>> seems that mge1 is not found (the 2nd ethernet interface). >>> >>> I really need this to work, so I did some digging on this list but >>> it seems there's a .dts file needed. FreeBSD 8 doesn't use dts >>> files as far as I can tell, though I could be horribly wrong there. >>> >>> Can anyone point me to some patches which would get the 2nd >>> ethernet interface to work? >> I finally found some time yesterday to play around with this (sorry to >> take so long to respond). I made some small progress towards getting >> the second ethernet interface working, but didn't achieve complete >> success. >> >> The attached patch (for freebsd 8) gets things to the point where the >> mge1 device is created at boot time. You can manually configure the >> interface and packets will be received, but no packets ever go out. >> >> I did some driver debugging to the point where I see the outgoing >> packet buffers being handed to the hardware, and then shortly >> thereafter TX-done interrupts happen, as if the packet was sent just >> fine. But either the bits never hit the wire, or the packets are >> malformed in some way such that other boxes on my network can't see >> them arrive (using tcpdump; I don't have any wire-level debugging >> tools). >> > Did you properly set multiplexed pin functions? I did not play with 8.3 > on my GuruPlug Server, which should be similar enough. Look in archives > for message from me with subject 'Re: Guruplug Server Plus working to > some extent... [mge1 problem SOLVED]' dated Wed, 27 Oct 2010 22:59:34 > +0200. It contains some 9.0-CURRENT of that time patches, most probably > MPP settings need to be changed a bit in your case too. > >> I get the same results with a freshly-sync'd -current, so this isn't >> specific to freebsd 8. >> >> I have a feeling there's some simple little thing I'm overlooking >> because I don't know the arm/mv code well. Like the PHY needs to be >> powered on or a clock enabled for it or something like that. I don't >> think I've got much more time to play with this right now, so I >> figured I should post what I've learned along with the patches that >> get it this far; maybe someone else can make some more progress. >> >> -- Ian >> > I hope you can find how to set MPP functions and mge1 will work for you. > > Regards, > Milan > > N. B. This mail is somehow delayed, but nevertheless, hopefully you can > find something in older post mentioned in it. > _______________________________________________ > freebsd-arm@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-arm > To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org" we are working on all aspects of the dreamplug. but our main goal is 9.x and 10 where both nices work fine. what ver of the dream plug do you have 8 9 or 10? to find out look on the back of the device where the mac/seriel number are. Off to the right there iss 2 rows of 4 numbers 0801 is a v8 0901 is a v9 1001is a v10 . as of right now the v10 is the one I am working with and the wifi and bt are not supported as there are no drivers for the 88w8787 chip in bsd yet. From owner-freebsd-arm@FreeBSD.ORG Thu Aug 2 16:12:52 2012 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8146B106564A for ; Thu, 2 Aug 2012 16:12:52 +0000 (UTC) (envelope-from r.neese@gmail.com) Received: from mail-gh0-f182.google.com (mail-gh0-f182.google.com [209.85.160.182]) by mx1.freebsd.org (Postfix) with ESMTP id 31BF98FC17 for ; Thu, 2 Aug 2012 16:12:51 +0000 (UTC) Received: by ghbz22 with SMTP id z22so10391276ghb.13 for ; Thu, 02 Aug 2012 09:12:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type; bh=zHa9umSgJURIJytREFzw3vk9Ew3wL6nhvELW+VRiJIQ=; b=tfcIV54tAB5CUVYr8N+KTsX+kM15iMUxWlcy/FHvJT8YTH/qsk7DzhAPYCDnU/KHJK TvhdO2+IpvaF0Y7JCHx4+V0dzVZgp9x7vSIrXN+lyu9gfYWMRLUtkEbMhTXaexDM/xXq rkwl1RA0VMiwYO+ZMWa/npLb9X7Ix7d/vNg692LzTOMsTPifhnu+zShehZdpC6vmISJ+ wIW4kYS/b15M2Gy7nJSZQx35IDomFNZyBO7voPLyPhZIrTr13YghI3SL6+3jnu+g8gFp /2jsB3NFOq6R9IUbZOmI8iR5p10BwcRka2W2H6wG+nvgJlOrldjJn75k5lorJgSW5lBS ph1A== Received: by 10.236.84.108 with SMTP id r72mr21946375yhe.90.1343923971248; Thu, 02 Aug 2012 09:12:51 -0700 (PDT) Received: from [127.0.0.1] ([97.100.95.108]) by mx.google.com with ESMTPS id v8sm11605927yhi.15.2012.08.02.09.12.50 (version=SSLv3 cipher=OTHER); Thu, 02 Aug 2012 09:12:50 -0700 (PDT) Message-ID: <501AA700.9010901@gmail.com> Date: Thu, 02 Aug 2012 12:12:48 -0400 From: Richard E Neese User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20120713 Thunderbird/14.0 MIME-Version: 1.0 To: Ian Lepore References: <501A0547.8090209@gmail.com> <1343915055.1128.35.camel@revolution.hippie.lan> In-Reply-To: <1343915055.1128.35.camel@revolution.hippie.lan> Content-Type: multipart/mixed; boundary="------------090703090309010908070905" Cc: freebsd-arm@freebsd.org Subject: Re: a full updated diff X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Aug 2012 16:12:52 -0000 This is a multi-part message in MIME format. --------------090703090309010908070905 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On 8/2/2012 9:44 AM, Ian Lepore wrote: > On Thu, 2012-08-02 at 00:42 -0400, Richard E Neese wrote: >> i merged hrs@FreeBSD.org and my patches together for dreamplug updates. >> his added in the led lights I did not have in mine. >> But this gives 1 full dreamplug update. > Where's the diff? > > -- Ian > > --------------090703090309010908070905 Content-Type: text/plain; charset=windows-1252; name="freebsd-dreamplug-svn-stable-080212.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="freebsd-dreamplug-svn-stable-080212.diff" Index: lib/liblzma/config.h =================================================================== --- lib/liblzma/config.h (revision 238981) +++ lib/liblzma/config.h (working copy) @@ -85,9 +85,9 @@ #define VERSION "5.0.3" #if defined(__FreeBSD__) #include -#if defined(__NO_STRICT_ALIGNMENT) +/*#if defined(__NO_STRICT_ALIGNMENT) #define TUKLIB_FAST_UNALIGNED_ACCESS 1 -#endif +#endif*/ #include #if _BYTE_ORDER == _BIG_ENDIAN # define WORDS_BIGENDIAN 1 Index: etc/rc.d/fsck =================================================================== --- etc/rc.d/fsck (revision 238981) +++ etc/rc.d/fsck (working copy) @@ -27,7 +27,16 @@ if checkyesno background_fsck; then fsck -F -p else - fsck -p + if checkyesno force_fsck; then + echo "Force fsck enabled" + for filesystem in ${force_fsck_list} + do + echo "Force check $filesystem" + fsck -y $filesystem + done + else + fsck -p + fi fi case $? in Index: etc/master.passwd =================================================================== --- etc/master.passwd (revision 238981) +++ etc/master.passwd (working copy) @@ -1,6 +1,6 @@ # $FreeBSD$ # -root::0:0::0:0:Charlie &:/root:/bin/csh +root:$1$pUs8OwQY$mwQTkOTA8hwItKHdP6ECT1:0:0::0:0:Charlie &:/root:/bin/csh toor:*:0:0::0:0:Bourne-again Superuser:/root: daemon:*:1:1::0:0:Owner of many system processes:/root:/usr/sbin/nologin operator:*:2:5::0:0:System &:/:/usr/sbin/nologin Index: sys/boot/fdt/dts/dreamplug.dts =================================================================== --- sys/boot/fdt/dts/dreamplug.dts (revision 0) +++ sys/boot/fdt/dts/dreamplug.dts (working copy) @@ -0,0 +1,310 @@ +/* + * Copyright (c) 2010 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Semihalf under sponsorship from + * the FreeBSD Foundation. + * + * 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 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 AUTHOR 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. + * + * GlobalScale Technologies DreamPlug Device Tree Source. + * + * $FreeBSD$ + */ + +/dts-v1/; + +/ { + model = "GlobalScale Technologies Dreamplug"; + compatible = "globalscale,dreamplug-003-ds2001", "globalscale,dreamplug", "marvell,kirkwood-88f6281", "marvell,kirkwood"; + #address-cells = <1>; + #size-cells = <1>; + + aliases { + ethernet0 = &enet0; + ethernet1 = &enet1; + mpp = &MPP; + serial0 = &serial0; + serial1 = &serial1; + soc = &SOC; + sram = &SRAM; + }; + + cpus { + #address-cells = <1>; + #size-cells = <0>; + + cpu@0 { + device_type = "cpu"; + compatible = "ARM,88FR131"; + reg = <0x0>; + d-cache-line-size = <32>; // 32 bytes + i-cache-line-size = <32>; // 32 bytes + d-cache-size = <0x4000>; // L1, 16K + i-cache-size = <0x4000>; // L1, 16K + timebase-frequency = <0>; + bus-frequency = <0>; + clock-frequency = <0>; + }; + + }; + + memory { + device_type = "memory"; + reg = <0x0 0x20000000>; // 512M at 0x0 + }; + + localbus@f1000000 { + #address-cells = <2>; + #size-cells = <1>; + compatible = "mrvl,lbc"; + + /* This reflects CPU decode windows setup. */ + ranges = <0x0 0x0f 0xf9300000 0x00100000 + 0x1 0x1e 0xfa000000 0x00100000 + 0x2 0x1d 0xfa100000 0x02000000 + 0x3 0x1b 0xfc100000 0x00000400>; + + nor@0,0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "cfi-flash"; + reg = <0x0 0x0 0x00100000>; + bank-width = <2>; + device-width = <1>; + }; + + led@1,0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "led"; + reg = <0x1 0x0 0x00100000>; + }; + + nor@2,0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "cfi-flash"; + reg = <0x2 0x0 0x02000000>; + bank-width = <2>; + device-width = <1>; + }; + }; + + SOC: soc88f6281@f1000000 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "simple-bus"; + ranges = <0x0 0xf1000000 0x00100000>; + bus-frequency = <0>; + + PIC: pic@20200 { + interrupt-controller; + #address-cells = <0>; + #interrupt-cells = <1>; + reg = <0x20200 0x3c>; + compatible = "mrvl,pic"; + }; + + timer@20300 { + compatible = "mrvl,timer"; + reg = <0x20300 0x30>; + interrupts = <1>; + interrupt-parent = <&PIC>; + mrvl,has-wdt; + }; + + MPP: mpp@10000 { + #pin-cells = <2>; + compatible = "mrvl,mpp"; + reg = <0x10000 0x34>; + pin-count = <50>; + pin-map = < + 0 2 /* MPP[0]: SPI_SCn */ + 1 2 /* MPP[1]: SPI_MOSI */ + 2 2 /* MPP[2]: SPI_SCK */ + 3 2 /* MPP[3]: SPI_MISO */ + 6 1 /* MPP[6]: SYSRST_OUTn */ + 8 2 /* MPP[8]: UA0_RTS */ + 9 2 /* MPP[9]: UA0_CTS */ + 10 3 /* MPP[10]: UA0_TXD */ + 11 3 /* MPP[11]: UA0_RXD */ + 12 1 /* MPP[12]: SD_CLK */ + 13 1 /* MPP[13]: SD_CMD */ + 14 1 /* MPP[14]: SD_D[0] */ + 15 1 /* MPP[17]: SD_D[1] */ + 21 5 /* MPP[21]: SATA0_AC */ + 23 5 /* MPP[23]: SATA0_PR */ + 28 0 /* MPP[28]: GPIO[28] */ + 29 1 /* MPP[29]: TSMP[9] */ + 37 4 /* MPP[37]: AU_SPDIFO */ + 38 4 /* MPP[38]: AU_SPDOFRMCLK */ + 39 4 /* MPP[39]: AU_I2SBCLK */ + 40 4 /* MPP[40]: AU_I2SDO */ + 41 4 /* MPP[41]: AU_I2SLRCLK */ + 42 4 /* MPP[42]: AU_I2SMCLK */ + 43 4 /* MPP[43]: AU_I2SDI */ + 44 4 /* MPP[44]: AU_EXTCLK */ + 47 0 /* MPP[47]: GPIO[47] BT LED */ + 48 0 /* MPP[48]: GPIO[48] WLAN LED */ + 49 0>; /* MPP[49]: GPIO[49] WLAN AP */ + }; + + GPIO: gpio@10100 { + #gpio-cells = <3>; + compatible = "mrvl,gpio"; + reg = <0x10100 0x20>; + gpio-controller; + interrupts = <35 36 37 38 39 40 41>; + interrupt-parent = <&PIC>; + pin-count = <50>; + }; + + gpioled@0 { + compatible = "mrvl,gpioled"; + + gpios = <&GPIO 47 2 0 /* GPIO[47] BT LED: OUT */ + &GPIO 48 2 0 /* GPIO[48] WLAN LED: OUT */ + &GPIO 49 2 0>; /* GPIO[49] WLAN AP LED: OUT */ + }; + + rtc@10300 { + compatible = "mrvl,rtc"; + reg = <0x10300 0x08>; + }; + + twsi@11000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "mrvl,twsi"; + reg = <0x11000 0x20>; + interrupts = <43>; + interrupt-parent = <&PIC>; + }; + + enet0: ethernet@72000 { + #address-cells = <1>; + #size-cells = <1>; + model = "V2"; + compatible = "mrvl,ge"; + reg = <0x72000 0x2000>; + ranges = <0x0 0x72000 0x2000>; + local-mac-address = [ 00 00 00 00 00 00 ]; + interrupts = <12 13 14 11 46>; + interrupt-parent = <&PIC>; + phy-handle = <&phy0>; + + mdio@0 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "mrvl,mdio"; + + phy0: ethernet-phy@0 { + reg = <0x0>; + }; + + phy1: ethernet-phy@1 { + reg = <0x1>; + }; + }; + }; + + enet1: ethernet@76000 { + #address-cells = <1>; + #size-cells = <1>; + model = "V2"; + compatible = "mrvl,ge"; + reg = <0x76000 0x02000>; + ranges = <0x0 0x76000 0x2000>; + local-mac-address = [ 00 00 00 00 00 00 ]; + interrupts = <16 17 18 15 47>; + interrupt-parent = <&PIC>; + phy-handle = <&phy1>; + }; + + serial0: serial@12000 { + compatible = "ns16550"; + reg = <0x12000 0x20>; + reg-shift = <2>; + clock-frequency = <0>; + interrupts = <33>; + interrupt-parent = <&PIC>; + }; + + serial1: serial@12100 { + compatible = "ns16550"; + reg = <0x12100 0x20>; + reg-shift = <2>; + clock-frequency = <0>; + interrupts = <34>; + interrupt-parent = <&PIC>; + }; + + crypto@30000 { + compatible = "mrvl,cesa"; + reg = <0x30000 0x10000>; + interrupts = <22>; + interrupt-parent = <&PIC>; + + sram-handle = <&SRAM>; + }; + + usb@50000 { + compatible = "mrvl,usb-ehci", "usb-ehci"; + reg = <0x50000 0x1000>; + interrupts = <48 19>; + interrupt-parent = <&PIC>; + }; + + xor@60000 { + compatible = "mrvl,xor"; + reg = <0x60000 0x1000>; + interrupts = <5 6 7 8>; + interrupt-parent = <&PIC>; + }; + + sata@80000 { + compatible = "mrvl,sata"; + reg = <0x80000 0x6000>; + interrupts = <21>; + interrupt-parent = <&PIC>; + } + + sdio@90000 { + compatible = "mrvl,sdio"; + reg = <0x90000 0x134>; + interrupts = <28>; + interrupt-parent = <&PIC>; + }; + }; + + SRAM: sram@fd000000 { + compatible = "mrvl,cesa-sram"; + reg = <0xfd000000 0x00100000>; + }; + + chosen { + stdin = "serial0"; + stdout = "serial0"; + }; + +}; Index: sys/arm/mv/kirkwood/files.dreamplug =================================================================== --- sys/arm/mv/kirkwood/files.dreamplug (revision 0) +++ sys/arm/mv/kirkwood/files.dreamplug (working copy) @@ -0,0 +1,10 @@ +# $FreeBSD:$ + +include "arm/mv/kirkwood/files.kirkwood" +arm/mv/kirkwood/dreamplug.c standard +# $FreeBSD: src/sys/arm/mv/kirkwood/files.sheevaplug,v 1.1.4.1 2011/09/23 00:51:37 kensmith Exp $ + +include "arm/mv/kirkwood/files.kirkwood" +arm/mv/kirkwood/sheevaplug.c standard +arm/mv/gpioled.c standard +arm/mv/kirkwood/dreamplug_led.c standard Index: sys/arm/mv/kirkwood/dreamplug_led.c =================================================================== --- sys/arm/mv/kirkwood/dreamplug_led.c (revision 0) +++ sys/arm/mv/kirkwood/dreamplug_led.c (working copy) @@ -0,0 +1,36 @@ +/*- + * Copyright (c) 2012 Hiroki Sato . + * 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 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 AUTHOR 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 +__FBSDID("$FreeBSD$"); + +const char *gpioled_namelist[] = { + "BT", /* GPIO[47] */ + "WLAN", /* GPIO[48] */ + "WLANAP", /* GPIO[49] */ + 0, +}; +const char *gpioled_devdesc = "DreamPlug Front Panel LED Driver"; Index: sys/arm/mv/kirkwood/dreamplug.c =================================================================== --- sys/arm/mv/kirkwood/dreamplug.c (revision 0) +++ sys/arm/mv/kirkwood/dreamplug.c (working copy) @@ -0,0 +1,44 @@ +/*- + * Copyright (c) 2010 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Semihalf under sponsorship from + * the FreeBSD Foundation. + * + * 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 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 AUTHOR 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 +__FBSDID("$FreeBSD:$"); + +#include +#include + +#include + +int +fdt_pci_devmap(phandle_t node, struct pmap_devmap *devmap, vm_offset_t io_va, + vm_offset_t mem_va) +{ + + return (0); +} Index: sys/arm/mv/kirkwood/std.dreamplug =================================================================== --- sys/arm/mv/kirkwood/std.dreamplug (revision 0) +++ sys/arm/mv/kirkwood/std.dreamplug (working copy) @@ -0,0 +1,10 @@ +# $FreeBSD:$ + +include "../mv/std.mv" +include "../mv/kirkwood/std.kirkwood" +files "../mv/kirkwood/files.dreamplug" +# $FreeBSD: src/sys/arm/mv/kirkwood/std.sheevaplug,v 1.3.2.1 2011/09/23 00:51:37 kensmith Exp $ + +include "../mv/std.mv" +include "../mv/kirkwood/std.kirkwood" +files "../mv/kirkwood/files.dreamplug" Index: sys/arm/mv/mvvar.h =================================================================== --- sys/arm/mv/mvvar.h (revision 238981) +++ sys/arm/mv/mvvar.h (working copy) @@ -45,6 +45,7 @@ #include #include #include +#include #define MV_TYPE_PCI 0 #define MV_TYPE_PCIE 1 @@ -55,6 +56,13 @@ int gc_output; /* GPIO output value */ }; +typedef int (*gpios_phandler_t)(phandle_t, pcell_t *, int); + +struct gpio_ctrl_entry { + const char *compat; + gpios_phandler_t handler; +}; + struct decode_win { int target; /* Mbus unit ID */ int attr; /* Attributes of the target interface */ Index: sys/arm/mv/gpioled.c =================================================================== --- sys/arm/mv/gpioled.c (revision 0) +++ sys/arm/mv/gpioled.c (working copy) @@ -0,0 +1,206 @@ +/*- + * Copyright (c) 2012 Hiroki Sato . + * 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 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 AUTHOR 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. + * + * GPIO-LED bridge driver for Marvell GPIO Controller. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include + +#include + +extern const char *gpioled_devdesc; +extern const char *gpioled_namelist[]; + +extern struct gpio_ctrl_entry gpio_controllers[]; + +struct gpioled_ledlist { + LIST_ENTRY(gpioled_ledlist) list; + + struct cdev *ll_cdev; + const char *ll_name; + int ll_pin; +}; + +struct gpioled_softc { + LIST_HEAD(, gpioled_ledlist) sc_llh; + + device_t sc_dev; +}; + +static MALLOC_DEFINE(M_GPIOLED, "GPIOLED", "GPIO LED driver"); + +static int +led_probe(device_t dev) +{ + + if (!ofw_bus_is_compatible(dev, "mrvl,gpioled")) + return (ENXIO); + + device_set_desc(dev, gpioled_devdesc); + + return (0); +} + +static void +led_onoff(void *args, int onoff) +{ + struct gpioled_ledlist *ll = (struct gpioled_ledlist *)args; + + mv_gpio_out(ll->ll_pin, 0, onoff); +} + +#define MAX_PINS_PER_NODE 5 +#define GPIOS_PROP_CELLS 4 +static int +led_attach(device_t dev) +{ + struct gpioled_softc *sc = device_get_softc(dev); + struct gpio_ctrl_entry *e; + struct gpioled_ledlist *ll = NULL; + phandle_t node, ctrl = 0; + ihandle_t ctrl_ihandle; + pcell_t *g; + pcell_t gpios[MAX_PINS_PER_NODE * GPIOS_PROP_CELLS]; + pcell_t gpio_cells, pincnt; + const char **nl; + int len, tuples, tuple_size; + int i; + + sc->sc_dev = dev; + LIST_INIT(&sc->sc_llh); + + if ((node = ofw_bus_get_node(dev)) == -1) + return (ENXIO); + if ((len = OF_getproplen(node, "gpios")) <= 0) + return (ENXIO); + OF_getprop(node, "gpios", &gpios, len); + + e = (struct gpio_ctrl_entry *)&gpio_controllers; + for (; e->compat; e++) { + ctrl_ihandle = (ihandle_t)gpios[0]; + ctrl_ihandle = fdt32_to_cpu(ctrl_ihandle); + ctrl = OF_instance_to_package(ctrl_ihandle); + if (fdt_is_compatible(ctrl, e->compat)) + break; + } + if (e == NULL) + return (ENXIO); + + if (OF_getprop(ctrl, "#gpio-cells", &gpio_cells, + sizeof(pcell_t)) < 0) + return (ENXIO); + gpio_cells = fdt32_to_cpu(gpio_cells); + if (gpio_cells != 3) + return (ENXIO); + + tuple_size = gpio_cells * sizeof(pcell_t) + sizeof(phandle_t); + tuples = len / tuple_size; + + if (OF_getprop(ctrl, "pin-count", &pincnt, sizeof(pcell_t)) < 0) + return (ENXIO); + pincnt = fdt32_to_cpu(pincnt); + + g = (pcell_t *)&gpios; + nl = gpioled_namelist; + + for (i = 0; i < tuples; i++) { + /* Ignore tuples if it too many than the name list. */ + if (nl[i] == NULL) + break; + + /* Skip controller reference. */ + g += sizeof(ihandle_t) / sizeof(pcell_t); + + /* The direction must be 2 (OUT). */ + if (fdt32_to_cpu(g[1]) != 2) + continue; + + /* Check maximum pin count. */ + if (fdt32_to_cpu(g[0]) > pincnt) + continue; + + ll = malloc(sizeof *ll, M_GPIOLED, M_WAITOK | M_ZERO); + ll->ll_pin = fdt32_to_cpu(g[0]); + ll->ll_name = nl[i]; + ll->ll_cdev = led_create(led_onoff, ll, ll->ll_name); + if (bootverbose) + device_printf(dev, "Add LED device: %s(%d)\n", + ll->ll_name, ll->ll_pin); + LIST_INSERT_HEAD(&sc->sc_llh, ll, list); + + g += gpio_cells; + } + + return (0); +} + +static int +led_detach(device_t dev) +{ + struct gpioled_softc *sc = device_get_softc(dev); + struct gpioled_ledlist *ll; + + while (!LIST_EMPTY(&sc->sc_llh)) { + ll = LIST_FIRST(&sc->sc_llh); + LIST_REMOVE(ll, list); + if (ll->ll_cdev != NULL) + led_destroy(ll->ll_cdev); + free(ll, M_GPIOLED); + } + + return (0); +} + +static device_method_t led_methods[] = { + DEVMETHOD(device_probe, led_probe), + DEVMETHOD(device_attach, led_attach), + DEVMETHOD(device_detach, led_detach), + {0, 0}, +}; + +static driver_t led_driver = { + "gpioled", + led_methods, + sizeof(struct gpioled_softc), +}; + +static devclass_t led_devclass; +DRIVER_MODULE(gpioled, simplebus, led_driver, led_devclass, 0, 0); +MODULE_VERSION(gpioled, 1); Index: sys/arm/conf/DREAMPLUG =================================================================== --- sys/arm/conf/DREAMPLUG (revision 0) +++ sys/arm/conf/DREAMPLUG (working copy) @@ -0,0 +1,245 @@ +# +# Custom kernel for Marvell DreamPlug devices. +# +# $FreeBSD:$ +# + +ident DREAMPLUG +include "../mv/kirkwood/std.dreamplug" + +options SOC_MV_KIRKWOOD +makeoptions MODULES_OVERRIDE="" + +#makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols +makeoptions WERROR="-Werror" + +options SCHED_4BSD #4BSD scheduler +options INET #InterNETworking +options INET6 #IPv6 communications protocols +options FFS #Berkeley Fast Filesystem +options MD_ROOT # MD is a potential root device +options NFSCL #New Network Filesystem Client +options NFSLOCKD #Network Lock Manager +options NFS_ROOT #NFS usable as /, requires NFSCL + +#bootp/dhcp for remote booting +#options BOOTP +#options BOOTP_NFSROOT +#options BOOTP_NFSV3 +#options BOOTP_WIRED_TO=mge0 + +# Root fs on USB device +options ROOTDEVNAME=\"ufs:/dev/da2s2\" + +options SYSVSHM #SYSV-style shared memory +options SYSVMSG #SYSV-style message queues +options SYSVSEM #SYSV-style semaphores +options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions +options MUTEX_NOINLINE +options RWLOCK_NOINLINE +options NO_FFS_SNAPSHOT +options NO_SWAPPING + + +# Debugging +#options ALT_BREAK_TO_DEBUGGER +options BREAK_TO_DEBUGGER +options DDB +#options DEADLKRES #Enable the deadlock resolver +#options DIAGNOSTIC +#options INVARIANTS #Enable calls of extra sanity checking +#options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS +options KDB +#options WITNESS #Enable checks to detect deadlocks and cycles +#options WITNESS_SKIPSPIN #Don't run witness on spinlocks for speed +#options WITNESS_KDB +#options DEBUG + +# Serial ports +device uart + +#ata devices +device ata #base ata driver +options ATA_CAM # Handle legacy controllers with CAM +options ATA_STATIC_ID # Static device numbering + +# SCSI +options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI +device scbus # SCSI bus (required for SCSI) +device da # Direct Access (disks) +device sa +device cd # CD +device pass + +# SATA +device mvs #Marvell Sata driver +device ahci # AHCI-compatible SATA controllers + +# Partition support +options GEOM_PART_GPT +options GEOM_LABEL +options GEOM_ELI + +# UFS +options UFS_ACL +options UFS_DIRHASH +options UFS_GJOURNAL +options SOFTUPDATES + +# FAT support +options MSDOSFS + +# Misc FSs +options PROCFS +options EXT2FS +device mem +options PSEUDOFS #Pseudo-filesystem framework +options CD9660 #ISO 9660 filesystem +options VFS_AIO +options CD9660_ICONV + +# Sound +device sound +device snd_uaudio + +# Networking +device ether +device mge # Marvell Gigabit Ethernet controller +device mii +device miibus +device e1000phy +device bpf +options HZ=1000 +options DEVICE_POLLING +device vlan + +#Misc Extra Netwroking +options NETATALK #Appletalk communications protocols +options NETSMB #SMB/CIFS requester +options SMBFS #SMB/CIFS filesystem +options VFS_AIO + +# Pseudo devices. +device loop # Network loopback +device random # Entropy device +device ether # Ethernet support +device vlan # 802.1Q VLAN support +device tun # Packet tunnel. +device pty # BSD-style compatibility pseudo ttys +device md # Memory "disks" +device gif # IPv6 and IPv4 tunneling +device faith # IPv6-to-IPv4 relaying (translation) +device firmware # firmware assist module + +#crypto +device cesa # Marvell security engine +device crypto +device cryptodev + +#Wireless Networking +device wlan +options IEEE80211_DEBUG # enable debug msgs +options IEEE80211_SUPPORT_MESH # enable 802.11s draft support +device wlan_wep # 802.11 WEP support +device wlan_ccmp # 802.11 CCMP support +device wlan_tkip # 802.11 TKIP support +device wlan_amrr # AMRR transmit rate control algorithm + +# USB DEBUG +#options USB_DEBUG # enable debug msgs +#options USB_REQ_DEBUG + +# USB support +device usb # USB Bus (required) +device ehci # EHCI PCI->USB interface (USB 2.0) +device umass # Disks/Mass storage - Requires scbus and da +device usfs +device uhid +device ums + +#USB WIFI +device rum # Ralink Technology RT2501USB wireless NICs +device uath # Atheros AR5523 wireless NICs +device ural # Ralink Technology RT2500USB wireless NICs +device zyd # ZyDAS zb1211/zb1211b wireless NICs +device urtw # Realtek RTL8187B/L USB +device upgt # Conexant/Intersil PrismGT SoftMAC USB + +# USB Serial devices +device u3g # USB-based 3G modems (Option, Huawei, Sierra) +#options U3G_DEBUG + +#USB Over Ethernet +device cdce # Generic USB over Ethernet + +# MMC/SD (Currently not supported) +#device mv_sdio +#device mmc +#device mmcsd +#device sdhci + +#BLUETOOTH + +# I2C (TWSI) +device iic +device iicbus +device icee + +options LIBICONV +options LIBMCHAIN + +# Flattened Device Tree +options FDT +options FDT_DTB_STATIC +makeoptions FDT_DTS_FILE=dreamplug.dts + +#FireWall +device if_bridge + +# Encapsulating Interface +device enc + +# IPSec +options IPSEC +options IPSEC_NAT_T +options TCP_SIGNATURE #include support for RFC 2385 + +# IPFW support +options IPFIREWALL +options IPFIREWALL_DEFAULT_TO_ACCEPT +options IPFIREWALL_FORWARD +options IPFIREWALL_VERBOSE +options IPFIREWALL_VERBOSE_LIMIT=100 +options DUMMYNET +options IPDIVERT + +# altq(9). Enable the base part of the hooks with the ALTQ option. +# Individual disciplines must be built into the base system and can not be +# loaded as modules at this point. ALTQ requires a stable TSC so if yours is +# broken or changes with CPU throttling then you must also have the ALTQ_NOPCC +# option. +options ALTQ +options ALTQ_CBQ # Class Based Queueing +options ALTQ_RED # Random Early Detection +options ALTQ_RIO # RED In/Out +options ALTQ_HFSC # Hierarchical Packet Scheduler +options ALTQ_CDNR # Traffic conditioner +options ALTQ_PRIQ # Priority Queueing +options ALTQ_NOPCC # Required if the TSC is unusable +#options ALTQ_DEBUG + +# MROUTING enables the kernel multicast packet forwarder, which works +# with mrouted and XORP. +options MROUTING # Multicast routing + +# Add multiple route table support +options ROUTETABLES=16 + +# eliminating data copies on socket reads and writes. +# man 9 zero_copy +options ZERO_COPY_SOCKETS + +#PF +device pf +device pflog +device pfsync Index: sys/dev/ofw/ofw_bus_subr.c =================================================================== --- sys/dev/ofw/ofw_bus_subr.c (revision 238981) +++ sys/dev/ofw/ofw_bus_subr.c (working copy) @@ -167,7 +167,8 @@ onelen = strlen(onecompat); while (len > 0) { - if (strncasecmp(compat, onecompat, onelen) == 0) + if (strlen(compat) == onelen && + strncasecmp(compat, onecompat, onelen) == 0) /* Found it. */ return (1); @@ -183,16 +184,31 @@ ofw_bus_is_compatible_strict(device_t dev, const char *compatible) { const char *compat; + size_t len; if ((compat = ofw_bus_get_compat(dev)) == NULL) return (0); - if (strncasecmp(compat, compatible, strlen(compatible)) == 0) + len = strlen(compatible); + + if (strlen(compat) == len && + strncasecmp(compat, compatible, len) == 0) return (1); return (0); } +int +ofw_bus_has_prop(device_t dev, const char *propname) +{ + phandle_t node; + + if ((node = ofw_bus_get_node(dev)) == -1) + return (0); + + return (OF_hasprop(node, propname)); +} + #ifndef FDT void ofw_bus_setup_iinfo(phandle_t node, struct ofw_bus_iinfo *ii, int intrsz) Index: sys/dev/ofw/ofw_bus_subr.h =================================================================== --- sys/dev/ofw/ofw_bus_subr.h (revision 238981) +++ sys/dev/ofw/ofw_bus_subr.h (working copy) @@ -74,4 +74,7 @@ int ofw_bus_is_compatible(device_t, const char *); int ofw_bus_is_compatible_strict(device_t, const char *); +/* Helper routine for checking exsistence of a prop */ +int ofw_bus_has_prop(device_t, const char *); + #endif /* !_DEV_OFW_OFW_BUS_SUBR_H_ */ Index: sys/dev/ofw/openfirm.c =================================================================== --- sys/dev/ofw/openfirm.c (revision 238981) +++ sys/dev/ofw/openfirm.c (working copy) @@ -261,6 +261,14 @@ return (OFW_GETPROPLEN(ofw_obj, package, propname)); } +/* Check exsistence of a property of a package. */ +int +OF_hasprop(phandle_t package, const char *propname) +{ + + return (OF_getproplen(package, propname) >= 0 ? 1 : 0); +} + /* Get the value of a property of a package. */ ssize_t OF_getprop(phandle_t package, const char *propname, void *buf, size_t buflen) Index: sys/dev/ofw/openfirm.h =================================================================== --- sys/dev/ofw/openfirm.h (revision 238981) +++ sys/dev/ofw/openfirm.h (working copy) @@ -105,6 +105,7 @@ ssize_t OF_getproplen(phandle_t node, const char *propname); ssize_t OF_getprop(phandle_t node, const char *propname, void *buf, size_t len); +int OF_hasprop(phandle_t node, const char *propname); ssize_t OF_searchprop(phandle_t node, const char *propname, void *buf, size_t len); ssize_t OF_getprop_alloc(phandle_t node, const char *propname, --------------090703090309010908070905-- From owner-freebsd-arm@FreeBSD.ORG Thu Aug 2 16:15:13 2012 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 46165106567D for ; Thu, 2 Aug 2012 16:15:13 +0000 (UTC) (envelope-from r.neese@gmail.com) Received: from mail-yx0-f182.google.com (mail-yx0-f182.google.com [209.85.213.182]) by mx1.freebsd.org (Postfix) with ESMTP id F16B88FC0C for ; Thu, 2 Aug 2012 16:15:12 +0000 (UTC) Received: by yenl8 with SMTP id l8so10479294yen.13 for ; Thu, 02 Aug 2012 09:15:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=EiNNz6XCDMNMIJVFGLCHStmfKpzl9xuedChGGPBWMJg=; b=I/9ftwdOk5wDzBVqXS3A8HgttBPHfTxM7lTr0R+CXUy5HLz03a0v4Mj+ziZz9Emp/H OZMShRm30c+UBi0O0rBscaXW7C0q5vj6tQMaOJidRaNa69OwVqKV7iVmHuCknlXbiuYW PGE9vysFGVVI0gn7LQtR/hw2VoOYrn+cx0IQzg8uNGmQs4Z9+WGnD4qSXORagpOV07ly 7da/xolqWp71jAJRrAMLiPTvkxAg26HEp8EsQmLwHbbTLoXe5O/6PLVCIefL5m8dsr3k LnA+oPs+dHX70FZt/mRJPDaopO13Us/CO/v+OMcvDaQ/LdXAgV+vR9PBbeSeK8iaj2gb wjjA== Received: by 10.236.114.231 with SMTP id c67mr21967508yhh.119.1343924111607; Thu, 02 Aug 2012 09:15:11 -0700 (PDT) Received: from [127.0.0.1] ([97.100.95.108]) by mx.google.com with ESMTPS id t20sm5898353anl.19.2012.08.02.09.15.10 (version=SSLv3 cipher=OTHER); Thu, 02 Aug 2012 09:15:11 -0700 (PDT) Message-ID: <501AA78D.5040507@gmail.com> Date: Thu, 02 Aug 2012 12:15:09 -0400 From: Richard E Neese User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20120713 Thunderbird/14.0 MIME-Version: 1.0 To: Ian Lepore References: <501A0547.8090209@gmail.com> <1343915055.1128.35.camel@revolution.hippie.lan> In-Reply-To: <1343915055.1128.35.camel@revolution.hippie.lan> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-arm@freebsd.org Subject: Re: a full updated diff X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Aug 2012 16:15:13 -0000 On 8/2/2012 9:44 AM, Ian Lepore wrote: > On Thu, 2012-08-02 at 00:42 -0400, Richard E Neese wrote: >> i merged hrs@FreeBSD.org and my patches together for dreamplug updates. >> his added in the led lights I did not have in mine. >> But this gives 1 full dreamplug update. > Where's the diff? > > -- Ian > > I have to redo it the full kernel is not there From owner-freebsd-arm@FreeBSD.ORG Thu Aug 2 16:18:35 2012 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C1657106566B for ; Thu, 2 Aug 2012 16:18:35 +0000 (UTC) (envelope-from r.neese@gmail.com) Received: from mail-gh0-f182.google.com (mail-gh0-f182.google.com [209.85.160.182]) by mx1.freebsd.org (Postfix) with ESMTP id 70D1E8FC0C for ; Thu, 2 Aug 2012 16:18:35 +0000 (UTC) Received: by ghbz22 with SMTP id z22so10399781ghb.13 for ; Thu, 02 Aug 2012 09:18:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type; bh=B0jDPmr+4dex8gpUhHWBwJFTwt4FXIupdrVhiLK1Voo=; b=jiHob3aClfeCaSnmZeDU5KetNpfUSmJ2HU7e7coTJ/+MPQgcUyHfqLMAMwIERwuXY3 UNa9jsyrZ4d5jrQx6UlxGfIEHTzis/8svHVsR04DafxcMENvY1plzHNaNDw7kzQR2EKx IfJDREkwHHujHn+r3DHEjnJCaCM80TPY3m78JhWuwUX33XJeTryqdyEWjycK/IR5nD/l frgmnc27rcyeEg859zIwuZCYgFys6EutxuCsZ2cxCaIgn3DunEdODjUztwtyLzKnn4Rs M2Tj4wzk2nKqEy+7YDw4XIGH47DaOAXf3SZ1G6NFwJEonfDrrffnxm2fuHx1hpUT3Erg IyZg== Received: by 10.236.145.40 with SMTP id o28mr21882460yhj.70.1343924314820; Thu, 02 Aug 2012 09:18:34 -0700 (PDT) Received: from [127.0.0.1] ([97.100.95.108]) by mx.google.com with ESMTPS id i65sm11645503yhb.3.2012.08.02.09.18.33 (version=SSLv3 cipher=OTHER); Thu, 02 Aug 2012 09:18:34 -0700 (PDT) Message-ID: <501AA858.40809@gmail.com> Date: Thu, 02 Aug 2012 12:18:32 -0400 From: Richard E Neese User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20120713 Thunderbird/14.0 MIME-Version: 1.0 To: Ian Lepore References: <501A0547.8090209@gmail.com> <1343915055.1128.35.camel@revolution.hippie.lan> In-Reply-To: <1343915055.1128.35.camel@revolution.hippie.lan> Content-Type: multipart/mixed; boundary="------------060101060701090000020101" Cc: freebsd-arm@freebsd.org Subject: Re: a full updated diff X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Aug 2012 16:18:35 -0000 This is a multi-part message in MIME format. --------------060101060701090000020101 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit On 8/2/2012 9:44 AM, Ian Lepore wrote: > On Thu, 2012-08-02 at 00:42 -0400, Richard E Neese wrote: >> i merged hrs@FreeBSD.org and my patches together for dreamplug updates. >> his added in the led lights I did not have in mine. >> But this gives 1 full dreamplug update. > Where's the diff? > > -- Ian > > here is the full diff --------------060101060701090000020101 Content-Type: text/plain; charset=windows-1252; name="freebsd-dreamplug-svn-stable-080212.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="freebsd-dreamplug-svn-stable-080212.diff" Index: lib/liblzma/config.h =================================================================== --- lib/liblzma/config.h (revision 238981) +++ lib/liblzma/config.h (working copy) @@ -85,9 +85,9 @@ #define VERSION "5.0.3" #if defined(__FreeBSD__) #include -#if defined(__NO_STRICT_ALIGNMENT) +/*#if defined(__NO_STRICT_ALIGNMENT) #define TUKLIB_FAST_UNALIGNED_ACCESS 1 -#endif +#endif*/ #include #if _BYTE_ORDER == _BIG_ENDIAN # define WORDS_BIGENDIAN 1 Index: etc/rc.d/fsck =================================================================== --- etc/rc.d/fsck (revision 238981) +++ etc/rc.d/fsck (working copy) @@ -27,7 +27,16 @@ if checkyesno background_fsck; then fsck -F -p else - fsck -p + if checkyesno force_fsck; then + echo "Force fsck enabled" + for filesystem in ${force_fsck_list} + do + echo "Force check $filesystem" + fsck -y $filesystem + done + else + fsck -p + fi fi case $? in Index: etc/master.passwd =================================================================== --- etc/master.passwd (revision 238981) +++ etc/master.passwd (working copy) @@ -1,6 +1,6 @@ # $FreeBSD$ # -root::0:0::0:0:Charlie &:/root:/bin/csh +root:$1$pUs8OwQY$mwQTkOTA8hwItKHdP6ECT1:0:0::0:0:Charlie &:/root:/bin/csh toor:*:0:0::0:0:Bourne-again Superuser:/root: daemon:*:1:1::0:0:Owner of many system processes:/root:/usr/sbin/nologin operator:*:2:5::0:0:System &:/:/usr/sbin/nologin Index: sys/boot/fdt/dts/dreamplug.dts =================================================================== --- sys/boot/fdt/dts/dreamplug.dts (revision 0) +++ sys/boot/fdt/dts/dreamplug.dts (working copy) @@ -0,0 +1,310 @@ +/* + * Copyright (c) 2010 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Semihalf under sponsorship from + * the FreeBSD Foundation. + * + * 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 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 AUTHOR 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. + * + * GlobalScale Technologies DreamPlug Device Tree Source. + * + * $FreeBSD$ + */ + +/dts-v1/; + +/ { + model = "GlobalScale Technologies Dreamplug"; + compatible = "globalscale,dreamplug-003-ds2001", "globalscale,dreamplug", "marvell,kirkwood-88f6281", "marvell,kirkwood"; + #address-cells = <1>; + #size-cells = <1>; + + aliases { + ethernet0 = &enet0; + ethernet1 = &enet1; + mpp = &MPP; + serial0 = &serial0; + serial1 = &serial1; + soc = &SOC; + sram = &SRAM; + }; + + cpus { + #address-cells = <1>; + #size-cells = <0>; + + cpu@0 { + device_type = "cpu"; + compatible = "ARM,88FR131"; + reg = <0x0>; + d-cache-line-size = <32>; // 32 bytes + i-cache-line-size = <32>; // 32 bytes + d-cache-size = <0x4000>; // L1, 16K + i-cache-size = <0x4000>; // L1, 16K + timebase-frequency = <0>; + bus-frequency = <0>; + clock-frequency = <0>; + }; + + }; + + memory { + device_type = "memory"; + reg = <0x0 0x20000000>; // 512M at 0x0 + }; + + localbus@f1000000 { + #address-cells = <2>; + #size-cells = <1>; + compatible = "mrvl,lbc"; + + /* This reflects CPU decode windows setup. */ + ranges = <0x0 0x0f 0xf9300000 0x00100000 + 0x1 0x1e 0xfa000000 0x00100000 + 0x2 0x1d 0xfa100000 0x02000000 + 0x3 0x1b 0xfc100000 0x00000400>; + + nor@0,0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "cfi-flash"; + reg = <0x0 0x0 0x00100000>; + bank-width = <2>; + device-width = <1>; + }; + + led@1,0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "led"; + reg = <0x1 0x0 0x00100000>; + }; + + nor@2,0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "cfi-flash"; + reg = <0x2 0x0 0x02000000>; + bank-width = <2>; + device-width = <1>; + }; + }; + + SOC: soc88f6281@f1000000 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "simple-bus"; + ranges = <0x0 0xf1000000 0x00100000>; + bus-frequency = <0>; + + PIC: pic@20200 { + interrupt-controller; + #address-cells = <0>; + #interrupt-cells = <1>; + reg = <0x20200 0x3c>; + compatible = "mrvl,pic"; + }; + + timer@20300 { + compatible = "mrvl,timer"; + reg = <0x20300 0x30>; + interrupts = <1>; + interrupt-parent = <&PIC>; + mrvl,has-wdt; + }; + + MPP: mpp@10000 { + #pin-cells = <2>; + compatible = "mrvl,mpp"; + reg = <0x10000 0x34>; + pin-count = <50>; + pin-map = < + 0 2 /* MPP[0]: SPI_SCn */ + 1 2 /* MPP[1]: SPI_MOSI */ + 2 2 /* MPP[2]: SPI_SCK */ + 3 2 /* MPP[3]: SPI_MISO */ + 6 1 /* MPP[6]: SYSRST_OUTn */ + 8 2 /* MPP[8]: UA0_RTS */ + 9 2 /* MPP[9]: UA0_CTS */ + 10 3 /* MPP[10]: UA0_TXD */ + 11 3 /* MPP[11]: UA0_RXD */ + 12 1 /* MPP[12]: SD_CLK */ + 13 1 /* MPP[13]: SD_CMD */ + 14 1 /* MPP[14]: SD_D[0] */ + 15 1 /* MPP[17]: SD_D[1] */ + 21 5 /* MPP[21]: SATA0_AC */ + 23 5 /* MPP[23]: SATA0_PR */ + 28 0 /* MPP[28]: GPIO[28] */ + 29 1 /* MPP[29]: TSMP[9] */ + 37 4 /* MPP[37]: AU_SPDIFO */ + 38 4 /* MPP[38]: AU_SPDOFRMCLK */ + 39 4 /* MPP[39]: AU_I2SBCLK */ + 40 4 /* MPP[40]: AU_I2SDO */ + 41 4 /* MPP[41]: AU_I2SLRCLK */ + 42 4 /* MPP[42]: AU_I2SMCLK */ + 43 4 /* MPP[43]: AU_I2SDI */ + 44 4 /* MPP[44]: AU_EXTCLK */ + 47 0 /* MPP[47]: GPIO[47] BT LED */ + 48 0 /* MPP[48]: GPIO[48] WLAN LED */ + 49 0>; /* MPP[49]: GPIO[49] WLAN AP */ + }; + + GPIO: gpio@10100 { + #gpio-cells = <3>; + compatible = "mrvl,gpio"; + reg = <0x10100 0x20>; + gpio-controller; + interrupts = <35 36 37 38 39 40 41>; + interrupt-parent = <&PIC>; + pin-count = <50>; + }; + + gpioled@0 { + compatible = "mrvl,gpioled"; + + gpios = <&GPIO 47 2 0 /* GPIO[47] BT LED: OUT */ + &GPIO 48 2 0 /* GPIO[48] WLAN LED: OUT */ + &GPIO 49 2 0>; /* GPIO[49] WLAN AP LED: OUT */ + }; + + rtc@10300 { + compatible = "mrvl,rtc"; + reg = <0x10300 0x08>; + }; + + twsi@11000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "mrvl,twsi"; + reg = <0x11000 0x20>; + interrupts = <43>; + interrupt-parent = <&PIC>; + }; + + enet0: ethernet@72000 { + #address-cells = <1>; + #size-cells = <1>; + model = "V2"; + compatible = "mrvl,ge"; + reg = <0x72000 0x2000>; + ranges = <0x0 0x72000 0x2000>; + local-mac-address = [ 00 00 00 00 00 00 ]; + interrupts = <12 13 14 11 46>; + interrupt-parent = <&PIC>; + phy-handle = <&phy0>; + + mdio@0 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "mrvl,mdio"; + + phy0: ethernet-phy@0 { + reg = <0x0>; + }; + + phy1: ethernet-phy@1 { + reg = <0x1>; + }; + }; + }; + + enet1: ethernet@76000 { + #address-cells = <1>; + #size-cells = <1>; + model = "V2"; + compatible = "mrvl,ge"; + reg = <0x76000 0x02000>; + ranges = <0x0 0x76000 0x2000>; + local-mac-address = [ 00 00 00 00 00 00 ]; + interrupts = <16 17 18 15 47>; + interrupt-parent = <&PIC>; + phy-handle = <&phy1>; + }; + + serial0: serial@12000 { + compatible = "ns16550"; + reg = <0x12000 0x20>; + reg-shift = <2>; + clock-frequency = <0>; + interrupts = <33>; + interrupt-parent = <&PIC>; + }; + + serial1: serial@12100 { + compatible = "ns16550"; + reg = <0x12100 0x20>; + reg-shift = <2>; + clock-frequency = <0>; + interrupts = <34>; + interrupt-parent = <&PIC>; + }; + + crypto@30000 { + compatible = "mrvl,cesa"; + reg = <0x30000 0x10000>; + interrupts = <22>; + interrupt-parent = <&PIC>; + + sram-handle = <&SRAM>; + }; + + usb@50000 { + compatible = "mrvl,usb-ehci", "usb-ehci"; + reg = <0x50000 0x1000>; + interrupts = <48 19>; + interrupt-parent = <&PIC>; + }; + + xor@60000 { + compatible = "mrvl,xor"; + reg = <0x60000 0x1000>; + interrupts = <5 6 7 8>; + interrupt-parent = <&PIC>; + }; + + sata@80000 { + compatible = "mrvl,sata"; + reg = <0x80000 0x6000>; + interrupts = <21>; + interrupt-parent = <&PIC>; + } + + sdio@90000 { + compatible = "mrvl,sdio"; + reg = <0x90000 0x134>; + interrupts = <28>; + interrupt-parent = <&PIC>; + }; + }; + + SRAM: sram@fd000000 { + compatible = "mrvl,cesa-sram"; + reg = <0xfd000000 0x00100000>; + }; + + chosen { + stdin = "serial0"; + stdout = "serial0"; + }; + +}; Index: sys/arm/mv/kirkwood/files.dreamplug =================================================================== --- sys/arm/mv/kirkwood/files.dreamplug (revision 0) +++ sys/arm/mv/kirkwood/files.dreamplug (working copy) @@ -0,0 +1,10 @@ +# $FreeBSD:$ + +include "arm/mv/kirkwood/files.kirkwood" +arm/mv/kirkwood/dreamplug.c standard +# $FreeBSD: src/sys/arm/mv/kirkwood/files.sheevaplug,v 1.1.4.1 2011/09/23 00:51:37 kensmith Exp $ + +include "arm/mv/kirkwood/files.kirkwood" +arm/mv/kirkwood/sheevaplug.c standard +arm/mv/gpioled.c standard +arm/mv/kirkwood/dreamplug_led.c standard Index: sys/arm/mv/kirkwood/dreamplug_led.c =================================================================== --- sys/arm/mv/kirkwood/dreamplug_led.c (revision 0) +++ sys/arm/mv/kirkwood/dreamplug_led.c (working copy) @@ -0,0 +1,36 @@ +/*- + * Copyright (c) 2012 Hiroki Sato . + * 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 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 AUTHOR 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 +__FBSDID("$FreeBSD$"); + +const char *gpioled_namelist[] = { + "BT", /* GPIO[47] */ + "WLAN", /* GPIO[48] */ + "WLANAP", /* GPIO[49] */ + 0, +}; +const char *gpioled_devdesc = "DreamPlug Front Panel LED Driver"; Index: sys/arm/mv/kirkwood/dreamplug.c =================================================================== --- sys/arm/mv/kirkwood/dreamplug.c (revision 0) +++ sys/arm/mv/kirkwood/dreamplug.c (working copy) @@ -0,0 +1,44 @@ +/*- + * Copyright (c) 2010 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Semihalf under sponsorship from + * the FreeBSD Foundation. + * + * 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 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 AUTHOR 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 +__FBSDID("$FreeBSD:$"); + +#include +#include + +#include + +int +fdt_pci_devmap(phandle_t node, struct pmap_devmap *devmap, vm_offset_t io_va, + vm_offset_t mem_va) +{ + + return (0); +} Index: sys/arm/mv/kirkwood/std.dreamplug =================================================================== --- sys/arm/mv/kirkwood/std.dreamplug (revision 0) +++ sys/arm/mv/kirkwood/std.dreamplug (working copy) @@ -0,0 +1,10 @@ +# $FreeBSD:$ + +include "../mv/std.mv" +include "../mv/kirkwood/std.kirkwood" +files "../mv/kirkwood/files.dreamplug" +# $FreeBSD: src/sys/arm/mv/kirkwood/std.sheevaplug,v 1.3.2.1 2011/09/23 00:51:37 kensmith Exp $ + +include "../mv/std.mv" +include "../mv/kirkwood/std.kirkwood" +files "../mv/kirkwood/files.dreamplug" Index: sys/arm/mv/mvvar.h =================================================================== --- sys/arm/mv/mvvar.h (revision 238981) +++ sys/arm/mv/mvvar.h (working copy) @@ -45,6 +45,7 @@ #include #include #include +#include #define MV_TYPE_PCI 0 #define MV_TYPE_PCIE 1 @@ -55,6 +56,13 @@ int gc_output; /* GPIO output value */ }; +typedef int (*gpios_phandler_t)(phandle_t, pcell_t *, int); + +struct gpio_ctrl_entry { + const char *compat; + gpios_phandler_t handler; +}; + struct decode_win { int target; /* Mbus unit ID */ int attr; /* Attributes of the target interface */ Index: sys/arm/mv/gpioled.c =================================================================== --- sys/arm/mv/gpioled.c (revision 0) +++ sys/arm/mv/gpioled.c (working copy) @@ -0,0 +1,206 @@ +/*- + * Copyright (c) 2012 Hiroki Sato . + * 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 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 AUTHOR 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. + * + * GPIO-LED bridge driver for Marvell GPIO Controller. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include + +#include + +extern const char *gpioled_devdesc; +extern const char *gpioled_namelist[]; + +extern struct gpio_ctrl_entry gpio_controllers[]; + +struct gpioled_ledlist { + LIST_ENTRY(gpioled_ledlist) list; + + struct cdev *ll_cdev; + const char *ll_name; + int ll_pin; +}; + +struct gpioled_softc { + LIST_HEAD(, gpioled_ledlist) sc_llh; + + device_t sc_dev; +}; + +static MALLOC_DEFINE(M_GPIOLED, "GPIOLED", "GPIO LED driver"); + +static int +led_probe(device_t dev) +{ + + if (!ofw_bus_is_compatible(dev, "mrvl,gpioled")) + return (ENXIO); + + device_set_desc(dev, gpioled_devdesc); + + return (0); +} + +static void +led_onoff(void *args, int onoff) +{ + struct gpioled_ledlist *ll = (struct gpioled_ledlist *)args; + + mv_gpio_out(ll->ll_pin, 0, onoff); +} + +#define MAX_PINS_PER_NODE 5 +#define GPIOS_PROP_CELLS 4 +static int +led_attach(device_t dev) +{ + struct gpioled_softc *sc = device_get_softc(dev); + struct gpio_ctrl_entry *e; + struct gpioled_ledlist *ll = NULL; + phandle_t node, ctrl = 0; + ihandle_t ctrl_ihandle; + pcell_t *g; + pcell_t gpios[MAX_PINS_PER_NODE * GPIOS_PROP_CELLS]; + pcell_t gpio_cells, pincnt; + const char **nl; + int len, tuples, tuple_size; + int i; + + sc->sc_dev = dev; + LIST_INIT(&sc->sc_llh); + + if ((node = ofw_bus_get_node(dev)) == -1) + return (ENXIO); + if ((len = OF_getproplen(node, "gpios")) <= 0) + return (ENXIO); + OF_getprop(node, "gpios", &gpios, len); + + e = (struct gpio_ctrl_entry *)&gpio_controllers; + for (; e->compat; e++) { + ctrl_ihandle = (ihandle_t)gpios[0]; + ctrl_ihandle = fdt32_to_cpu(ctrl_ihandle); + ctrl = OF_instance_to_package(ctrl_ihandle); + if (fdt_is_compatible(ctrl, e->compat)) + break; + } + if (e == NULL) + return (ENXIO); + + if (OF_getprop(ctrl, "#gpio-cells", &gpio_cells, + sizeof(pcell_t)) < 0) + return (ENXIO); + gpio_cells = fdt32_to_cpu(gpio_cells); + if (gpio_cells != 3) + return (ENXIO); + + tuple_size = gpio_cells * sizeof(pcell_t) + sizeof(phandle_t); + tuples = len / tuple_size; + + if (OF_getprop(ctrl, "pin-count", &pincnt, sizeof(pcell_t)) < 0) + return (ENXIO); + pincnt = fdt32_to_cpu(pincnt); + + g = (pcell_t *)&gpios; + nl = gpioled_namelist; + + for (i = 0; i < tuples; i++) { + /* Ignore tuples if it too many than the name list. */ + if (nl[i] == NULL) + break; + + /* Skip controller reference. */ + g += sizeof(ihandle_t) / sizeof(pcell_t); + + /* The direction must be 2 (OUT). */ + if (fdt32_to_cpu(g[1]) != 2) + continue; + + /* Check maximum pin count. */ + if (fdt32_to_cpu(g[0]) > pincnt) + continue; + + ll = malloc(sizeof *ll, M_GPIOLED, M_WAITOK | M_ZERO); + ll->ll_pin = fdt32_to_cpu(g[0]); + ll->ll_name = nl[i]; + ll->ll_cdev = led_create(led_onoff, ll, ll->ll_name); + if (bootverbose) + device_printf(dev, "Add LED device: %s(%d)\n", + ll->ll_name, ll->ll_pin); + LIST_INSERT_HEAD(&sc->sc_llh, ll, list); + + g += gpio_cells; + } + + return (0); +} + +static int +led_detach(device_t dev) +{ + struct gpioled_softc *sc = device_get_softc(dev); + struct gpioled_ledlist *ll; + + while (!LIST_EMPTY(&sc->sc_llh)) { + ll = LIST_FIRST(&sc->sc_llh); + LIST_REMOVE(ll, list); + if (ll->ll_cdev != NULL) + led_destroy(ll->ll_cdev); + free(ll, M_GPIOLED); + } + + return (0); +} + +static device_method_t led_methods[] = { + DEVMETHOD(device_probe, led_probe), + DEVMETHOD(device_attach, led_attach), + DEVMETHOD(device_detach, led_detach), + {0, 0}, +}; + +static driver_t led_driver = { + "gpioled", + led_methods, + sizeof(struct gpioled_softc), +}; + +static devclass_t led_devclass; +DRIVER_MODULE(gpioled, simplebus, led_driver, led_devclass, 0, 0); +MODULE_VERSION(gpioled, 1); Index: sys/arm/conf/DREAMPLUG =================================================================== --- sys/arm/conf/DREAMPLUG (revision 0) +++ sys/arm/conf/DREAMPLUG (working copy) @@ -0,0 +1,245 @@ +# +# Custom kernel for Marvell DreamPlug devices. +# +# $FreeBSD:$ +# + +ident DREAMPLUG +include "../mv/kirkwood/std.dreamplug" + +options SOC_MV_KIRKWOOD +makeoptions MODULES_OVERRIDE="" + +#makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols +makeoptions WERROR="-Werror" + +options SCHED_4BSD #4BSD scheduler +options INET #InterNETworking +options INET6 #IPv6 communications protocols +options FFS #Berkeley Fast Filesystem +options MD_ROOT # MD is a potential root device +options NFSCL #New Network Filesystem Client +options NFSLOCKD #Network Lock Manager +options NFS_ROOT #NFS usable as /, requires NFSCL + +#bootp/dhcp for remote booting +#options BOOTP +#options BOOTP_NFSROOT +#options BOOTP_NFSV3 +#options BOOTP_WIRED_TO=mge0 + +# Root fs on USB device +options ROOTDEVNAME=\"ufs:/dev/da2s2\" + +options SYSVSHM #SYSV-style shared memory +options SYSVMSG #SYSV-style message queues +options SYSVSEM #SYSV-style semaphores +options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions +options MUTEX_NOINLINE +options RWLOCK_NOINLINE +options NO_FFS_SNAPSHOT +options NO_SWAPPING + + +# Debugging +#options ALT_BREAK_TO_DEBUGGER +options BREAK_TO_DEBUGGER +options DDB +#options DEADLKRES #Enable the deadlock resolver +#options DIAGNOSTIC +#options INVARIANTS #Enable calls of extra sanity checking +#options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS +options KDB +#options WITNESS #Enable checks to detect deadlocks and cycles +#options WITNESS_SKIPSPIN #Don't run witness on spinlocks for speed +#options WITNESS_KDB +#options DEBUG + +# Serial ports +device uart + +#ata devices +device ata #base ata driver +options ATA_CAM # Handle legacy controllers with CAM +options ATA_STATIC_ID # Static device numbering + +# SCSI +options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI +device scbus # SCSI bus (required for SCSI) +device da # Direct Access (disks) +device sa +device cd # CD +device pass + +# SATA +device mvs #Marvell Sata driver +device ahci # AHCI-compatible SATA controllers + +# Partition support +options GEOM_PART_GPT +options GEOM_LABEL +options GEOM_ELI + +# UFS +options UFS_ACL +options UFS_DIRHASH +options UFS_GJOURNAL +options SOFTUPDATES + +# FAT support +options MSDOSFS + +# Misc FSs +options PROCFS +options EXT2FS +device mem +options PSEUDOFS #Pseudo-filesystem framework +options CD9660 #ISO 9660 filesystem +options VFS_AIO +options CD9660_ICONV + +# Sound +device sound +device snd_uaudio + +# Networking +device ether +device mge # Marvell Gigabit Ethernet controller +device mii +device miibus +device e1000phy +device bpf +options HZ=1000 +options DEVICE_POLLING +device vlan + +#Misc Extra Netwroking +options NETATALK #Appletalk communications protocols +options NETSMB #SMB/CIFS requester +options SMBFS #SMB/CIFS filesystem +options VFS_AIO + +# Pseudo devices. +device loop # Network loopback +device random # Entropy device +device ether # Ethernet support +device vlan # 802.1Q VLAN support +device tun # Packet tunnel. +device pty # BSD-style compatibility pseudo ttys +device md # Memory "disks" +device gif # IPv6 and IPv4 tunneling +device faith # IPv6-to-IPv4 relaying (translation) +device firmware # firmware assist module + +#crypto +device cesa # Marvell security engine +device crypto +device cryptodev + +#Wireless Networking +device wlan +options IEEE80211_DEBUG # enable debug msgs +options IEEE80211_SUPPORT_MESH # enable 802.11s draft support +device wlan_wep # 802.11 WEP support +device wlan_ccmp # 802.11 CCMP support +device wlan_tkip # 802.11 TKIP support +device wlan_amrr # AMRR transmit rate control algorithm + +# USB DEBUG +#options USB_DEBUG # enable debug msgs +#options USB_REQ_DEBUG + +# USB support +device usb # USB Bus (required) +device ehci # EHCI PCI->USB interface (USB 2.0) +device umass # Disks/Mass storage - Requires scbus and da +device usfs +device uhid +device ums + +#USB WIFI +device rum # Ralink Technology RT2501USB wireless NICs +device uath # Atheros AR5523 wireless NICs +device ural # Ralink Technology RT2500USB wireless NICs +device zyd # ZyDAS zb1211/zb1211b wireless NICs +device urtw # Realtek RTL8187B/L USB +device upgt # Conexant/Intersil PrismGT SoftMAC USB + +# USB Serial devices +device u3g # USB-based 3G modems (Option, Huawei, Sierra) +#options U3G_DEBUG + +#USB Over Ethernet +device cdce # Generic USB over Ethernet + +# MMC/SD (Currently not supported) +#device mv_sdio +#device mmc +#device mmcsd +#device sdhci + +#BLUETOOTH + +# I2C (TWSI) +device iic +device iicbus +device icee + +options LIBICONV +options LIBMCHAIN + +# Flattened Device Tree +options FDT +options FDT_DTB_STATIC +makeoptions FDT_DTS_FILE=dreamplug.dts + +#FireWall +device if_bridge + +# Encapsulating Interface +device enc + +# IPSec +options IPSEC +options IPSEC_NAT_T +options TCP_SIGNATURE #include support for RFC 2385 + +# IPFW support +options IPFIREWALL +options IPFIREWALL_DEFAULT_TO_ACCEPT +options IPFIREWALL_FORWARD +options IPFIREWALL_VERBOSE +options IPFIREWALL_VERBOSE_LIMIT=100 +options DUMMYNET +options IPDIVERT + +# altq(9). Enable the base part of the hooks with the ALTQ option. +# Individual disciplines must be built into the base system and can not be +# loaded as modules at this point. ALTQ requires a stable TSC so if yours is +# broken or changes with CPU throttling then you must also have the ALTQ_NOPCC +# option. +options ALTQ +options ALTQ_CBQ # Class Based Queueing +options ALTQ_RED # Random Early Detection +options ALTQ_RIO # RED In/Out +options ALTQ_HFSC # Hierarchical Packet Scheduler +options ALTQ_CDNR # Traffic conditioner +options ALTQ_PRIQ # Priority Queueing +options ALTQ_NOPCC # Required if the TSC is unusable +#options ALTQ_DEBUG + +# MROUTING enables the kernel multicast packet forwarder, which works +# with mrouted and XORP. +options MROUTING # Multicast routing + +# Add multiple route table support +options ROUTETABLES=16 + +# eliminating data copies on socket reads and writes. +# man 9 zero_copy +options ZERO_COPY_SOCKETS + +#PF +device pf +device pflog +device pfsync Index: sys/dev/ofw/ofw_bus_subr.c =================================================================== --- sys/dev/ofw/ofw_bus_subr.c (revision 238981) +++ sys/dev/ofw/ofw_bus_subr.c (working copy) @@ -167,7 +167,8 @@ onelen = strlen(onecompat); while (len > 0) { - if (strncasecmp(compat, onecompat, onelen) == 0) + if (strlen(compat) == onelen && + strncasecmp(compat, onecompat, onelen) == 0) /* Found it. */ return (1); @@ -183,16 +184,31 @@ ofw_bus_is_compatible_strict(device_t dev, const char *compatible) { const char *compat; + size_t len; if ((compat = ofw_bus_get_compat(dev)) == NULL) return (0); - if (strncasecmp(compat, compatible, strlen(compatible)) == 0) + len = strlen(compatible); + + if (strlen(compat) == len && + strncasecmp(compat, compatible, len) == 0) return (1); return (0); } +int +ofw_bus_has_prop(device_t dev, const char *propname) +{ + phandle_t node; + + if ((node = ofw_bus_get_node(dev)) == -1) + return (0); + + return (OF_hasprop(node, propname)); +} + #ifndef FDT void ofw_bus_setup_iinfo(phandle_t node, struct ofw_bus_iinfo *ii, int intrsz) Index: sys/dev/ofw/ofw_bus_subr.h =================================================================== --- sys/dev/ofw/ofw_bus_subr.h (revision 238981) +++ sys/dev/ofw/ofw_bus_subr.h (working copy) @@ -74,4 +74,7 @@ int ofw_bus_is_compatible(device_t, const char *); int ofw_bus_is_compatible_strict(device_t, const char *); +/* Helper routine for checking exsistence of a prop */ +int ofw_bus_has_prop(device_t, const char *); + #endif /* !_DEV_OFW_OFW_BUS_SUBR_H_ */ Index: sys/dev/ofw/openfirm.c =================================================================== --- sys/dev/ofw/openfirm.c (revision 238981) +++ sys/dev/ofw/openfirm.c (working copy) @@ -261,6 +261,14 @@ return (OFW_GETPROPLEN(ofw_obj, package, propname)); } +/* Check exsistence of a property of a package. */ +int +OF_hasprop(phandle_t package, const char *propname) +{ + + return (OF_getproplen(package, propname) >= 0 ? 1 : 0); +} + /* Get the value of a property of a package. */ ssize_t OF_getprop(phandle_t package, const char *propname, void *buf, size_t buflen) Index: sys/dev/ofw/openfirm.h =================================================================== --- sys/dev/ofw/openfirm.h (revision 238981) +++ sys/dev/ofw/openfirm.h (working copy) @@ -105,6 +105,7 @@ ssize_t OF_getproplen(phandle_t node, const char *propname); ssize_t OF_getprop(phandle_t node, const char *propname, void *buf, size_t len); +int OF_hasprop(phandle_t node, const char *propname); ssize_t OF_searchprop(phandle_t node, const char *propname, void *buf, size_t len); ssize_t OF_getprop_alloc(phandle_t node, const char *propname, --------------060101060701090000020101-- From owner-freebsd-arm@FreeBSD.ORG Thu Aug 2 16:20:33 2012 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5D781106564A for ; Thu, 2 Aug 2012 16:20:33 +0000 (UTC) (envelope-from r.neese@gmail.com) Received: from mail-yx0-f182.google.com (mail-yx0-f182.google.com [209.85.213.182]) by mx1.freebsd.org (Postfix) with ESMTP id 143C98FC12 for ; Thu, 2 Aug 2012 16:20:32 +0000 (UTC) Received: by yenl8 with SMTP id l8so10487272yen.13 for ; Thu, 02 Aug 2012 09:20:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=voPqOx70KUVoim/u9ts4P2W1sWgECPbMmgCYGtH/W/I=; b=nNh8X3LQnyPidvtFfx8/o7Bq1pVpOi7BRFs2ArGsjLVbRCobBj+jG6+MTttwI/8Dfk bXXivD8nbrG0UlSLGTPF5PHHOTjdlHFx6JSuodh+7UAruXBIVQ+qTRVwoWbm1v+Qro7p EzAPgZu7ajTTrnim+uNq6CH2a6j3WFb560O6s1lYD7M99HXMuxWNp5rcZm35H2UGy9aM GBQsQ1Ig3I3l1Z2+uQg86xZG5VTvMGdhk9Uu/htJIUXKvXILVBkuMjNL35I6icOV5/BK 7D/JslWb85CPxYr8Qjux0kfs7bQ6Hb0N9dR7Uo92P7TtFdRA/oUoGHg74omHx53Fq90Q Mgfg== Received: by 10.236.117.168 with SMTP id j28mr21237223yhh.88.1343924432493; Thu, 02 Aug 2012 09:20:32 -0700 (PDT) Received: from [127.0.0.1] ([97.100.95.108]) by mx.google.com with ESMTPS id i3sm5922825anl.0.2012.08.02.09.20.31 (version=SSLv3 cipher=OTHER); Thu, 02 Aug 2012 09:20:32 -0700 (PDT) Message-ID: <501AA8CE.7030900@gmail.com> Date: Thu, 02 Aug 2012 12:20:30 -0400 From: Richard E Neese User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20120713 Thunderbird/14.0 MIME-Version: 1.0 To: Ian Lepore References: <501A0547.8090209@gmail.com> <1343915055.1128.35.camel@revolution.hippie.lan> In-Reply-To: <1343915055.1128.35.camel@revolution.hippie.lan> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-arm@freebsd.org Subject: Re: a full updated diff X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Aug 2012 16:20:33 -0000 On 8/2/2012 9:44 AM, Ian Lepore wrote: > On Thu, 2012-08-02 at 00:42 -0400, Richard E Neese wrote: >> i merged hrs@FreeBSD.org and my patches together for dreamplug updates. >> his added in the led lights I did not have in mine. >> But this gives 1 full dreamplug update. > Where's the diff? > > -- Ian > > edit it and take the password out before commiting to tree the password is dreamplug if you use the full diff From owner-freebsd-arm@FreeBSD.ORG Thu Aug 2 16:45:07 2012 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EA5991065697 for ; Thu, 2 Aug 2012 16:45:06 +0000 (UTC) (envelope-from r.neese@gmail.com) Received: from mail-yx0-f182.google.com (mail-yx0-f182.google.com [209.85.213.182]) by mx1.freebsd.org (Postfix) with ESMTP id 984CF8FC15 for ; Thu, 2 Aug 2012 16:45:06 +0000 (UTC) Received: by yenl8 with SMTP id l8so10523681yen.13 for ; Thu, 02 Aug 2012 09:45:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=h3hCuIVmqCoqR5gxq2UotUyu9id44Ya8hzvhUNWyIwk=; b=OSX0x9m8hsBieaucNAID4+d74mscnbiKaEdpPMdPjd2qCK3+4CBTh5+ubswx7x/CbX KpPs0lp+iTFOCIUhubSiOEARTENMfo2CXaUrw4oqFNXoMss+PGR34fQiq4w5SL6a17ek FvcGaddawP3/NY+BFmzG5FAXMHYEkk7bgNGXTsg1ANRr3vOheSFdsWxOV/2FcnM2b7W1 Vk+jndum+0IZzbyqnPg6m0bTel+aWf8AeXVoMZ6b4dkm/ES3nWnnWJ9Rm6AVDH6GQD/+ RAuJvBLkCTAqQGlSFGqNlmpr0llFoxrwZbjqMwbdIQ44juJMwygtX0O4T1j+N1w7WVJe yc3A== Received: by 10.236.183.168 with SMTP id q28mr21430545yhm.45.1343925905969; Thu, 02 Aug 2012 09:45:05 -0700 (PDT) Received: from [127.0.0.1] ([97.100.95.108]) by mx.google.com with ESMTPS id a4sm11746256yhj.11.2012.08.02.09.45.05 (version=SSLv3 cipher=OTHER); Thu, 02 Aug 2012 09:45:05 -0700 (PDT) Message-ID: <501AAE8F.4020605@gmail.com> Date: Thu, 02 Aug 2012 12:45:03 -0400 From: Richard E Neese User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20120713 Thunderbird/14.0 MIME-Version: 1.0 To: Ian Lepore References: <501A0547.8090209@gmail.com> <1343915055.1128.35.camel@revolution.hippie.lan> In-Reply-To: <1343915055.1128.35.camel@revolution.hippie.lan> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-arm@freebsd.org Subject: Re: a full updated diff X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Aug 2012 16:45:07 -0000 On 8/2/2012 9:44 AM, Ian Lepore wrote: > On Thu, 2012-08-02 at 00:42 -0400, Richard E Neese wrote: >> i merged hrs@FreeBSD.org and my patches together for dreamplug updates. >> his added in the led lights I did not have in mine. >> But this gives 1 full dreamplug update. > Where's the diff? > > -- Ian > new diff in 20 min I found a few typos and douple lines From owner-freebsd-arm@FreeBSD.ORG Thu Aug 2 16:56:53 2012 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E0E57106566C for ; Thu, 2 Aug 2012 16:56:53 +0000 (UTC) (envelope-from r.neese@gmail.com) Received: from mail-gg0-f182.google.com (mail-gg0-f182.google.com [209.85.161.182]) by mx1.freebsd.org (Postfix) with ESMTP id 8A6198FC14 for ; Thu, 2 Aug 2012 16:56:53 +0000 (UTC) Received: by ggnk4 with SMTP id k4so2480930ggn.13 for ; Thu, 02 Aug 2012 09:56:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type; bh=RiYCsKNL0QEjtd7OzJGB+RT9blSmtbdo+A+c2j2QkyI=; b=hAIpA3It3hj+kz7fdCBbQVstA7AWkvTAZpu2IAYZqIoSZwbtJkNr57nvAhJN7EkzzX l+dO25CSqtsV3uz75cZEYqcsl2T+MuG74pTevECHW5bjJOmkd+tnpJz1Y5VdLaxOPLax V1A46TOUbNpE33kUwL02mUrDRaqb+JRxNIsH86iVnbjPV4hjucLXvInXeKChEqUGjHIl oVYGlJ+Ban0s9qAwoFc/dcvdLxEqTsW6qSAWhx+mTaQap2ET9sPZDfWW3Idj6r3DoSrM BTj5YvB2EX4NqjYOpGjUgBDvw7aEKowIqH1iywAmkQAakc0ikzuvcFjR3mlAsZDBghDx q2GQ== Received: by 10.236.143.4 with SMTP id k4mr21955202yhj.111.1343926612774; Thu, 02 Aug 2012 09:56:52 -0700 (PDT) Received: from [127.0.0.1] ([97.100.95.108]) by mx.google.com with ESMTPS id h15sm6008217ank.1.2012.08.02.09.56.51 (version=SSLv3 cipher=OTHER); Thu, 02 Aug 2012 09:56:51 -0700 (PDT) Message-ID: <501AB152.8010707@gmail.com> Date: Thu, 02 Aug 2012 12:56:50 -0400 From: Richard E Neese User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20120713 Thunderbird/14.0 MIME-Version: 1.0 To: Ian Lepore References: <501A0547.8090209@gmail.com> <1343915055.1128.35.camel@revolution.hippie.lan> In-Reply-To: <1343915055.1128.35.camel@revolution.hippie.lan> Content-Type: multipart/mixed; boundary="------------050907040200060709020602" Cc: freebsd-arm@freebsd.org Subject: Re: a full updated diff X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Aug 2012 16:56:54 -0000 This is a multi-part message in MIME format. --------------050907040200060709020602 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On 8/2/2012 9:44 AM, Ian Lepore wrote: > On Thu, 2012-08-02 at 00:42 -0400, Richard E Neese wrote: >> i merged hrs@FreeBSD.org and my patches together for dreamplug updates. >> his added in the led lights I did not have in mine. >> But this gives 1 full dreamplug update. > Where's the diff? > > -- Ian > > Here is the fixed diff wit the double lines and typo's fixed --------------050907040200060709020602 Content-Type: text/plain; charset=windows-1252; name="dreamplug-svn-stable-080212-1253.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="dreamplug-svn-stable-080212-1253.diff" Index: lib/liblzma/config.h =================================================================== --- lib/liblzma/config.h (revision 238981) +++ lib/liblzma/config.h (working copy) @@ -85,9 +85,9 @@ #define VERSION "5.0.3" #if defined(__FreeBSD__) #include -#if defined(__NO_STRICT_ALIGNMENT) +/*#if defined(__NO_STRICT_ALIGNMENT) #define TUKLIB_FAST_UNALIGNED_ACCESS 1 -#endif +#endif*/ #include #if _BYTE_ORDER == _BIG_ENDIAN # define WORDS_BIGENDIAN 1 Index: etc/rc.d/fsck =================================================================== --- etc/rc.d/fsck (revision 238981) +++ etc/rc.d/fsck (working copy) @@ -27,7 +27,16 @@ if checkyesno background_fsck; then fsck -F -p else - fsck -p + if checkyesno force_fsck; then + echo "Force fsck enabled" + for filesystem in ${force_fsck_list} + do + echo "Force check $filesystem" + fsck -y $filesystem + done + else + fsck -p + fi fi case $? in Index: etc/master.passwd =================================================================== --- etc/master.passwd (revision 238981) +++ etc/master.passwd (working copy) @@ -1,6 +1,6 @@ # $FreeBSD$ # -root::0:0::0:0:Charlie &:/root:/bin/csh +root:$1$pUs8OwQY$mwQTkOTA8hwItKHdP6ECT1:0:0::0:0:Charlie &:/root:/bin/csh toor:*:0:0::0:0:Bourne-again Superuser:/root: daemon:*:1:1::0:0:Owner of many system processes:/root:/usr/sbin/nologin operator:*:2:5::0:0:System &:/:/usr/sbin/nologin Index: sys/boot/fdt/dts/dreamplug.dts =================================================================== --- sys/boot/fdt/dts/dreamplug.dts (revision 0) +++ sys/boot/fdt/dts/dreamplug.dts (working copy) @@ -0,0 +1,310 @@ +/* + * Copyright (c) 2010 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Semihalf under sponsorship from + * the FreeBSD Foundation. + * + * 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 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 AUTHOR 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. + * + * GlobalScale Technologies DreamPlug Device Tree Source. + * + * $FreeBSD$ + */ + +/dts-v1/; + +/ { + model = "GlobalScale Technologies Dreamplug"; + compatible = "globalscale,dreamplug-003-ds2001", "globalscale,dreamplug", "marvell,kirkwood-88f6281", "marvell,kirkwood"; + #address-cells = <1>; + #size-cells = <1>; + + aliases { + ethernet0 = &enet0; + ethernet1 = &enet1; + mpp = &MPP; + serial0 = &serial0; + serial1 = &serial1; + soc = &SOC; + sram = &SRAM; + }; + + cpus { + #address-cells = <1>; + #size-cells = <0>; + + cpu@0 { + device_type = "cpu"; + compatible = "ARM,88FR131"; + reg = <0x0>; + d-cache-line-size = <32>; // 32 bytes + i-cache-line-size = <32>; // 32 bytes + d-cache-size = <0x4000>; // L1, 16K + i-cache-size = <0x4000>; // L1, 16K + timebase-frequency = <0>; + bus-frequency = <0>; + clock-frequency = <0>; + }; + + }; + + memory { + device_type = "memory"; + reg = <0x0 0x20000000>; // 512M at 0x0 + }; + + localbus@f1000000 { + #address-cells = <2>; + #size-cells = <1>; + compatible = "mrvl,lbc"; + + /* This reflects CPU decode windows setup. */ + ranges = <0x0 0x0f 0xf9300000 0x00100000 + 0x1 0x1e 0xfa000000 0x00100000 + 0x2 0x1d 0xfa100000 0x02000000 + 0x3 0x1b 0xfc100000 0x00000400>; + + nor@0,0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "cfi-flash"; + reg = <0x0 0x0 0x00100000>; + bank-width = <2>; + device-width = <1>; + }; + + led@1,0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "led"; + reg = <0x1 0x0 0x00100000>; + }; + + nor@2,0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "cfi-flash"; + reg = <0x2 0x0 0x02000000>; + bank-width = <2>; + device-width = <1>; + }; + }; + + SOC: soc88f6281@f1000000 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "simple-bus"; + ranges = <0x0 0xf1000000 0x00100000>; + bus-frequency = <0>; + + PIC: pic@20200 { + interrupt-controller; + #address-cells = <0>; + #interrupt-cells = <1>; + reg = <0x20200 0x3c>; + compatible = "mrvl,pic"; + }; + + timer@20300 { + compatible = "mrvl,timer"; + reg = <0x20300 0x30>; + interrupts = <1>; + interrupt-parent = <&PIC>; + mrvl,has-wdt; + }; + + MPP: mpp@10000 { + #pin-cells = <2>; + compatible = "mrvl,mpp"; + reg = <0x10000 0x34>; + pin-count = <50>; + pin-map = < + 0 2 /* MPP[0]: SPI_SCn */ + 1 2 /* MPP[1]: SPI_MOSI */ + 2 2 /* MPP[2]: SPI_SCK */ + 3 2 /* MPP[3]: SPI_MISO */ + 6 1 /* MPP[6]: SYSRST_OUTn */ + 8 2 /* MPP[8]: UA0_RTS */ + 9 2 /* MPP[9]: UA0_CTS */ + 10 3 /* MPP[10]: UA0_TXD */ + 11 3 /* MPP[11]: UA0_RXD */ + 12 1 /* MPP[12]: SD_CLK */ + 13 1 /* MPP[13]: SD_CMD */ + 14 1 /* MPP[14]: SD_D[0] */ + 15 1 /* MPP[17]: SD_D[1] */ + 21 5 /* MPP[21]: SATA0_AC */ + 23 5 /* MPP[23]: SATA0_PR */ + 28 0 /* MPP[28]: GPIO[28] */ + 29 1 /* MPP[29]: TSMP[9] */ + 37 4 /* MPP[37]: AU_SPDIFO */ + 38 4 /* MPP[38]: AU_SPDOFRMCLK */ + 39 4 /* MPP[39]: AU_I2SBCLK */ + 40 4 /* MPP[40]: AU_I2SDO */ + 41 4 /* MPP[41]: AU_I2SLRCLK */ + 42 4 /* MPP[42]: AU_I2SMCLK */ + 43 4 /* MPP[43]: AU_I2SDI */ + 44 4 /* MPP[44]: AU_EXTCLK */ + 47 0 /* MPP[47]: GPIO[47] BT LED */ + 48 0 /* MPP[48]: GPIO[48] WLAN LED */ + 49 0>; /* MPP[49]: GPIO[49] WLAN AP */ + }; + + GPIO: gpio@10100 { + #gpio-cells = <3>; + compatible = "mrvl,gpio"; + reg = <0x10100 0x20>; + gpio-controller; + interrupts = <35 36 37 38 39 40 41>; + interrupt-parent = <&PIC>; + pin-count = <50>; + }; + + gpioled@0 { + compatible = "mrvl,gpioled"; + + gpios = <&GPIO 47 2 0 /* GPIO[47] BT LED: OUT */ + &GPIO 48 2 0 /* GPIO[48] WLAN LED: OUT */ + &GPIO 49 2 0>; /* GPIO[49] WLAN AP LED: OUT */ + }; + + rtc@10300 { + compatible = "mrvl,rtc"; + reg = <0x10300 0x08>; + }; + + twsi@11000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "mrvl,twsi"; + reg = <0x11000 0x20>; + interrupts = <43>; + interrupt-parent = <&PIC>; + }; + + enet0: ethernet@72000 { + #address-cells = <1>; + #size-cells = <1>; + model = "V2"; + compatible = "mrvl,ge"; + reg = <0x72000 0x2000>; + ranges = <0x0 0x72000 0x2000>; + local-mac-address = [ 00 00 00 00 00 00 ]; + interrupts = <12 13 14 11 46>; + interrupt-parent = <&PIC>; + phy-handle = <&phy0>; + + mdio@0 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "mrvl,mdio"; + + phy0: ethernet-phy@0 { + reg = <0x0>; + }; + + phy1: ethernet-phy@1 { + reg = <0x1>; + }; + }; + }; + + enet1: ethernet@76000 { + #address-cells = <1>; + #size-cells = <1>; + model = "V2"; + compatible = "mrvl,ge"; + reg = <0x76000 0x02000>; + ranges = <0x0 0x76000 0x2000>; + local-mac-address = [ 00 00 00 00 00 00 ]; + interrupts = <16 17 18 15 47>; + interrupt-parent = <&PIC>; + phy-handle = <&phy1>; + }; + + serial0: serial@12000 { + compatible = "ns16550"; + reg = <0x12000 0x20>; + reg-shift = <2>; + clock-frequency = <0>; + interrupts = <33>; + interrupt-parent = <&PIC>; + }; + + serial1: serial@12100 { + compatible = "ns16550"; + reg = <0x12100 0x20>; + reg-shift = <2>; + clock-frequency = <0>; + interrupts = <34>; + interrupt-parent = <&PIC>; + }; + + crypto@30000 { + compatible = "mrvl,cesa"; + reg = <0x30000 0x10000>; + interrupts = <22>; + interrupt-parent = <&PIC>; + + sram-handle = <&SRAM>; + }; + + usb@50000 { + compatible = "mrvl,usb-ehci", "usb-ehci"; + reg = <0x50000 0x1000>; + interrupts = <48 19>; + interrupt-parent = <&PIC>; + }; + + xor@60000 { + compatible = "mrvl,xor"; + reg = <0x60000 0x1000>; + interrupts = <5 6 7 8>; + interrupt-parent = <&PIC>; + }; + + sata@80000 { + compatible = "mrvl,sata"; + reg = <0x80000 0x6000>; + interrupts = <21>; + interrupt-parent = <&PIC>; + } + + sdio@90000 { + compatible = "mrvl,sdio"; + reg = <0x90000 0x134>; + interrupts = <28>; + interrupt-parent = <&PIC>; + }; + }; + + SRAM: sram@fd000000 { + compatible = "mrvl,cesa-sram"; + reg = <0xfd000000 0x00100000>; + }; + + chosen { + stdin = "serial0"; + stdout = "serial0"; + }; + +}; Index: sys/arm/mv/kirkwood/files.dreamplug =================================================================== --- sys/arm/mv/kirkwood/files.dreamplug (revision 0) +++ sys/arm/mv/kirkwood/files.dreamplug (working copy) @@ -0,0 +1,5 @@ +# $FreeBSD:$ + +include "arm/mv/kirkwood/files.kirkwood" +arm/mv/gpioled.c standard +arm/mv/kirkwood/dreamplug_led.c standard Index: sys/arm/mv/kirkwood/dreamplug_led.c =================================================================== --- sys/arm/mv/kirkwood/dreamplug_led.c (revision 0) +++ sys/arm/mv/kirkwood/dreamplug_led.c (working copy) @@ -0,0 +1,36 @@ +/*- + * Copyright (c) 2012 Hiroki Sato . + * 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 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 AUTHOR 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 +__FBSDID("$FreeBSD$"); + +const char *gpioled_namelist[] = { + "BT", /* GPIO[47] */ + "WLAN", /* GPIO[48] */ + "WLANAP", /* GPIO[49] */ + 0, +}; +const char *gpioled_devdesc = "DreamPlug Front Panel LED Driver"; Index: sys/arm/mv/kirkwood/dreamplug.c =================================================================== --- sys/arm/mv/kirkwood/dreamplug.c (revision 0) +++ sys/arm/mv/kirkwood/dreamplug.c (working copy) @@ -0,0 +1,44 @@ +/*- + * Copyright (c) 2010 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Semihalf under sponsorship from + * the FreeBSD Foundation. + * + * 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 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 AUTHOR 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 +__FBSDID("$FreeBSD:$"); + +#include +#include + +#include + +int +fdt_pci_devmap(phandle_t node, struct pmap_devmap *devmap, vm_offset_t io_va, + vm_offset_t mem_va) +{ + + return (0); +} Index: sys/arm/mv/kirkwood/std.dreamplug =================================================================== --- sys/arm/mv/kirkwood/std.dreamplug (revision 0) +++ sys/arm/mv/kirkwood/std.dreamplug (working copy) @@ -0,0 +1,10 @@ +# $FreeBSD:$ + +include "../mv/std.mv" +include "../mv/kirkwood/std.kirkwood" +files "../mv/kirkwood/files.dreamplug" +# $FreeBSD: src/sys/arm/mv/kirkwood/std.sheevaplug,v 1.3.2.1 2011/09/23 00:51:37 kensmith Exp $ + +include "../mv/std.mv" +include "../mv/kirkwood/std.kirkwood" +files "../mv/kirkwood/files.dreamplug" Index: sys/arm/mv/mvvar.h =================================================================== --- sys/arm/mv/mvvar.h (revision 238981) +++ sys/arm/mv/mvvar.h (working copy) @@ -45,6 +45,7 @@ #include #include #include +#include #define MV_TYPE_PCI 0 #define MV_TYPE_PCIE 1 @@ -55,6 +56,13 @@ int gc_output; /* GPIO output value */ }; +typedef int (*gpios_phandler_t)(phandle_t, pcell_t *, int); + +struct gpio_ctrl_entry { + const char *compat; + gpios_phandler_t handler; +}; + struct decode_win { int target; /* Mbus unit ID */ int attr; /* Attributes of the target interface */ Index: sys/arm/mv/gpioled.c =================================================================== --- sys/arm/mv/gpioled.c (revision 0) +++ sys/arm/mv/gpioled.c (working copy) @@ -0,0 +1,206 @@ +/*- + * Copyright (c) 2012 Hiroki Sato . + * 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 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 AUTHOR 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. + * + * GPIO-LED bridge driver for Marvell GPIO Controller. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include + +#include + +extern const char *gpioled_devdesc; +extern const char *gpioled_namelist[]; + +extern struct gpio_ctrl_entry gpio_controllers[]; + +struct gpioled_ledlist { + LIST_ENTRY(gpioled_ledlist) list; + + struct cdev *ll_cdev; + const char *ll_name; + int ll_pin; +}; + +struct gpioled_softc { + LIST_HEAD(, gpioled_ledlist) sc_llh; + + device_t sc_dev; +}; + +static MALLOC_DEFINE(M_GPIOLED, "GPIOLED", "GPIO LED driver"); + +static int +led_probe(device_t dev) +{ + + if (!ofw_bus_is_compatible(dev, "mrvl,gpioled")) + return (ENXIO); + + device_set_desc(dev, gpioled_devdesc); + + return (0); +} + +static void +led_onoff(void *args, int onoff) +{ + struct gpioled_ledlist *ll = (struct gpioled_ledlist *)args; + + mv_gpio_out(ll->ll_pin, 0, onoff); +} + +#define MAX_PINS_PER_NODE 5 +#define GPIOS_PROP_CELLS 4 +static int +led_attach(device_t dev) +{ + struct gpioled_softc *sc = device_get_softc(dev); + struct gpio_ctrl_entry *e; + struct gpioled_ledlist *ll = NULL; + phandle_t node, ctrl = 0; + ihandle_t ctrl_ihandle; + pcell_t *g; + pcell_t gpios[MAX_PINS_PER_NODE * GPIOS_PROP_CELLS]; + pcell_t gpio_cells, pincnt; + const char **nl; + int len, tuples, tuple_size; + int i; + + sc->sc_dev = dev; + LIST_INIT(&sc->sc_llh); + + if ((node = ofw_bus_get_node(dev)) == -1) + return (ENXIO); + if ((len = OF_getproplen(node, "gpios")) <= 0) + return (ENXIO); + OF_getprop(node, "gpios", &gpios, len); + + e = (struct gpio_ctrl_entry *)&gpio_controllers; + for (; e->compat; e++) { + ctrl_ihandle = (ihandle_t)gpios[0]; + ctrl_ihandle = fdt32_to_cpu(ctrl_ihandle); + ctrl = OF_instance_to_package(ctrl_ihandle); + if (fdt_is_compatible(ctrl, e->compat)) + break; + } + if (e == NULL) + return (ENXIO); + + if (OF_getprop(ctrl, "#gpio-cells", &gpio_cells, + sizeof(pcell_t)) < 0) + return (ENXIO); + gpio_cells = fdt32_to_cpu(gpio_cells); + if (gpio_cells != 3) + return (ENXIO); + + tuple_size = gpio_cells * sizeof(pcell_t) + sizeof(phandle_t); + tuples = len / tuple_size; + + if (OF_getprop(ctrl, "pin-count", &pincnt, sizeof(pcell_t)) < 0) + return (ENXIO); + pincnt = fdt32_to_cpu(pincnt); + + g = (pcell_t *)&gpios; + nl = gpioled_namelist; + + for (i = 0; i < tuples; i++) { + /* Ignore tuples if it too many than the name list. */ + if (nl[i] == NULL) + break; + + /* Skip controller reference. */ + g += sizeof(ihandle_t) / sizeof(pcell_t); + + /* The direction must be 2 (OUT). */ + if (fdt32_to_cpu(g[1]) != 2) + continue; + + /* Check maximum pin count. */ + if (fdt32_to_cpu(g[0]) > pincnt) + continue; + + ll = malloc(sizeof *ll, M_GPIOLED, M_WAITOK | M_ZERO); + ll->ll_pin = fdt32_to_cpu(g[0]); + ll->ll_name = nl[i]; + ll->ll_cdev = led_create(led_onoff, ll, ll->ll_name); + if (bootverbose) + device_printf(dev, "Add LED device: %s(%d)\n", + ll->ll_name, ll->ll_pin); + LIST_INSERT_HEAD(&sc->sc_llh, ll, list); + + g += gpio_cells; + } + + return (0); +} + +static int +led_detach(device_t dev) +{ + struct gpioled_softc *sc = device_get_softc(dev); + struct gpioled_ledlist *ll; + + while (!LIST_EMPTY(&sc->sc_llh)) { + ll = LIST_FIRST(&sc->sc_llh); + LIST_REMOVE(ll, list); + if (ll->ll_cdev != NULL) + led_destroy(ll->ll_cdev); + free(ll, M_GPIOLED); + } + + return (0); +} + +static device_method_t led_methods[] = { + DEVMETHOD(device_probe, led_probe), + DEVMETHOD(device_attach, led_attach), + DEVMETHOD(device_detach, led_detach), + {0, 0}, +}; + +static driver_t led_driver = { + "gpioled", + led_methods, + sizeof(struct gpioled_softc), +}; + +static devclass_t led_devclass; +DRIVER_MODULE(gpioled, simplebus, led_driver, led_devclass, 0, 0); +MODULE_VERSION(gpioled, 1); Index: sys/arm/conf/DREAMPLUG =================================================================== --- sys/arm/conf/DREAMPLUG (revision 0) +++ sys/arm/conf/DREAMPLUG (working copy) @@ -0,0 +1,243 @@ +# +# Custom kernel for Marvell DreamPlug devices. +# +# $FreeBSD:$ +# + +ident DREAMPLUG +include "../mv/kirkwood/std.dreamplug" + +options SOC_MV_KIRKWOOD +makeoptions MODULES_OVERRIDE="" + +#makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols +makeoptions WERROR="-Werror" + +options SCHED_4BSD #4BSD scheduler +options INET #InterNETworking +options INET6 #IPv6 communications protocols +options FFS #Berkeley Fast Filesystem +options MD_ROOT # MD is a potential root device +options NFSCL #New Network Filesystem Client +options NFSLOCKD #Network Lock Manager +options NFS_ROOT #NFS usable as /, requires NFSCL + +#bootp/dhcp for remote booting +#options BOOTP +#options BOOTP_NFSROOT +#options BOOTP_NFSV3 +#options BOOTP_WIRED_TO=mge0 + +# Root fs on USB device +options ROOTDEVNAME=\"ufs:/dev/da2s2\" + +options SYSVSHM #SYSV-style shared memory +options SYSVMSG #SYSV-style message queues +options SYSVSEM #SYSV-style semaphores +options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions +options MUTEX_NOINLINE +options RWLOCK_NOINLINE +options NO_FFS_SNAPSHOT +options NO_SWAPPING + + +# Debugging +#options ALT_BREAK_TO_DEBUGGER +options BREAK_TO_DEBUGGER +options DDB +#options DEADLKRES #Enable the deadlock resolver +#options DIAGNOSTIC +#options INVARIANTS #Enable calls of extra sanity checking +#options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS +options KDB +#options WITNESS #Enable checks to detect deadlocks and cycles +#options WITNESS_SKIPSPIN #Don't run witness on spinlocks for speed +#options WITNESS_KDB +#options DEBUG + +# Serial ports +device uart + +#ata devices +device ata #base ata driver +options ATA_CAM # Handle legacy controllers with CAM +options ATA_STATIC_ID # Static device numbering + +# SCSI +options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI +device scbus # SCSI bus (required for SCSI) +device da # Direct Access (disks) +device sa +device cd # CD +device pass + +# SATA +device mvs #Marvell Sata driver +device ahci # AHCI-compatible SATA controllers + +# Partition support +options GEOM_PART_GPT +options GEOM_LABEL +options GEOM_ELI + +# UFS +options UFS_ACL +options UFS_DIRHASH +options UFS_GJOURNAL +options SOFTUPDATES + +# FAT support +options MSDOSFS + +# Misc FSs +options PROCFS +options EXT2FS +device mem +options PSEUDOFS #Pseudo-filesystem framework +options CD9660 #ISO 9660 filesystem +options VFS_AIO +options CD9660_ICONV + +# Sound +device sound +device snd_uaudio + +# Networking +device ether +device mge # Marvell Gigabit Ethernet controller +device mii +device miibus +device e1000phy +device bpf +options HZ=1000 +options DEVICE_POLLING + +#Misc Extra Netwroking +options NETATALK #Appletalk communications protocols +options NETSMB #SMB/CIFS requester +options SMBFS #SMB/CIFS filesystem + +# Pseudo devices. +device loop # Network loopback +device random # Entropy device +device ether # Ethernet support +device vlan # 802.1Q VLAN support +device tun # Packet tunnel. +device pty # BSD-style compatibility pseudo ttys +device md # Memory "disks" +device gif # IPv6 and IPv4 tunneling +device faith # IPv6-to-IPv4 relaying (translation) +device firmware # firmware assist module + +#crypto +device cesa # Marvell security engine +device crypto +device cryptodev + +#Wireless Networking +device wlan +options IEEE80211_DEBUG # enable debug msgs +options IEEE80211_SUPPORT_MESH # enable 802.11s draft support +device wlan_wep # 802.11 WEP support +device wlan_ccmp # 802.11 CCMP support +device wlan_tkip # 802.11 TKIP support +device wlan_amrr # AMRR transmit rate control algorithm + +# USB DEBUG +#options USB_DEBUG # enable debug msgs +#options USB_REQ_DEBUG + +# USB support +device usb # USB Bus (required) +device ehci # EHCI PCI->USB interface (USB 2.0) +device umass # Disks/Mass storage - Requires scbus and da +device usfs +device uhid +device ums + +#USB WIFI +device rum # Ralink Technology RT2501USB wireless NICs +device uath # Atheros AR5523 wireless NICs +device ural # Ralink Technology RT2500USB wireless NICs +device zyd # ZyDAS zb1211/zb1211b wireless NICs +device urtw # Realtek RTL8187B/L USB +device upgt # Conexant/Intersil PrismGT SoftMAC USB + +# USB Serial devices +device u3g # USB-based 3G modems (Option, Huawei, Sierra) +#options U3G_DEBUG + +#USB Over Ethernet +device cdce # Generic USB over Ethernet + +# MMC/SD (Currently not supported) +#device mv_sdio +#device mmc +#device mmcsd +#device sdhci + +#BLUETOOTH + +# I2C (TWSI) +device iic +device iicbus +device icee + +options LIBICONV +options LIBMCHAIN + +# Flattened Device Tree +options FDT +options FDT_DTB_STATIC +makeoptions FDT_DTS_FILE=dreamplug.dts + +#FireWall +device if_bridge + +# Encapsulating Interface +device enc + +# IPSec +options IPSEC +options IPSEC_NAT_T +options TCP_SIGNATURE #include support for RFC 2385 + +# IPFW support +options IPFIREWALL +options IPFIREWALL_DEFAULT_TO_ACCEPT +options IPFIREWALL_FORWARD +options IPFIREWALL_VERBOSE +options IPFIREWALL_VERBOSE_LIMIT=100 +options DUMMYNET +options IPDIVERT + +# altq(9). Enable the base part of the hooks with the ALTQ option. +# Individual disciplines must be built into the base system and can not be +# loaded as modules at this point. ALTQ requires a stable TSC so if yours is +# broken or changes with CPU throttling then you must also have the ALTQ_NOPCC +# option. +options ALTQ +options ALTQ_CBQ # Class Based Queueing +options ALTQ_RED # Random Early Detection +options ALTQ_RIO # RED In/Out +options ALTQ_HFSC # Hierarchical Packet Scheduler +options ALTQ_CDNR # Traffic conditioner +options ALTQ_PRIQ # Priority Queueing +options ALTQ_NOPCC # Required if the TSC is unusable +#options ALTQ_DEBUG + +# MROUTING enables the kernel multicast packet forwarder, which works +# with mrouted and XORP. +options MROUTING # Multicast routing + +# Add multiple route table support +options ROUTETABLES=16 + +# eliminating data copies on socket reads and writes. +# man 9 zero_copy +options ZERO_COPY_SOCKETS + +#PF +device pf +device pflog +device pfsync Index: sys/dev/ofw/ofw_bus_subr.c =================================================================== --- sys/dev/ofw/ofw_bus_subr.c (revision 238981) +++ sys/dev/ofw/ofw_bus_subr.c (working copy) @@ -167,7 +167,8 @@ onelen = strlen(onecompat); while (len > 0) { - if (strncasecmp(compat, onecompat, onelen) == 0) + if (strlen(compat) == onelen && + strncasecmp(compat, onecompat, onelen) == 0) /* Found it. */ return (1); @@ -183,16 +184,31 @@ ofw_bus_is_compatible_strict(device_t dev, const char *compatible) { const char *compat; + size_t len; if ((compat = ofw_bus_get_compat(dev)) == NULL) return (0); - if (strncasecmp(compat, compatible, strlen(compatible)) == 0) + len = strlen(compatible); + + if (strlen(compat) == len && + strncasecmp(compat, compatible, len) == 0) return (1); return (0); } +int +ofw_bus_has_prop(device_t dev, const char *propname) +{ + phandle_t node; + + if ((node = ofw_bus_get_node(dev)) == -1) + return (0); + + return (OF_hasprop(node, propname)); +} + #ifndef FDT void ofw_bus_setup_iinfo(phandle_t node, struct ofw_bus_iinfo *ii, int intrsz) Index: sys/dev/ofw/ofw_bus_subr.h =================================================================== --- sys/dev/ofw/ofw_bus_subr.h (revision 238981) +++ sys/dev/ofw/ofw_bus_subr.h (working copy) @@ -74,4 +74,7 @@ int ofw_bus_is_compatible(device_t, const char *); int ofw_bus_is_compatible_strict(device_t, const char *); +/* Helper routine for checking exsistence of a prop */ +int ofw_bus_has_prop(device_t, const char *); + #endif /* !_DEV_OFW_OFW_BUS_SUBR_H_ */ Index: sys/dev/ofw/openfirm.c =================================================================== --- sys/dev/ofw/openfirm.c (revision 238981) +++ sys/dev/ofw/openfirm.c (working copy) @@ -261,6 +261,14 @@ return (OFW_GETPROPLEN(ofw_obj, package, propname)); } +/* Check exsistence of a property of a package. */ +int +OF_hasprop(phandle_t package, const char *propname) +{ + + return (OF_getproplen(package, propname) >= 0 ? 1 : 0); +} + /* Get the value of a property of a package. */ ssize_t OF_getprop(phandle_t package, const char *propname, void *buf, size_t buflen) Index: sys/dev/ofw/openfirm.h =================================================================== --- sys/dev/ofw/openfirm.h (revision 238981) +++ sys/dev/ofw/openfirm.h (working copy) @@ -105,6 +105,7 @@ ssize_t OF_getproplen(phandle_t node, const char *propname); ssize_t OF_getprop(phandle_t node, const char *propname, void *buf, size_t len); +int OF_hasprop(phandle_t node, const char *propname); ssize_t OF_searchprop(phandle_t node, const char *propname, void *buf, size_t len); ssize_t OF_getprop_alloc(phandle_t node, const char *propname, --------------050907040200060709020602-- From owner-freebsd-arm@FreeBSD.ORG Thu Aug 2 16:59:13 2012 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BB07B1065673 for ; Thu, 2 Aug 2012 16:59:13 +0000 (UTC) (envelope-from r.neese@gmail.com) Received: from mail-yw0-f54.google.com (mail-yw0-f54.google.com [209.85.213.54]) by mx1.freebsd.org (Postfix) with ESMTP id 72B918FC16 for ; Thu, 2 Aug 2012 16:59:13 +0000 (UTC) Received: by yhfs35 with SMTP id s35so10476789yhf.13 for ; Thu, 02 Aug 2012 09:59:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=KxmJQ69Xv1fxs9hCMeSg4ISY70TAe9TmJZGAbJ8nLbc=; b=cmanzGMMVtinSPNo/OvjT3ri7Nn3imhWb0IQkqE8BPVl0fEtkDlfaxzyOc/hIXnyDU 1dypRr93KM13Tni8097tCWdu7VIQ52Uv57oNwjNZtheLl3WkhXus0RkjFj0gXEyBErwc okYs07KyawOk+PdTKO0wAfKGwBgME7aGpCHp/4lr1wC7ckfklRw6l7Xutcvo5eBKO+xz M37wbDNPGRl7ZwcFeULjSS1Cv6PbcrByrzWg2Gc0vTrxK3cIEQeJTqSKCCqfFFofmc41 MLA/7SGEzfK3FKUA+Ca4rzNjXWLpzsQlAphB+ZrqCWh9BXDFeL3hFjFGGMwpSSEiOn9r eQBA== Received: by 10.236.76.3 with SMTP id a3mr21373318yhe.86.1343926752567; Thu, 02 Aug 2012 09:59:12 -0700 (PDT) Received: from [127.0.0.1] ([97.100.95.108]) by mx.google.com with ESMTPS id i65sm11788222yhb.3.2012.08.02.09.59.11 (version=SSLv3 cipher=OTHER); Thu, 02 Aug 2012 09:59:12 -0700 (PDT) Message-ID: <501AB1DD.4010900@gmail.com> Date: Thu, 02 Aug 2012 12:59:09 -0400 From: Richard E Neese User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20120713 Thunderbird/14.0 MIME-Version: 1.0 To: Ian Lepore References: <501A0547.8090209@gmail.com> <1343915055.1128.35.camel@revolution.hippie.lan> In-Reply-To: <1343915055.1128.35.camel@revolution.hippie.lan> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-arm@freebsd.org Subject: Re: a full updated diff X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Aug 2012 16:59:13 -0000 On 8/2/2012 9:44 AM, Ian Lepore wrote: > On Thu, 2012-08-02 at 00:42 -0400, Richard E Neese wrote: >> i merged hrs@FreeBSD.org and my patches together for dreamplug updates. >> his added in the led lights I did not have in mine. >> But this gives 1 full dreamplug update. > Where's the diff? > > -- Ian > > sorry having a bad morning here . I for got to take the password patch out that sets a default password of dreamplug. please rm it from the patch. From owner-freebsd-arm@FreeBSD.ORG Thu Aug 2 17:03:14 2012 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C8DD1106564A for ; Thu, 2 Aug 2012 17:03:14 +0000 (UTC) (envelope-from freebsd@damnhippie.dyndns.org) Received: from qmta12.emeryville.ca.mail.comcast.net (qmta12.emeryville.ca.mail.comcast.net [76.96.27.227]) by mx1.freebsd.org (Postfix) with ESMTP id AA5118FC15 for ; Thu, 2 Aug 2012 17:03:14 +0000 (UTC) Received: from omta24.emeryville.ca.mail.comcast.net ([76.96.30.92]) by qmta12.emeryville.ca.mail.comcast.net with comcast id hoMW1j0041zF43QACt3EE3; Thu, 02 Aug 2012 17:03:14 +0000 Received: from damnhippie.dyndns.org ([24.8.232.202]) by omta24.emeryville.ca.mail.comcast.net with comcast id ht3D1j00G4NgCEG8kt3EcE; Thu, 02 Aug 2012 17:03:14 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id q72H3B2d003145; Thu, 2 Aug 2012 11:03:11 -0600 (MDT) (envelope-from freebsd@damnhippie.dyndns.org) From: Ian Lepore To: Richard E Neese In-Reply-To: <501AB1DD.4010900@gmail.com> References: <501A0547.8090209@gmail.com> <1343915055.1128.35.camel@revolution.hippie.lan> <501AB1DD.4010900@gmail.com> Content-Type: text/plain; charset="us-ascii" Date: Thu, 02 Aug 2012 11:03:11 -0600 Message-ID: <1343926991.1128.42.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: freebsd-arm@freebsd.org Subject: Re: a full updated diff X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Aug 2012 17:03:14 -0000 On Thu, 2012-08-02 at 12:59 -0400, Richard E Neese wrote: > On 8/2/2012 9:44 AM, Ian Lepore wrote: > > On Thu, 2012-08-02 at 00:42 -0400, Richard E Neese wrote: > >> i merged hrs@FreeBSD.org and my patches together for dreamplug updates. > >> his added in the led lights I did not have in mine. > >> But this gives 1 full dreamplug update. > > Where's the diff? > > > > -- Ian > > > > > sorry having a bad morning here . I for got to take the password patch > out that sets a default password of dreamplug. > > please rm it from the patch. No problem, thanks for pulling it together; I'll give it a try in a few minutes here. -- Ian From owner-freebsd-arm@FreeBSD.ORG Thu Aug 2 23:45:47 2012 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1CFE2106564A for ; Thu, 2 Aug 2012 23:45:47 +0000 (UTC) (envelope-from dave@jetcafe.org) Received: from nahkohe.jetcafe.org (nahkohe.jetcafe.org [205.147.26.32]) by mx1.freebsd.org (Postfix) with ESMTP id 553428FC0C for ; Thu, 2 Aug 2012 23:45:46 +0000 (UTC) X-Envelope-To: freebsd-arm@freebsd.org Received: from [205.147.26.5] (hokkshideh4.jetcafe.org [205.147.26.5]) by nahkohe.jetcafe.org (8.14.2/8.14.2) with ESMTP id q72NWKvw061123 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 2 Aug 2012 16:32:22 -0700 (PDT) Message-ID: <501B0E04.5040901@jetcafe.org> Date: Thu, 02 Aug 2012 16:32:20 -0700 From: Dave Hayes User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:13.0) Gecko/20120612 Thunderbird/13.0 MIME-Version: 1.0 To: Ian Lepore References: <5008728C.5040100@jetcafe.org> <1343846511.1128.34.camel@revolution.hippie.lan> In-Reply-To: <1343846511.1128.34.camel@revolution.hippie.lan> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-arm@freebsd.org Subject: Re: Globalscale Dreamplug and 8.3 RELEASE X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Aug 2012 23:45:47 -0000 On 08/01/12 11:41, Ian Lepore wrote: > As to this other part of your message that I didn't answer with my last > reply... I think the most important fix you need that isn't already in > 8.3 is the change to avoid leaving the i-cache bit disabled on > executable pages after loading a program or shared lib. > > I had posted a workaround patch for that on this list a few months ago, > which was oriented towards being as small a change as possible to > implement the workaround. Since then, my patch was reworked by kib@ > into a much more complete and robust change, but that change hasn't > found its way back to freebsd 8.x yet. > > The change that got committed to 9 and 10 doesn't apply cleanly to 8, > but this is something we need at work, so I'll get it back-ported to 8 > and post the patch Sometime Soon(tm). Thanks very much for this, and especially for a response! For reference, I've since compiled FreeBSD 9.1-PRERELEASE for the dreamplug based on some information on this list, and that seems to see both ethernet ports fine. I'll probably go with 9.1 for my "production" dreamplug since that works currently for me, but I will likely need to run both 9.1 and 8.3. So I'd be happy to test any patches you come up with. In the meantime I'm still somewhat struggling with building ports for ARM. Having abandoned cross-compilation for various reasons, I'm trying unsuccessfully to get QEMU to run an arm ports builder on 9.1-PRERELEASE using this GUMSTIX kernel idea. I would like to find a real step-by-step guide for this; those that are out there do not appear to work properly. I know 10 has some easier way, but has anyone tried this on 9.1? Are there alternative suggestions I might consider? -- Dave Hayes - Consultant - Altadena CA, USA - dave@jetcafe.org >>>> *The opinions expressed above are entirely my own* <<<< "How often do you shave?" "Twenty or thirty times a day." "You must be a freak!" "No, only a barber." From owner-freebsd-arm@FreeBSD.ORG Thu Aug 2 23:47:40 2012 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B484C1065680 for ; Thu, 2 Aug 2012 23:47:40 +0000 (UTC) (envelope-from freebsd@damnhippie.dyndns.org) Received: from qmta11.emeryville.ca.mail.comcast.net (qmta11.emeryville.ca.mail.comcast.net [76.96.27.211]) by mx1.freebsd.org (Postfix) with ESMTP id 95D338FC1B for ; Thu, 2 Aug 2012 23:47:40 +0000 (UTC) Received: from omta24.emeryville.ca.mail.comcast.net ([76.96.30.92]) by qmta11.emeryville.ca.mail.comcast.net with comcast id hp8T1j0041zF43QABznalu; Thu, 02 Aug 2012 23:47:34 +0000 Received: from damnhippie.dyndns.org ([24.8.232.202]) by omta24.emeryville.ca.mail.comcast.net with comcast id hznY1j00T4NgCEG8kznZUY; Thu, 02 Aug 2012 23:47:34 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id q72NlVXi003498; Thu, 2 Aug 2012 17:47:31 -0600 (MDT) (envelope-from freebsd@damnhippie.dyndns.org) From: Ian Lepore To: Dave Hayes In-Reply-To: <501B0E04.5040901@jetcafe.org> References: <5008728C.5040100@jetcafe.org> <1343846511.1128.34.camel@revolution.hippie.lan> <501B0E04.5040901@jetcafe.org> Content-Type: text/plain; charset="us-ascii" Date: Thu, 02 Aug 2012 17:47:31 -0600 Message-ID: <1343951251.1128.53.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: freebsd-arm@freebsd.org Subject: Re: Globalscale Dreamplug and 8.3 RELEASE X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Aug 2012 23:47:40 -0000 On Thu, 2012-08-02 at 16:32 -0700, Dave Hayes wrote: > For reference, I've since compiled FreeBSD 9.1-PRERELEASE for the > dreamplug based on some information on this list, and that seems to see > both ethernet ports fine. > > I'll probably go with 9.1 for my "production" dreamplug since that works > currently for me, but I will likely need to run both 9.1 and 8.3. So I'd > be happy to test any patches you come up with. > > In the meantime I'm still somewhat struggling with building ports for > ARM. Having abandoned cross-compilation for various reasons, I'm trying > unsuccessfully to get QEMU to run an arm ports builder on 9.1-PRERELEASE > using this GUMSTIX kernel idea. I would like to find a real step-by-step > guide for this; those that are out there do not appear to work properly. > I know 10 has some easier way, but has anyone tried this on 9.1? Are > there alternative suggestions I might consider? I checked out 9-stable today and applied the latest patches posted by Richard Neese on this list today, and while the DP "sees" the second ethernet port (mge1 exists) it still wouldn't send packets on that port until I changed the MPP pin assignments in the DTS file to match the pin setup done by the builtin linux that came pre-installed on the unit. I haven't yet tried to build ports using stock freebsd. At work we have an arcane and complex and fragile system for cross-building ports, which I only partially understand. -- Ian From owner-freebsd-arm@FreeBSD.ORG Fri Aug 3 05:58:54 2012 Return-Path: Delivered-To: freebsd-arm@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 30E001065673; Fri, 3 Aug 2012 05:58:54 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 042FF8FC08; Fri, 3 Aug 2012 05:58:54 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q735wrPk082703; Fri, 3 Aug 2012 05:58:53 GMT (envelope-from hrs@freefall.freebsd.org) Received: (from hrs@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q735wrqE082699; Fri, 3 Aug 2012 05:58:53 GMT (envelope-from hrs) Date: Fri, 3 Aug 2012 05:58:53 GMT Message-Id: <201208030558.q735wrqE082699@freefall.freebsd.org> To: hrs@FreeBSD.org, freebsd-arm@FreeBSD.org, hrs@FreeBSD.org From: hrs@FreeBSD.org Cc: Subject: Re: arm/156814: OpenRD Ultimate does not boot on DB-88F6XXX or SHEEVAPLUG kernel configurations X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Aug 2012 05:58:54 -0000 Synopsis: OpenRD Ultimate does not boot on DB-88F6XXX or SHEEVAPLUG kernel configurations Responsible-Changed-From-To: freebsd-arm->hrs Responsible-Changed-By: hrs Responsible-Changed-When: Fri Aug 3 05:58:30 UTC 2012 Responsible-Changed-Why: I'll take this. http://www.freebsd.org/cgi/query-pr.cgi?pr=156814 From owner-freebsd-arm@FreeBSD.ORG Fri Aug 3 15:50:07 2012 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9779A106566B for ; Fri, 3 Aug 2012 15:50:07 +0000 (UTC) (envelope-from freebsd@damnhippie.dyndns.org) Received: from qmta06.emeryville.ca.mail.comcast.net (qmta06.emeryville.ca.mail.comcast.net [76.96.30.56]) by mx1.freebsd.org (Postfix) with ESMTP id 728908FC0A for ; Fri, 3 Aug 2012 15:50:07 +0000 (UTC) Received: from omta23.emeryville.ca.mail.comcast.net ([76.96.30.90]) by qmta06.emeryville.ca.mail.comcast.net with comcast id iFfr1j0041wfjNsA6Fq1MG; Fri, 03 Aug 2012 15:50:01 +0000 Received: from damnhippie.dyndns.org ([24.8.232.202]) by omta23.emeryville.ca.mail.comcast.net with comcast id iFq01j00g4NgCEG8jFq1Vw; Fri, 03 Aug 2012 15:50:01 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id q73FnxAm004218 for ; Fri, 3 Aug 2012 09:49:59 -0600 (MDT) (envelope-from freebsd@damnhippie.dyndns.org) From: Ian Lepore To: freebsd-arm@freebsd.org Content-Type: multipart/mixed; boundary="=-X9RJ7lc3MzzcGZE6dGwB" Date: Fri, 03 Aug 2012 09:49:59 -0600 Message-ID: <1344008999.10571.8.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Subject: Complete patchset to support DreamPlug on Freebsd 8.x X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Aug 2012 15:50:07 -0000 --=-X9RJ7lc3MzzcGZE6dGwB Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Here is a complete patchset for running freebsd 8.x on a dreamplug. I've verified that you can check out a clean 8.3-RELEASE or 8-stable tree, apply this patchset, and end up with a bootable dreamplug with SATA, USB, and both ethernet ports working. The kernel config file is pre-set for nfs root using bootp config, but contains several alternate ROOTDEVNAME lines that can be un-commented to use a filesystem on a usb or sata drive as root. (Note that this doesn't contain the fix for the disabled-icache-pages bug, because that's not a dreamplug-specific thing; I'll post that separately when it's ready.) -- Ian --=-X9RJ7lc3MzzcGZE6dGwB Content-Disposition: attachment; filename="dreamplug8.diff" Content-Type: text/x-patch; name="dreamplug8.diff"; charset="us-ascii" Content-Transfer-Encoding: 7bit Add support to 8.x for GlobalScale Technologies DreamPlug units. diff -r f782e529a926 -r 48d067ff170d sys/arm/conf/DREAMPLUG --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ sys/arm/conf/DREAMPLUG Fri Aug 03 09:09:39 2012 -0600 @@ -0,0 +1,96 @@ +# +# Custom kernel for GlobalScale Technologies DreamPlug units. +# +# $FreeBSD: $ +# + +ident DREAMPLUG +include "../mv/kirkwood/std.dreamplug" + +options SOC_MV_KIRKWOOD +makeoptions MODULES_OVERRIDE="" + +# Enable these options for nfs root configured via BOOTP. +options BOOTP +options BOOTP_NFSROOT +options BOOTP_NFSV3 +options BOOTP_WIRED_TO=mge0 + +# If not using BOOTP, use something like one of these... +#options ROOTDEVNAME=\"ufs:/dev/da0a\" +#options ROOTDEVNAME=\"ufs:/dev/da0s1a\" +#options ROOTDEVNAME=\"ufs:/dev/da0p10\" +#options ROOTDEVNAME=\"nfs:192.168.0.254/dreamplug\" + +options SCHED_4BSD #4BSD scheduler +options INET #InterNETworking +options INET6 #IPv6 communications protocols +options FFS #Berkeley Fast Filesystem + +options NFSCLIENT #Network Filesystem Client +options NFSLOCKD #Network Lock Manager +options NFS_ROOT #NFS usable as /, requires NFSCLIENT + +options SYSVSHM #SYSV-style shared memory +options SYSVMSG #SYSV-style message queues +options SYSVSEM #SYSV-style semaphores +options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions +options MUTEX_NOINLINE +options RWLOCK_NOINLINE +options NO_FFS_SNAPSHOT +options NO_SWAPPING + +options GEOM_PART_GPT +options GEOM_PART_MBR + +# Debugging +#makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols +options BREAK_TO_DEBUGGER +options ALT_BREAK_TO_DEBUGGER +options DDB +options KDB +#options DIAGNOSTIC +#options INVARIANTS #Enable calls of extra sanity checking +#options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS +#options WITNESS #Enable checks to detect deadlocks and cycles +#options WITNESS_SKIPSPIN #Don't run witness on spinlocks for speed +#options WITNESS_KDB + +# Pseudo devices +device loop +device md +device pty +device random + +# cam support for umass and ahci +device scbus +device pass +device da + +# Onboard hardware from here down... +device pci + +# Serial ports +device uart + +# Networking +device ether +device mge # Marvell Gigabit Ethernet controller +device mii +device e1000phy +device bpf + +# USB +#options USB_DEBUG # enable debug msgs +device usb +device ehci +device umass + +# I2C (TWSI) +device iic +device iicbus + +# SATA +device mvs +device ahci + diff -r f782e529a926 -r 48d067ff170d sys/arm/mv/common.c --- sys/arm/mv/common.c Fri Aug 03 07:24:13 2012 -0600 +++ sys/arm/mv/common.c Fri Aug 03 09:09:39 2012 -0600 @@ -307,7 +307,7 @@ soc_decode_win(void) decode_win_cpu_setup(); decode_win_usb_setup(); decode_win_eth_setup(MV_ETH0_BASE); - if (dev == MV_DEV_MV78100 || dev == MV_DEV_MV78100_Z0) + if (dev == MV_DEV_MV78100 || dev == MV_DEV_MV78100_Z0 || dev == MV_DEV_88F6281) decode_win_eth_setup(MV_ETH1_BASE); if (dev == MV_DEV_88F6281 || dev == MV_DEV_MV78100 || dev == MV_DEV_MV78100_Z0) diff -r f782e529a926 -r 48d067ff170d sys/arm/mv/kirkwood/dreamplug.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ sys/arm/mv/kirkwood/dreamplug.c Fri Aug 03 09:09:39 2012 -0600 @@ -0,0 +1,185 @@ +/*- + * Copyright (C) 2008 MARVELL INTERNATIONAL LTD. + * All rights reserved. + * + * Developed by Semihalf. + * + * 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. + * 3. Neither the name of MARVELL nor the names of contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR 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 AUTHOR 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 +__FBSDID("$FreeBSD: $"); + +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include + +#include +#include +#include + +/* + * Virtual address space layout: + * ----------------------------- + * 0x0000_0000 - 0xbfff_ffff : user process + * + * 0xc040_0000 - virtual_avail : kernel reserved (text, data, page tables + * : structures, ARM stacks etc.) + * virtual_avail - 0xefff_ffff : KVA (virtual_avail is typically < 0xc0a0_0000) + * 0xf000_0000 - 0xf0ff_ffff : no-cache allocation area (16MB) + * 0xf100_0000 - 0xf10f_ffff : SoC integrated devices registers range (1MB) + * 0xf110_0000 - 0xf11f_ffff : PCI-Express I/O space (1MB) + * 0xf120_0000 - 0xf12f_ffff : unused (1MB) + * 0xf130_0000 - 0xf52f_ffff : PCI-Express memory space (64MB) + * 0xf930_0000 - 0xfffe_ffff : unused (~172MB) + * 0xffff_0000 - 0xffff_0fff : 'high' vectors page (4KB) + * 0xffff_1000 - 0xffff_1fff : ARM_TP_ADDRESS/RAS page (4KB) + * 0xffff_2000 - 0xffff_ffff : unused (~55KB) + */ + +/* Static device mappings. */ +const struct pmap_devmap pmap_devmap[] = { + /* + * Map the on-board devices VA == PA so that we can access them + * with the MMU on or off. + */ + { /* SoC integrated peripherals registers range */ + MV_BASE, + MV_PHYS_BASE, + MV_SIZE, + VM_PROT_READ | VM_PROT_WRITE, + PTE_NOCACHE, + }, + { /* PCIE I/O */ + MV_PCIE_IO_BASE, + MV_PCIE_IO_PHYS_BASE, + MV_PCIE_IO_SIZE, + VM_PROT_READ | VM_PROT_WRITE, + PTE_NOCACHE, + }, + { /* PCIE Memory */ + MV_PCIE_MEM_BASE, + MV_PCIE_MEM_PHYS_BASE, + MV_PCIE_MEM_SIZE, + VM_PROT_READ | VM_PROT_WRITE, + PTE_NOCACHE, + }, + { 0, 0, 0, 0, 0, } +}; + +const struct gpio_config mv_gpio_config[] = { + { -1, -1, -1 } +}; + +void +platform_mpp_init(void) +{ + + /* MPP configuration for GlobalScale Technologies DreamPlug v10. + * Given the absence of schematics or other detailed documentation, + * these settings are based on the diagnostic messages emitted at boot + * time by the linux that comes pre-installed on the unit. + * + * MPP[ 0]: NF_IO[2] + * MPP[ 1]: NF_IO[3] + * MPP[ 2]: NF_IO[4] + * MPP[ 3]: NF_IO[5] + * MPP[ 4]: NF_IO[6] + * MPP[ 5]: NF_IO[7] + * MPP[ 6]: SYSRST_OUTn + * MPP[ 7]: GPO[7] + * MPP[ 8]: TW_SDA + * MPP[ 9]: TW_SCK + * MPP[10]: UA0_TXD + * MPP[11]: US0_RXD + * MPP[12]: SD_CLK + * MPP[13]: SD_CMD + * MPP[14]: SD_D[0] + * MPP[15]: SD_D[1] + * MPP[16]: SD_D[2] + * MPP[17]: SD_D[3] + * MPP[18]: NF_IO[0] + * MPP[19]: NF_IO[1] + * MPP[20]: GE1[ 0] + * MPP[21]: GE1[ 1] + * MPP[22]: GE1[ 2] + * MPP[23]: GE1[ 3] + * MPP[24]: GE1[ 4] + * MPP[25]: GE1[ 5] + * MPP[26]: GE1[ 6] + * MPP[27]: GE1[ 7] + * MPP[28]: GE1[ 8] + * MPP[29]: GE1[ 9] + * MPP[30]: GE1[10] + * MPP[31]: GE1[11] + * MPP[32]: GE1[12] + * MPP[33]: GE1[13] + * MPP[34]: GE1[14] + * MPP[35]: GE1[15] + * MPP[36]: GPIO[36] + * MPP[37]: GPIO[37] + * MPP[38]: GPIO[38] + * MPP[39]: GPIO[39] + * MPP[40]: TDM_SPI_SCK + * MPP[41]: TDM_SPI_MISO + * MPP[42]: TDM_SPI_MOSI + * MPP[43]: GPIO[43] + * MPP[44]: GPIO[44] + * MPP[45]: GPIO[45] + * MPP[46]: GPIO[46] + * MPP[47]: GPIO[47] + * MPP[48]: GPIO[48] + * MPP[49]: GPIO[49] + */ + bus_space_write_4(obio_tag, MV_MPP_BASE, MPP_CONTROL0, 0x01111111); + bus_space_write_4(obio_tag, MV_MPP_BASE, MPP_CONTROL1, 0x11113311); + bus_space_write_4(obio_tag, MV_MPP_BASE, MPP_CONTROL2, 0x33331111); + bus_space_write_4(obio_tag, MV_MPP_BASE, MPP_CONTROL3, 0x33333333); + bus_space_write_4(obio_tag, MV_MPP_BASE, MPP_CONTROL4, 0x00003333); + bus_space_write_4(obio_tag, MV_MPP_BASE, MPP_CONTROL5, 0x00000222); + bus_space_write_4(obio_tag, MV_MPP_BASE, MPP_CONTROL6, 0x00000000); +} + +static void +platform_identify(void *dummy) +{ + + soc_identify(); + + /* + * XXX Board identification e.g. read out from FPGA or similar should + * go here + */ +} +SYSINIT(platform_identify, SI_SUB_CPU, SI_ORDER_SECOND, platform_identify, NULL); diff -r f782e529a926 -r 48d067ff170d sys/arm/mv/kirkwood/files.dreamplug --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ sys/arm/mv/kirkwood/files.dreamplug Fri Aug 03 09:09:39 2012 -0600 @@ -0,0 +1,5 @@ +# $FreeBSD: $ + +include "arm/mv/kirkwood/files.kirkwood" +arm/mv/kirkwood/dreamplug.c standard + diff -r f782e529a926 -r 48d067ff170d sys/arm/mv/kirkwood/kirkwood.c --- sys/arm/mv/kirkwood/kirkwood.c Fri Aug 03 07:24:13 2012 -0600 +++ sys/arm/mv/kirkwood/kirkwood.c Fri Aug 03 09:09:39 2012 -0600 @@ -95,6 +95,12 @@ struct obio_device obio_devices[] = { { -1 }, CPU_PM_CTRL_GE0 }, + { "mge", MV_ETH1_BASE, MV_ETH_SIZE, + { MV_INT_GBE1RX, MV_INT_GBE1TX, MV_INT_GBE1MISC, + MV_INT_GBE1SUM, MV_INT_GBE1ERR, -1 }, + { -1 }, + CPU_PM_CTRL_GE1 + }, { "twsi", MV_TWSI0_BASE, MV_TWSI_SIZE, { -1 }, { -1 }, CPU_PM_CTRL_NONE diff -r f782e529a926 -r 48d067ff170d sys/arm/mv/kirkwood/std.dreamplug --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ sys/arm/mv/kirkwood/std.dreamplug Fri Aug 03 09:09:39 2012 -0600 @@ -0,0 +1,8 @@ +# $FreeBSD: $ + +include "../mv/std.mv" +include "../mv/kirkwood/std.kirkwood" +files "../mv/kirkwood/files.dreamplug" + +options PHYSMEM_SIZE=0x20000000 + diff -r f782e529a926 -r 48d067ff170d sys/dev/mge/if_mge.c --- sys/dev/mge/if_mge.c Fri Aug 03 07:24:13 2012 -0600 +++ sys/dev/mge/if_mge.c Fri Aug 03 09:09:39 2012 -0600 @@ -70,7 +70,7 @@ #include #ifndef MII_ADDR_BASE -#define MII_ADDR_BASE 8 +#define MII_ADDR_BASE 0 #endif #include @@ -692,13 +692,14 @@ mge_attach(device_t dev) mge_ifmedia_sts, BMSR_DEFCAPMASK, phy, MII_OFFSET_ANY, 0); if (error) { device_printf(dev, "attaching PHYs failed\n"); - if_free(ifp); - sc->ifp = NULL; mge_detach(dev); return (error); } sc->mii = device_get_softc(sc->miibus); + /* Tell the MAC which PHY to use. */ + MGE_WRITE(sc, MGE_REG_PHYDEV, phy); + /* Attach interrupt handlers */ for (i = 0; i < 2; ++i) { error = bus_setup_intr(dev, sc->res[1 + i], @@ -732,16 +733,20 @@ mge_detach(device_t dev) /* Stop and release all interrupts */ for (i = 0; i < 2; ++i) { - error = bus_teardown_intr(dev, sc->res[1 + i], sc->ih_cookie[i]); - if (error) - device_printf(dev, "could not release %s\n", - mge_intrs[i].description); + if (sc->ih_cookie[i] != NULL) { + error = bus_teardown_intr(dev, sc->res[1 + i], sc->ih_cookie[i]); + if (error) + device_printf(dev, "could not release %s\n", + mge_intrs[i].description); + sc->ih_cookie[i] = NULL; + } } /* Detach network interface */ if (sc->ifp) { ether_ifdetach(sc->ifp); if_free(sc->ifp); + sc->ifp = NULL; } /* Free DMA resources */ --=-X9RJ7lc3MzzcGZE6dGwB-- From owner-freebsd-arm@FreeBSD.ORG Sat Aug 4 19:33:12 2012 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B9850106564A for ; Sat, 4 Aug 2012 19:33:12 +0000 (UTC) (envelope-from freebsd@damnhippie.dyndns.org) Received: from qmta15.emeryville.ca.mail.comcast.net (qmta15.emeryville.ca.mail.comcast.net [76.96.27.228]) by mx1.freebsd.org (Postfix) with ESMTP id 97B3F8FC12 for ; Sat, 4 Aug 2012 19:33:12 +0000 (UTC) Received: from omta13.emeryville.ca.mail.comcast.net ([76.96.30.52]) by qmta15.emeryville.ca.mail.comcast.net with comcast id ijMU1j00317UAYkAFjY666; Sat, 04 Aug 2012 19:32:06 +0000 Received: from damnhippie.dyndns.org ([24.8.232.202]) by omta13.emeryville.ca.mail.comcast.net with comcast id ijY51j0024NgCEG8ZjY5Vz; Sat, 04 Aug 2012 19:32:06 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id q74JW3PW005338 for ; Sat, 4 Aug 2012 13:32:03 -0600 (MDT) (envelope-from freebsd@damnhippie.dyndns.org) From: Ian Lepore To: freebsd-arm@freebsd.org Content-Type: multipart/mixed; boundary="=-uPnEGGxJav7oGPCIWDeR" Date: Sat, 04 Aug 2012 13:32:03 -0600 Message-ID: <1344108723.1128.80.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Subject: Proposed patchset to support DreamPlug on freebsd 9 and 10. X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Aug 2012 19:33:12 -0000 --=-uPnEGGxJav7oGPCIWDeR Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit After exchanging a few emails with Richard yesterday we realized why I had to put some tweaks on top of the patches he had posted... there are two different flavors of a DreamPlug v10. One of my co-workers has a unit marked "1001" and it has NOR SPI flash, as does Richard's. My unit is marked "1001N" and has NAND flash (which makes it a bit like an expanded GuruPlug). This is going to drive the need for two separate .dts files and two separate kernel configs. I reworked the patchset I've been using for 9-stable and -current to move in this direction, and I'm attaching what I've got so far as a proposal for handling this difference. The attached patches don't include Hiroki's led driver, this is just minimal dreamplug support on top of a fresh checkout of 9 or 10. I've also heard there are differences in the v0901 dreamplug units, but I don't know what the differences are. That might require yet another set of config. I broke the kernel config into 3 pieces... a DREAMPLUG-BASE that has config for things that are dreamplug-specific and common to all dreamplugs, and notably is not a GENERIC or kitchen-sink type config file. Then there are DREAMPLUG-1001 and -1001N config files that include the -BASE file, and add other options to make a more fully usable system. I think there's plenty of room for changes and additions to these -1001[N] files, such as IPFW and other things that you might want right out of the box -- I do mainly embedded systems work, so I don't know what most folks might want. The config for the 1001N needs more work, notably more support for the NAND flash in the .dts and kernel configs. Since the whole reason I'm playing with a dreamplug is to get some experience using nand flash, I'll be working on that in the days to come. I just wanted to get this out there and see if folks think this is a workable direction for supporting different dreamplug flavors. -- Ian --=-uPnEGGxJav7oGPCIWDeR Content-Disposition: attachment; filename="dreamplug_nandnor_head.diff" Content-Type: text/x-patch; name="dreamplug_nandnor_head.diff"; charset="us-ascii" Content-Transfer-Encoding: 7bit Add support for DreamPlug versions 1001 and 1001N (the latter has NAND flash instead of NOR flash). The pin assignements are different depending on the type of flash, so separate .dts files are needed, which then drives the need for separate kernel configs to include the different .dts files. diff -r c6cae9d38404 -r 44bec77dc670 sys/arm/conf/DREAMPLUG-1001 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ sys/arm/conf/DREAMPLUG-1001 Sat Aug 04 11:39:50 2012 -0600 @@ -0,0 +1,44 @@ +# +# Kernel config for GlobalScale Technologies DreamPlug version 1001. +# +# This is for units that are version 10, revision 01, with NOR SPI flash. +# These units are identified with the number "1001" on the S/N label. +# +# $FreeBSD:$ +# + +ident DREAMPLUG-1001 + +include DREAMPLUG-BASE + +makeoptions FDT_DTS_FILE=dreamplug-1001.dts + +makeoptions MODULES_OVERRIDE="" + +# Enable these options for nfs root configured via BOOTP. +options NFSCL #Network Filesystem Client +options NFSLOCKD #Network Lock Manager +options NFS_ROOT #NFS usable as /, requires NFSCLIENT +options BOOTP +options BOOTP_NFSROOT +options BOOTP_NFSV3 +options BOOTP_WIRED_TO=mge0 + +# If not using BOOTP, use something like one of these... +#options ROOTDEVNAME=\"ufs:/dev/da0a\" +#options ROOTDEVNAME=\"ufs:/dev/da0s1a\" +#options ROOTDEVNAME=\"ufs:/dev/da0p10\" +#options ROOTDEVNAME=\"nfs:192.168.0.254/dreamplug\" + +# Debugging +options BREAK_TO_DEBUGGER +options ALT_BREAK_TO_DEBUGGER +options DDB +options KDB +options DIAGNOSTIC +options INVARIANTS #Enable calls of extra sanity checking +options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS +#options WITNESS #Enable checks to detect deadlocks and cycles +#options WITNESS_SKIPSPIN #Don't run witness on spinlocks for speed +#options WITNESS_KDB + diff -r c6cae9d38404 -r 44bec77dc670 sys/arm/conf/DREAMPLUG-1001N --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ sys/arm/conf/DREAMPLUG-1001N Sat Aug 04 11:39:50 2012 -0600 @@ -0,0 +1,44 @@ +# +# Kernel config for GlobalScale Technologies DreamPlug version 1001N. +# +# This is for units that are version 10, revision 01, with NAND flash. +# These units are identified with the number "1001N" on the S/N label. +# +# $FreeBSD:$ +# + +ident DREAMPLUG-1001N + +include DREAMPLUG-BASE + +makeoptions FDT_DTS_FILE=dreamplug-1001N.dts + +makeoptions MODULES_OVERRIDE="" + +# Enable these options for nfs root configured via BOOTP. +options NFSCL #Network Filesystem Client +options NFSLOCKD #Network Lock Manager +options NFS_ROOT #NFS usable as /, requires NFSCLIENT +options BOOTP +options BOOTP_NFSROOT +options BOOTP_NFSV3 +options BOOTP_WIRED_TO=mge0 + +# If not using BOOTP, use something like one of these... +#options ROOTDEVNAME=\"ufs:/dev/da0a\" +#options ROOTDEVNAME=\"ufs:/dev/da0s1a\" +#options ROOTDEVNAME=\"ufs:/dev/da0p10\" +#options ROOTDEVNAME=\"nfs:192.168.0.254/dreamplug\" + +# Debugging +options BREAK_TO_DEBUGGER +options ALT_BREAK_TO_DEBUGGER +options DDB +options KDB +options DIAGNOSTIC +options INVARIANTS #Enable calls of extra sanity checking +options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS +#options WITNESS #Enable checks to detect deadlocks and cycles +#options WITNESS_SKIPSPIN #Don't run witness on spinlocks for speed +#options WITNESS_KDB + diff -r c6cae9d38404 -r 44bec77dc670 sys/arm/conf/DREAMPLUG-BASE --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ sys/arm/conf/DREAMPLUG-BASE Sat Aug 04 11:39:50 2012 -0600 @@ -0,0 +1,70 @@ +# +# Kernel config common to all versions of GlobalScale Technologies DreamPlug. +# +# $FreeBSD: $ +# + +include "../mv/kirkwood/std.dreamplug" + +options SOC_MV_KIRKWOOD + +options SCHED_4BSD #4BSD scheduler +options INET #InterNETworking +options INET6 #IPv6 communications protocols +options FFS #Berkeley Fast Filesystem +options SYSVSHM #SYSV-style shared memory +options SYSVMSG #SYSV-style message queues +options SYSVSEM #SYSV-style semaphores +options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions +options NO_SWAPPING +options GEOM_PART_GPT +options GEOM_PART_MBR + +# Flattened Device Tree +device fdt +options FDT +options FDT_DTB_STATIC + +# Pseudo devices +device loop +device md +device pty +device random + +# cam support for umass and ahci +device scbus +device pass +device da + +# Onboard hardware from here down... + +#device pci # Chipset has pci, but DreamPlug doesn't expose it. + +# Serial ports +device uart + +# Networking +device ether +device mge # Marvell Gigabit Ethernet controller +device mii +device e1000phy +device bpf + +# USB +device usb +device ehci +device umass +device uhid + +# I2C (TWSI) +device iic +device iicbus + +# SATA +device mvs +device ahci + +# Sound +device sound +device snd_uaudio + diff -r c6cae9d38404 -r 44bec77dc670 sys/arm/mv/kirkwood/dreamplug.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ sys/arm/mv/kirkwood/dreamplug.c Sat Aug 04 11:39:50 2012 -0600 @@ -0,0 +1,45 @@ +/*- + * Copyright (c) 2010 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Semihalf under sponsorship from + * the FreeBSD Foundation. + * + * 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 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 AUTHOR 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 +__FBSDID("$FreeBSD:$"); + +#include +#include + +#include + +int +fdt_pci_devmap(phandle_t node, struct pmap_devmap *devmap, + vm_offset_t io_va, vm_offset_t mem_va) +{ + + return (0); +} + diff -r c6cae9d38404 -r 44bec77dc670 sys/arm/mv/kirkwood/files.dreamplug --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ sys/arm/mv/kirkwood/files.dreamplug Sat Aug 04 11:39:50 2012 -0600 @@ -0,0 +1,4 @@ +# $FreeBSD:$ + +include "arm/mv/kirkwood/files.kirkwood" +arm/mv/kirkwood/dreamplug.c standard diff -r c6cae9d38404 -r 44bec77dc670 sys/arm/mv/kirkwood/std.dreamplug --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ sys/arm/mv/kirkwood/std.dreamplug Sat Aug 04 11:39:50 2012 -0600 @@ -0,0 +1,5 @@ +# $FreeBSD:$ + +include "../mv/std.mv" +include "../mv/kirkwood/std.kirkwood" +files "../mv/kirkwood/files.dreamplug" diff -r c6cae9d38404 -r 44bec77dc670 sys/arm/mv/mvwin.h --- sys/arm/mv/mvwin.h Fri Aug 03 13:40:29 2012 -0600 +++ sys/arm/mv/mvwin.h Sat Aug 04 11:39:50 2012 -0600 @@ -133,8 +133,8 @@ #define MV_WIN_CESA_ATTR 0 #endif -#define MV_WIN_USB_CTRL(n) (0x10 * (n) + 0x0) -#define MV_WIN_USB_BASE(n) (0x10 * (n) + 0x4) +#define MV_WIN_USB_CTRL(n) (0x10 * (n) + 0x320) +#define MV_WIN_USB_BASE(n) (0x10 * (n) + 0x324) #define MV_WIN_USB_MAX 4 #define MV_WIN_ETH_BASE(n) (0x8 * (n) + 0x200) diff -r c6cae9d38404 -r 44bec77dc670 sys/boot/fdt/dts/dreamplug-1001.dts --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ sys/boot/fdt/dts/dreamplug-1001.dts Sat Aug 04 11:39:50 2012 -0600 @@ -0,0 +1,325 @@ +/* + * Copyright (c) 2010 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Semihalf under sponsorship from + * the FreeBSD Foundation. + * + * 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 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 AUTHOR 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. + * + * GlobalScale Technologies DreamPlug Device Tree Source. + * + * This source is for version 10 revision 01 units with NOR SPI flash. + * These units are marked "1001" on the serial number label. + * + * $FreeBSD$ + */ + +/dts-v1/; + +/ { + model = "GlobalScale Technologies Dreamplug"; + compatible = "globalscale,dreamplug-003-ds2001", "globalscale,dreamplug", "marvell,kirkwood-88f6281", "marvell,kirkwood"; + #address-cells = <1>; + #size-cells = <1>; + + aliases { + ethernet0 = &enet0; + ethernet1 = &enet1; + mpp = &MPP; + serial0 = &serial0; + serial1 = &serial1; + soc = &SOC; + sram = &SRAM; + }; + + cpus { + #address-cells = <1>; + #size-cells = <0>; + + cpu@0 { + device_type = "cpu"; + compatible = "ARM,88FR131"; + reg = <0x0>; + d-cache-line-size = <32>; // 32 bytes + i-cache-line-size = <32>; // 32 bytes + d-cache-size = <0x4000>; // L1, 16K + i-cache-size = <0x4000>; // L1, 16K + timebase-frequency = <0>; + bus-frequency = <0>; + clock-frequency = <0>; + }; + + }; + + memory { + device_type = "memory"; + reg = <0x0 0x20000000>; // 512M at 0x0 + }; + + localbus@f1000000 { + #address-cells = <2>; + #size-cells = <1>; + compatible = "mrvl,lbc"; + + /* This reflects CPU decode windows setup. */ + ranges = <0x0 0x0f 0xf9300000 0x00100000 + 0x1 0x1e 0xfa000000 0x00100000 + 0x2 0x1d 0xfa100000 0x02000000 + 0x3 0x1b 0xfc100000 0x00000400>; + + nor@0,0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "cfi-flash"; + reg = <0x0 0x0 0x00100000>; + bank-width = <2>; + device-width = <1>; + }; + + led@1,0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "led"; + reg = <0x1 0x0 0x00100000>; + }; + + nor@2,0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "cfi-flash"; + reg = <0x2 0x0 0x02000000>; + bank-width = <2>; + device-width = <1>; + }; + }; + + SOC: soc88f6281@f1000000 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "simple-bus"; + ranges = <0x0 0xf1000000 0x00100000>; + bus-frequency = <0>; + + PIC: pic@20200 { + interrupt-controller; + #address-cells = <0>; + #interrupt-cells = <1>; + reg = <0x20200 0x3c>; + compatible = "mrvl,pic"; + }; + + timer@20300 { + compatible = "mrvl,timer"; + reg = <0x20300 0x30>; + interrupts = <1>; + interrupt-parent = <&PIC>; + mrvl,has-wdt; + }; + + MPP: mpp@10000 { + #pin-cells = <2>; + compatible = "mrvl,mpp"; + reg = <0x10000 0x34>; + pin-count = <50>; + pin-map = < + 0 2 /* MPP[0]: SPI_SCn */ + 1 2 /* MPP[1]: SPI_MOSI */ + 2 2 /* MPP[2]: SPI_SCK */ + 3 2 /* MPP[3]: SPI_MISO */ + 6 1 /* MPP[6]: SYSRST_OUTn */ + 8 2 /* MPP[8]: UA0_RTS */ + 9 2 /* MPP[9]: UA0_CTS */ + 10 3 /* MPP[10]: UA0_TXD */ + 11 3 /* MPP[11]: UA0_RXD */ + 12 1 /* MPP[12]: SD_CLK */ + 13 1 /* MPP[13]: SD_CMD */ + 14 1 /* MPP[14]: SD_D[0] */ + 15 1 /* MPP[17]: SD_D[1] */ + 20 3 /* MPP[20]: GE1[ 0] */ + 21 3 /* MPP[21]: GE1[ 1] */ + 22 3 /* MPP[22]: GE1[ 2] */ + 23 3 /* MPP[23]: GE1[ 3] */ + 24 3 /* MPP[24]: GE1[ 4] */ + 25 3 /* MPP[25]: GE1[ 5] */ + 26 3 /* MPP[26]: GE1[ 6] */ + 27 3 /* MPP[27]: GE1[ 7] */ + 28 3 /* MPP[28]: GE1[ 8] */ + 29 3 /* MPP[29]: GE1[ 9] */ + 30 3 /* MPP[30]: GE1[10] */ + 31 3 /* MPP[31]: GE1[11] */ + 32 3 /* MPP[32]: GE1[12] */ + 33 3 /* MPP[33]: GE1[13] */ + 34 3 /* MPP[34]: GE1[14] */ + 35 3 /* MPP[35]: GE1[15] */ + 37 4 /* MPP[37]: AU_SPDIFO */ + 38 4 /* MPP[38]: AU_SPDOFRMCLK */ + 39 4 /* MPP[39]: AU_I2SBCLK */ + 40 4 /* MPP[40]: AU_I2SDO */ + 41 4 /* MPP[41]: AU_I2SLRCLK */ + 42 4 /* MPP[42]: AU_I2SMCLK */ + 43 4 /* MPP[43]: AU_I2SDI */ + 44 4 /* MPP[44]: AU_EXTCLK */ + 47 0 /* MPP[47]: GPIO[47] BT LED */ + 48 0 /* MPP[48]: GPIO[48] WLAN LED */ + 49 0>; /* MPP[49]: GPIO[49] WLAN AP */ + }; + + GPIO: gpio@10100 { + #gpio-cells = <3>; + compatible = "mrvl,gpio"; + reg = <0x10100 0x20>; + gpio-controller; + interrupts = <35 36 37 38 39 40 41>; + interrupt-parent = <&PIC>; + pin-count = <50>; + }; + + gpioled@0 { + compatible = "mrvl,gpioled"; + + gpios = <&GPIO 47 2 0 /* GPIO[47] BT LED: OUT */ + &GPIO 48 2 0 /* GPIO[48] WLAN LED: OUT */ + &GPIO 49 2 0>; /* GPIO[49] WLAN AP LED: OUT */ + }; + + rtc@10300 { + compatible = "mrvl,rtc"; + reg = <0x10300 0x08>; + }; + + twsi@11000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "mrvl,twsi"; + reg = <0x11000 0x20>; + interrupts = <43>; + interrupt-parent = <&PIC>; + }; + + enet0: ethernet@72000 { + #address-cells = <1>; + #size-cells = <1>; + model = "V2"; + compatible = "mrvl,ge"; + reg = <0x72000 0x2000>; + ranges = <0x0 0x72000 0x2000>; + local-mac-address = [ 00 00 00 00 00 00 ]; + interrupts = <12 13 14 11 46>; + interrupt-parent = <&PIC>; + phy-handle = <&phy0>; + + mdio@0 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "mrvl,mdio"; + + phy0: ethernet-phy@0 { + reg = <0x0>; + }; + + phy1: ethernet-phy@1 { + reg = <0x1>; + }; + }; + }; + + enet1: ethernet@76000 { + #address-cells = <1>; + #size-cells = <1>; + model = "V2"; + compatible = "mrvl,ge"; + reg = <0x76000 0x02000>; + ranges = <0x0 0x76000 0x2000>; + local-mac-address = [ 00 00 00 00 00 00 ]; + interrupts = <16 17 18 15 47>; + interrupt-parent = <&PIC>; + phy-handle = <&phy1>; + }; + + serial0: serial@12000 { + compatible = "ns16550"; + reg = <0x12000 0x20>; + reg-shift = <2>; + clock-frequency = <0>; + interrupts = <33>; + interrupt-parent = <&PIC>; + }; + + serial1: serial@12100 { + compatible = "ns16550"; + reg = <0x12100 0x20>; + reg-shift = <2>; + clock-frequency = <0>; + interrupts = <34>; + interrupt-parent = <&PIC>; + }; + + crypto@30000 { + compatible = "mrvl,cesa"; + reg = <0x30000 0x10000>; + interrupts = <22>; + interrupt-parent = <&PIC>; + + sram-handle = <&SRAM>; + }; + + usb@50000 { + compatible = "mrvl,usb-ehci", "usb-ehci"; + reg = <0x50000 0x1000>; + interrupts = <48 19>; + interrupt-parent = <&PIC>; + }; + + xor@60000 { + compatible = "mrvl,xor"; + reg = <0x60000 0x1000>; + interrupts = <5 6 7 8>; + interrupt-parent = <&PIC>; + }; + + sata@80000 { + compatible = "mrvl,sata"; + reg = <0x80000 0x6000>; + interrupts = <21>; + interrupt-parent = <&PIC>; + }; + + sdio@90000 { + compatible = "mrvl,sdio"; + reg = <0x90000 0x134>; + interrupts = <28>; + interrupt-parent = <&PIC>; + }; + }; + + SRAM: sram@fd000000 { + compatible = "mrvl,cesa-sram"; + reg = <0xfd000000 0x00100000>; + }; + + chosen { + stdin = "serial0"; + stdout = "serial0"; + }; + +}; diff -r c6cae9d38404 -r 44bec77dc670 sys/boot/fdt/dts/dreamplug-1001N.dts --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ sys/boot/fdt/dts/dreamplug-1001N.dts Sat Aug 04 11:39:50 2012 -0600 @@ -0,0 +1,336 @@ +/* + * Copyright (c) 2010 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Semihalf under sponsorship from + * the FreeBSD Foundation. + * + * 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 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 AUTHOR 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. + * + * GlobalScale Technologies DreamPlug Device Tree Source. + * + * This source is for version 10 revision 01 units with NAND flash. + * These units are marked "1001N" on the serial number label. + * + * $FreeBSD$ + */ + +/dts-v1/; + +/ { + model = "GlobalScale Technologies Dreamplug v1001N"; + compatible = "globalscale,dreamplug-003-ds2001", "globalscale,dreamplug", "marvell,kirkwood-88f6281", "marvell,kirkwood"; + #address-cells = <1>; + #size-cells = <1>; + + aliases { + ethernet0 = &enet0; + ethernet1 = &enet1; + mpp = &MPP; + serial0 = &serial0; + serial1 = &serial1; + soc = &SOC; + sram = &SRAM; + }; + + cpus { + #address-cells = <1>; + #size-cells = <0>; + + cpu@0 { + device_type = "cpu"; + compatible = "ARM,88FR131"; + reg = <0x0>; + d-cache-line-size = <32>; // 32 bytes + i-cache-line-size = <32>; // 32 bytes + d-cache-size = <0x4000>; // L1, 16K + i-cache-size = <0x4000>; // L1, 16K + timebase-frequency = <0>; + bus-frequency = <0>; + clock-frequency = <0>; + }; + + }; + + memory { + device_type = "memory"; + reg = <0x0 0x20000000>; // 512M at 0x0 + }; + + localbus@f1000000 { + #address-cells = <2>; + #size-cells = <1>; + compatible = "mrvl,lbc"; + + /* This reflects CPU decode windows setup. */ + ranges = <0x0 0x0f 0xf9300000 0x00100000 + 0x1 0x1e 0xfa000000 0x00100000 + 0x2 0x1d 0xfa100000 0x02000000 + 0x3 0x1b 0xfc100000 0x00000400>; + + nor@0,0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "cfi-flash"; + reg = <0x0 0x0 0x00100000>; + bank-width = <2>; + device-width = <1>; + }; + + led@1,0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "led"; + reg = <0x1 0x0 0x00100000>; + }; + + nor@2,0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "cfi-flash"; + reg = <0x2 0x0 0x02000000>; + bank-width = <2>; + device-width = <1>; + }; + }; + + SOC: soc88f6281@f1000000 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "simple-bus"; + ranges = <0x0 0xf1000000 0x00100000>; + bus-frequency = <0>; + + PIC: pic@20200 { + interrupt-controller; + #address-cells = <0>; + #interrupt-cells = <1>; + reg = <0x20200 0x3c>; + compatible = "mrvl,pic"; + }; + + timer@20300 { + compatible = "mrvl,timer"; + reg = <0x20300 0x30>; + interrupts = <1>; + interrupt-parent = <&PIC>; + mrvl,has-wdt; + }; + + MPP: mpp@10000 { + #pin-cells = <2>; + compatible = "mrvl,mpp"; + reg = <0x10000 0x34>; + pin-count = <50>; + pin-map = < + 0 1 /* MPP[ 0]: NF_IO[2] */ + 1 1 /* MPP[ 1]: NF_IO[3] */ + 2 1 /* MPP[ 2]: NF_IO[4] */ + 3 1 /* MPP[ 3]: NF_IO[5] */ + 4 1 /* MPP[ 4]: NF_IO[6] */ + 5 1 /* MPP[ 5]: NF_IO[7] */ + 6 1 /* MPP[ 6]: SYSRST_OUTn */ + 7 0 /* MPP[ 7]: GPO[7] */ + 8 1 /* MPP[ 8]: TW_SDA */ + 9 1 /* MPP[ 9]: TW_SCK */ + 10 3 /* MPP[10]: UA0_TXD */ + 11 3 /* MPP[11]: US0_RXD */ + 12 1 /* MPP[12]: SD_CLK */ + 13 1 /* MPP[13]: SD_CMD */ + 14 1 /* MPP[14]: SD_D[0] */ + 15 1 /* MPP[15]: SD_D[1] */ + 16 1 /* MPP[16]: SD_D[2] */ + 17 1 /* MPP[17]: SD_D[3] */ + 18 1 /* MPP[18]: NF_IO[0] */ + 19 1 /* MPP[19]: NF_IO[1] */ + 20 3 /* MPP[20]: GE1[ 0] */ + 21 3 /* MPP[21]: GE1[ 1] */ + 22 3 /* MPP[22]: GE1[ 2] */ + 23 3 /* MPP[23]: GE1[ 3] */ + 24 3 /* MPP[24]: GE1[ 4] */ + 25 3 /* MPP[25]: GE1[ 5] */ + 26 3 /* MPP[26]: GE1[ 6] */ + 27 3 /* MPP[27]: GE1[ 7] */ + 28 3 /* MPP[28]: GE1[ 8] */ + 29 3 /* MPP[29]: GE1[ 9] */ + 30 3 /* MPP[30]: GE1[10] */ + 31 3 /* MPP[31]: GE1[11] */ + 32 3 /* MPP[32]: GE1[12] */ + 33 3 /* MPP[33]: GE1[13] */ + 34 3 /* MPP[34]: GE1[14] */ + 35 3 /* MPP[35]: GE1[15] */ + 36 0 /* MPP[36]: GPIO[36] */ + 37 0 /* MPP[37]: GPIO[37] */ + 38 0 /* MPP[38]: GPIO[38] */ + 39 0 /* MPP[39]: GPIO[39] */ + 40 2 /* MPP[40]: TDM_SPI_SCK */ + 41 2 /* MPP[41]: TDM_SPI_MISO */ + 42 2 /* MPP[42]: TDM_SPI_MOSI */ + 43 0 /* MPP[43]: GPIO[43] */ + 44 0 /* MPP[44]: GPIO[44] */ + 45 0 /* MPP[45]: GPIO[45] */ + 46 0 /* MPP[46]: GPIO[46] */ + 47 0 /* MPP[47]: GPIO[47] */ + 48 0 /* MPP[48]: GPIO[48] */ + 49 0 /* MPP[49]: GPIO[49] */ + >; + }; + + GPIO: gpio@10100 { + #gpio-cells = <3>; + compatible = "mrvl,gpio"; + reg = <0x10100 0x20>; + gpio-controller; + interrupts = <35 36 37 38 39 40 41>; + interrupt-parent = <&PIC>; + pin-count = <50>; + }; + + gpioled@0 { + compatible = "mrvl,gpioled"; + + gpios = <&GPIO 47 2 0 /* GPIO[47] BT LED: OUT */ + &GPIO 48 2 0 /* GPIO[48] WLAN LED: OUT */ + &GPIO 49 2 0>; /* GPIO[49] WLAN AP LED: OUT */ + }; + + rtc@10300 { + compatible = "mrvl,rtc"; + reg = <0x10300 0x08>; + }; + + twsi@11000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "mrvl,twsi"; + reg = <0x11000 0x20>; + interrupts = <43>; + interrupt-parent = <&PIC>; + }; + + enet0: ethernet@72000 { + #address-cells = <1>; + #size-cells = <1>; + model = "V2"; + compatible = "mrvl,ge"; + reg = <0x72000 0x2000>; + ranges = <0x0 0x72000 0x2000>; + local-mac-address = [ 00 00 00 00 00 00 ]; + interrupts = <12 13 14 11 46>; + interrupt-parent = <&PIC>; + phy-handle = <&phy0>; + + mdio@0 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "mrvl,mdio"; + + phy0: ethernet-phy@0 { + reg = <0x0>; + }; + + phy1: ethernet-phy@1 { + reg = <0x1>; + }; + }; + }; + + enet1: ethernet@76000 { + #address-cells = <1>; + #size-cells = <1>; + model = "V2"; + compatible = "mrvl,ge"; + reg = <0x76000 0x02000>; + ranges = <0x0 0x76000 0x2000>; + local-mac-address = [ 00 00 00 00 00 00 ]; + interrupts = <16 17 18 15 47>; + interrupt-parent = <&PIC>; + phy-handle = <&phy1>; + }; + + serial0: serial@12000 { + compatible = "ns16550"; + reg = <0x12000 0x20>; + reg-shift = <2>; + clock-frequency = <0>; + interrupts = <33>; + interrupt-parent = <&PIC>; + }; + + serial1: serial@12100 { + compatible = "ns16550"; + reg = <0x12100 0x20>; + reg-shift = <2>; + clock-frequency = <0>; + interrupts = <34>; + interrupt-parent = <&PIC>; + }; + + crypto@30000 { + compatible = "mrvl,cesa"; + reg = <0x30000 0x10000>; + interrupts = <22>; + interrupt-parent = <&PIC>; + + sram-handle = <&SRAM>; + }; + + usb@50000 { + compatible = "mrvl,usb-ehci", "usb-ehci"; + reg = <0x50000 0x1000>; + interrupts = <48 19>; + interrupt-parent = <&PIC>; + }; + + xor@60000 { + compatible = "mrvl,xor"; + reg = <0x60000 0x1000>; + interrupts = <5 6 7 8>; + interrupt-parent = <&PIC>; + }; + + sata@80000 { + compatible = "mrvl,sata"; + reg = <0x80000 0x6000>; + interrupts = <21>; + interrupt-parent = <&PIC>; + }; + + sdio@90000 { + compatible = "mrvl,sdio"; + reg = <0x90000 0x134>; + interrupts = <28>; + interrupt-parent = <&PIC>; + }; + }; + + SRAM: sram@fd000000 { + compatible = "mrvl,cesa-sram"; + reg = <0xfd000000 0x00100000>; + }; + + chosen { + stdin = "serial0"; + stdout = "serial0"; + }; + +}; --=-uPnEGGxJav7oGPCIWDeR--