public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Scott Wood <scottwood@freescale•com>
To: Heiko Schocher <hs@denx•de>
Cc: linuxppc-dev@ozlabs•org, Stephen Rothwell <sfr@canb•auug.org.au>
Subject: Re: [PATCH v2] 8xx: Add support for the MPC852 based board from keymile.
Date: Mon, 17 Mar 2008 17:46:27 -0500	[thread overview]
Message-ID: <20080317224627.GB3622@loki.buserror.net> (raw)
In-Reply-To: <47DA444E.9050507@denx.de>

On Fri, Mar 14, 2008 at 10:24:30AM +0100, Heiko Schocher wrote:
> +	setbits16(&mpc8xx_immr->im_ioport.iop_pcso, 0x300);
> +	cpm1_clk_setup(CPM_CLK_SCC3, CPM_CLK5, CPM_CLK_RX);
> +	cpm1_clk_setup(CPM_CLK_SCC3, CPM_CLK6, CPM_CLK_TX);
> +	setbits32(&mpc8xx_immr->im_cpm.cp_pbpar, 0x300);
> +	setbits32(&mpc8xx_immr->im_cpm.cp_pbdir, 0x300);

Any particular reason not to use cpm1_set_pin() rather than those setbits?

> +static void __init mgsuvd_setup_arch(void)
> +{
> +	struct device_node *cpu;
> +
> +	cpu = of_find_node_by_type(NULL, "cpu");
> +	if (cpu != 0) {
> +		const unsigned int *fp;
> +
> +		fp = of_get_property(cpu, "clock-frequency", NULL);
> +		if (fp != 0)
> +			loops_per_jiffy = *fp / HZ;
> +		else
> +			loops_per_jiffy = 50000000 / HZ;
> +		of_node_put(cpu);
> +	}
> +

This is obsolete and unnecessary.

> +	ROOT_DEV = Root_NFS;

Likewise.

> +static int __init mgsuvd_probe(void)
> +{
> +	char *model = of_get_flat_dt_prop(of_get_flat_dt_root(),
> +					  "model", NULL);
> +	if (model == NULL)
> +		return 0;
> +	if (strcmp(model, "MGSUVD"))
> +		return 0;
> +
> +	return 1;
> +}

Check compatible (using of_flat_dt_is_compatible), not model.

-Scott

  parent reply	other threads:[~2008-03-17 22:46 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-14  9:24 [PATCH v2] 8xx: Add support for the MPC852 based board from keymile Heiko Schocher
2008-03-14 23:25 ` Stephen Rothwell
2008-03-18  7:13   ` Heiko Schocher
2008-03-18  7:33     ` Stephen Rothwell
2008-03-18  8:04       ` Heiko Schocher
2008-03-18 15:11         ` Scott Wood
2008-03-18 16:19           ` Wolfgang Denk
2008-03-18 16:56             ` Scott Wood
2008-03-18 16:19         ` Vitaly Bordug
2008-03-19  6:51           ` Heiko Schocher
2008-03-17 22:46 ` Scott Wood [this message]
2008-03-18  8:07   ` [PATCH v3] " Heiko Schocher

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=20080317224627.GB3622@loki.buserror.net \
    --to=scottwood@freescale$(echo .)com \
    --cc=hs@denx$(echo .)de \
    --cc=linuxppc-dev@ozlabs$(echo .)org \
    --cc=sfr@canb$(echo .)auug.org.au \
    /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