public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Olof Johansson <olof@lixom•net>
To: Nate Case <ncase@xes-inc•com>
Cc: linuxppc-dev <linuxppc-dev@ozlabs•org>,
	Sebastian Siewior <bigeasy@linutronix•de>,
	Greg Kroah-Hartman <gregkh@suse•de>,
	linux-usb@vger•kernel.org
Subject: Re: [PATCH 2/2] USB: isp1760: Support board-specific hardware configurations
Date: Thu, 22 May 2008 09:28:34 -0500	[thread overview]
Message-ID: <20080522142834.GA14072@lixom.net> (raw)
In-Reply-To: <1211405331.13845.628.camel@localhost.localdomain>

On Wed, May 21, 2008 at 04:28:51PM -0500, Nate Case wrote:
> This adds support for hardware configurations that don't match the
> chip default register settings (e.g., 16-bit data bus, DACK and
> DREQ pulled down instead of up, analog overcurrent mode).
> 
> These settings are passed in via the OF device tree.  The PCI
> interface still assumes the same default values.

Nice! I'll give this a spin on Electra as well, it should make it work
there.

A couple of comments on the OF interface:

> @@ -55,8 +57,34 @@ static int of_isp1760_probe(struct of_device *dev,
>  	virq = irq_create_of_mapping(oirq.controller, oirq.specifier,
>  			oirq.size);
>  
> +	prop = of_get_property(dp, "port1-disable", NULL);
> +	if (prop && *prop != 0)
> +		devflags |= ISP1760_FLAG_PORT1_DIS;

It should be sufficient to add the property without a value, and just
check for the presence of it. The cpu nodes have properties like this if
you want something to compare with.

> +
> +	/* Some systems wire up only 16 of the 32 data lines */
> +	prop = of_get_property(dp, "bus-width", NULL);
> +	if (prop && *prop == 16)
> +		devflags |= ISP1760_FLAG_BUS_WIDTH_16;

This is the obvious exception, here you'll have to check the value.

I'm not sure if the DT police will complain of the overloaded bus-width
property name and would prefer a custom one.


-Olof

  reply	other threads:[~2008-05-22 14:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-21 21:28 [PATCH 2/2] USB: isp1760: Support board-specific hardware configurations Nate Case
2008-05-22 14:28 ` Olof Johansson [this message]
2008-05-22 15:35 ` Sebastian Siewior
2008-05-23  3:28   ` Nathaniel Case

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080522142834.GA14072@lixom.net \
    --to=olof@lixom$(echo .)net \
    --cc=bigeasy@linutronix$(echo .)de \
    --cc=gregkh@suse$(echo .)de \
    --cc=linux-usb@vger$(echo .)kernel.org \
    --cc=linuxppc-dev@ozlabs$(echo .)org \
    --cc=ncase@xes-inc$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox