From owner-freebsd-arm@FreeBSD.ORG Sun Feb 2 19:35:47 2014 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E1770BAF for ; Sun, 2 Feb 2014 19:35:46 +0000 (UTC) Received: from mail-ig0-f180.google.com (mail-ig0-f180.google.com [209.85.213.180]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A813E1726 for ; Sun, 2 Feb 2014 19:35:46 +0000 (UTC) Received: by mail-ig0-f180.google.com with SMTP id m12so2928886iga.1 for ; Sun, 02 Feb 2014 11:35:40 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:mime-version:content-type:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=A1qUTgR2XStletTjMQNf1q8VyX4hhsJotnUeWex2EP4=; b=Ni+xww04c8BkxA8EJClQo8ur7x0EU7FJX3trNayyjbHI+SrefE3JMalfd//gdos2Ex Q6qNPa3aXB2HasJSj0dAeXkgdcyIrx5O3IO/PFnvhNrshHIK1OAyZeJQshhdjE7q8KZA lCzpNsFW9Ih4CIlLkwGWX2qcnM8oWHEdiro3/WdfTbQI/kkiQlKjPF1m8vad8pHumAd0 VIn8dGtocnk3OgDEKetoVCV03zMOlDSpXmhtwRTlk2zVM7A7PGZnGFgZY1dySLUtFnQQ c8WiO0nNySVqVuEG2NoO5XLr7dqguICdFay5gVpruOwwbNWle1jme7PprFuLdZsKoTNq RqXg== X-Gm-Message-State: ALoCoQlqoLN0H0IanvhoqvzlIvx8B18rUnTgk6RZQLlDz8gdBsuEaUuf3JIG5kX038OXE8h+t9fA X-Received: by 10.50.138.98 with SMTP id qp2mr8831554igb.27.1391369740099; Sun, 02 Feb 2014 11:35:40 -0800 (PST) Received: from fusion-mac.bsdimp.com (50-78-194-198-static.hfc.comcastbusiness.net. [50.78.194.198]) by mx.google.com with ESMTPSA id y9sm22316649igl.0.2014.02.02.11.35.39 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 02 Feb 2014 11:35:39 -0800 (PST) Sender: Warner Losh Subject: Re: status = "disabled" Mime-Version: 1.0 (Apple Message framework v1085) Content-Type: text/plain; charset=iso-8859-1 From: Warner Losh In-Reply-To: <52EE6EA1.90707@freebsd.org> Date: Sun, 2 Feb 2014 12:35:38 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <4F893AE1-6B64-469D-AF3C-8AB2EB9D0ED9@bsdimp.com> References: <726dc97ccd1f44b3ba9d7bee3eeff08a@e15be-01.zdv.Uni-Mainz.DE> <52EE622C.9010004@freebsd.org> <06235e983f8142fcb7f6f6c329a84b90@e15be-01.zdv.Uni-Mainz.DE> <52EE6EA1.90707@freebsd.org> To: Nathan Whitehorn X-Mailer: Apple Mail (2.1085) Cc: "'freebsd-arm@freebsd.org'" X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Feb 2014 19:35:47 -0000 On Feb 2, 2014, at 9:13 AM, Nathan Whitehorn wrote: > On 02/02/14 09:59, Wei=DF, J=FCrgen wrote: >>=20 >>> -----Original Message----- >>> From: Nathan Whitehorn [mailto:nwhitehorn@freebsd.org] >>> Sent: Sunday, February 02, 2014 4:20 PM >>> To: Wei=DF, J=FCrgen; freebsd-arm@freebsd.org >>> Subject: Re: status =3D "disabled" >>>=20 >>> On 02/02/14 05:55, Wei=DF, J=FCrgen wrote: >>>> Hi, >>>>=20 >>>> it seems your recent changes (261351) discarded a call to = fdt_is_enabled >>>> for devices on simplebus. So 'status =3D "disabled" ' does not work >>>> anymore in arm dts. >>>>=20 >>>> Regards >>>>=20 >>>> Juergen Weiss >>>>=20 >>>> Juergen Weiss |Universitaet Mainz, Zentrum fuer = Datenverarbeitung, >>>> weiss@uni-mainz.de |55099 Mainz, Tel: +49(6131)39-26361, FAX: = +49(6131)39-26407 >>>>=20 >>>>=20 >>> That's actually required to make some hardware work ("disabled" may = just >>> mean the clock is turned off and needs to be turned back on, which = means >>> you absolutely do want that device probed). The device drivers >>> themselves, not the bus, should be checking this property and >>> interpreting it. If this has actually broken hardware, we could add = a >>> temporary #ifdef __arm__ check to the simplebus tree-walker while = the >>> relevant drivers get fixed up. >>> -Nathan >>=20 >> Thanks for the quick answer. Right know there seem to be zero device = drivers >> doing this. And there are quite a few fdts going from general (all = devices on SOC) >> to specific (devices usable on specific board), which use the status = field >> to disable a device (for example i.mx in general and wandboard = specifically). >> At least with the i.mx6 the unconnected sdhci devices lead to hangs = during >> boot. >>=20 >=20 > That's disappointing. I think I'll probably add a hack while we repair = any drivers like this. >=20 > For the (near) future, according to the spec (ePAPR section 2.3.4), = "disabled" means: > "Indicates that the device is not presently operational, but it might = become operational in the future (for example, something is not plugged = in, or is switched off). Refer to the device binding for details on what = 'disabled' means for a given device." > So dropping them at probe time in the bus layer was clearly wrong and = indeed breaks some hardware. It would be nice to have some survey of = which drivers encounter this issue... In the yet-to-be-committed Atmel code, disabled is used to mark those = devices that can't work because their pins are not brought out to = headers, or they are, but they are internally multiplexed to something = else... The reason no drivers do this is because of the check to see if they = were enabled in the bus layer, which is now gone... That check was = wrong, but this isn't a surprising turn of events... Warner