From owner-freebsd-arm@FreeBSD.ORG Fri Oct 29 22:36:57 2010 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 95F351065695 for ; Fri, 29 Oct 2010 22:36:57 +0000 (UTC) (envelope-from freebsd-arm@dino.sk) Received: from loki.netlab.sk (ns3.netlab.sk [84.245.65.11]) by mx1.freebsd.org (Postfix) with ESMTP id 2950A8FC39 for ; Fri, 29 Oct 2010 22:36:56 +0000 (UTC) Received: from door.dino.sk (fw1.dino.sk [84.245.95.252]) (AUTH: PLAIN milan, TLS: TLSv1/SSLv3,256bits,AES256-SHA) by loki.netlab.sk with esmtp; Sat, 30 Oct 2010 00:37:31 +0200 id 00033C0A.4CCB4CAB.0000F3B7 From: Milan Obuch To: freebsd-arm@freebsd.org Date: Sat, 30 Oct 2010 00:37:01 +0200 User-Agent: KMail/1.13.5 (FreeBSD/8.1-STABLE; KDE/4.5.2; i386; ; ) MIME-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <201010300037.03374.freebsd-arm@dino.sk> Subject: Guruplug gpio 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, 29 Oct 2010 22:36:57 -0000 Hi, after solving mge1 problem I decided to work a bit with Guruplug's gpio. There are some of them accessible via u-snap connector and some of them are used to controll status LEDs. there is some description in file bindings-gpio.txt, but I did not find something used in dts files, so I only guessed gpios could be defined the following way: 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>; gpios = <&GPIO 46 2 0x00000000 /* GPIO[46]: OUT */ &GPIO 47 2 0x00000000 /* GPIO[47]: OUT */ &GPIO 48 2 0x00000000 /* GPIO[48]: OUT */ &GPIO 49 2 0x00000000 /* GPIO[49]: OUT */ >; }; However, if I add this definition to dts and rebuild kernel, it does not work and hangs with no sign of beginning to run. With some investigation I found function platform_gpio_init does something bad and loops. There is nothing written to console even. So either I did not understand the way how gpios should be defined (possible, since I did not find complete example) or platform_gpio_init does something unintended... If I delete gpios definition, everything is back to normal and kernel boots and works as before. If I comment out platform_gpio_init call, then again everything works. Anybody out there who could tell me what I did wrong? Any hint appreciated... Regards, Milan