All of lore.kernel.org
 help / color / mirror / Atom feed
From: Scott Wood <scottwood@freescale.com>
To: York Sun <yorksun@freescale.com>
Cc: linux-fbdev-devel@lists.sourceforge.net, a.p.zijlstra@chello.nl,
	linux-kernel@vger.kernel.org, galak@kernel.crashing.org,
	linuxppc-dev@ozlabs.org, akpm@linux-foundation.org,
	Timur Tabi <timur@freescale.com>
Subject: Re: [PATCH 2/2 v4] Add DIU platform code for MPC8610HPCD
Date: Fri, 28 Mar 2008 12:19:25 -0500	[thread overview]
Message-ID: <47ED289D.3020607@freescale.com> (raw)
In-Reply-To: <1206672058321-git-send-email-yorksun@freescale.com>

York Sun wrote:
> +	np = of_find_compatible_node(NULL, NULL, "fsl,fpga-pixis");
> +	if (np) {
> +		of_address_to_resource(np, 0, &r);
> +		of_node_put(np);
> +		pixis_bdcfg0 = ioremap(r.start + 0x00000008, sizeof(u8));
> +		if (!pixis_bdcfg0) {
> +			printk(KERN_ERR "Err: can't map FPGA cfg register!\n");
> +			return;
> +		}
> +		pixis_arch = ioremap(r.start + 0x00000001, sizeof(u8));
> +		if (!pixis_arch) {
> +			printk(KERN_ERR "Err: can't map FPGA arch register!\n");
> +			return;
> +		}

Just of_iomap() the whole resource, rather than doing it a byte at a time.

> +int __init preallocate_diu_videomemory(void)
> +{
> +	pr_debug("diu_size=%lu\n", diu_ops.diu_size);
> +
> +	diu_ops.diu_mem = __alloc_bootmem(diu_ops.diu_size, 8, 0);
> +	if (!diu_ops.diu_mem) {
> +		printk(KERN_ERR "fsl-diu: cannot allocate %lu bytes\n",
> +			diu_ops.diu_size);
> +		return -ENOMEM;
> +	}
> +
> +	printk(KERN_INFO "%s: diu_mem=%p\n", __func__, diu_ops.diu_mem);

The pr_debug line is more useful information than the KERN_INFO line...

-Scott

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace

WARNING: multiple messages have this Message-ID (diff)
From: Scott Wood <scottwood@freescale.com>
To: York Sun <yorksun@freescale.com>
Cc: linux-fbdev-devel@lists.sourceforge.net, a.p.zijlstra@chello.nl,
	linux-kernel@vger.kernel.org, linuxppc-dev@ozlabs.org,
	akpm@linux-foundation.org, Timur Tabi <timur@freescale.com>
Subject: Re: [PATCH 2/2 v4] Add DIU platform code for MPC8610HPCD
Date: Fri, 28 Mar 2008 12:19:25 -0500	[thread overview]
Message-ID: <47ED289D.3020607@freescale.com> (raw)
In-Reply-To: <1206672058321-git-send-email-yorksun@freescale.com>

York Sun wrote:
> +	np = of_find_compatible_node(NULL, NULL, "fsl,fpga-pixis");
> +	if (np) {
> +		of_address_to_resource(np, 0, &r);
> +		of_node_put(np);
> +		pixis_bdcfg0 = ioremap(r.start + 0x00000008, sizeof(u8));
> +		if (!pixis_bdcfg0) {
> +			printk(KERN_ERR "Err: can't map FPGA cfg register!\n");
> +			return;
> +		}
> +		pixis_arch = ioremap(r.start + 0x00000001, sizeof(u8));
> +		if (!pixis_arch) {
> +			printk(KERN_ERR "Err: can't map FPGA arch register!\n");
> +			return;
> +		}

Just of_iomap() the whole resource, rather than doing it a byte at a time.

> +int __init preallocate_diu_videomemory(void)
> +{
> +	pr_debug("diu_size=%lu\n", diu_ops.diu_size);
> +
> +	diu_ops.diu_mem = __alloc_bootmem(diu_ops.diu_size, 8, 0);
> +	if (!diu_ops.diu_mem) {
> +		printk(KERN_ERR "fsl-diu: cannot allocate %lu bytes\n",
> +			diu_ops.diu_size);
> +		return -ENOMEM;
> +	}
> +
> +	printk(KERN_INFO "%s: diu_mem=%p\n", __func__, diu_ops.diu_mem);

The pr_debug line is more useful information than the KERN_INFO line...

-Scott

WARNING: multiple messages have this Message-ID (diff)
From: Scott Wood <scottwood@freescale.com>
To: York Sun <yorksun@freescale.com>
Cc: linux-fbdev-devel@lists.sourceforge.net,
	akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
	linuxppc-dev@ozlabs.org, galak@kernel.crashing.org,
	a.p.zijlstra@chello.nl, Timur Tabi <timur@freescale.com>
Subject: Re: [PATCH 2/2 v4] Add DIU platform code for MPC8610HPCD
Date: Fri, 28 Mar 2008 12:19:25 -0500	[thread overview]
Message-ID: <47ED289D.3020607@freescale.com> (raw)
In-Reply-To: <1206672058321-git-send-email-yorksun@freescale.com>

York Sun wrote:
> +	np = of_find_compatible_node(NULL, NULL, "fsl,fpga-pixis");
> +	if (np) {
> +		of_address_to_resource(np, 0, &r);
> +		of_node_put(np);
> +		pixis_bdcfg0 = ioremap(r.start + 0x00000008, sizeof(u8));
> +		if (!pixis_bdcfg0) {
> +			printk(KERN_ERR "Err: can't map FPGA cfg register!\n");
> +			return;
> +		}
> +		pixis_arch = ioremap(r.start + 0x00000001, sizeof(u8));
> +		if (!pixis_arch) {
> +			printk(KERN_ERR "Err: can't map FPGA arch register!\n");
> +			return;
> +		}

Just of_iomap() the whole resource, rather than doing it a byte at a time.

> +int __init preallocate_diu_videomemory(void)
> +{
> +	pr_debug("diu_size=%lu\n", diu_ops.diu_size);
> +
> +	diu_ops.diu_mem = __alloc_bootmem(diu_ops.diu_size, 8, 0);
> +	if (!diu_ops.diu_mem) {
> +		printk(KERN_ERR "fsl-diu: cannot allocate %lu bytes\n",
> +			diu_ops.diu_size);
> +		return -ENOMEM;
> +	}
> +
> +	printk(KERN_INFO "%s: diu_mem=%p\n", __func__, diu_ops.diu_mem);

The pr_debug line is more useful information than the KERN_INFO line...

-Scott

  reply	other threads:[~2008-03-28 17:19 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-28  2:40 v4 patch to add FSL DIU framebuffer driver York Sun
2008-03-28  2:40 ` York Sun
2008-03-28  2:40 ` [PATCH 1/2 v4] Driver for Freescale 8610 and 5121 DIU York Sun
2008-03-28  2:40   ` York Sun
2008-03-28  2:40   ` [PATCH 2/2 v4] Add DIU platform code for MPC8610HPCD York Sun
2008-03-28  2:40     ` York Sun
2008-03-28 17:19     ` Scott Wood [this message]
2008-03-28 17:19       ` Scott Wood
2008-03-28 17:19       ` Scott Wood
2008-03-28 17:30   ` [PATCH 1/2 v4] Driver for Freescale 8610 and 5121 DIU Scott Wood
2008-03-28 17:30     ` Scott Wood
2008-03-28 17:48     ` Anton Vorontsov
2008-03-28 17:48       ` Anton Vorontsov
2008-03-28 17:48       ` Anton Vorontsov
2008-03-28 18:18       ` York Sun
2008-03-28 18:18         ` York Sun
2008-03-28 18:07     ` Timur Tabi
2008-03-28 18:07       ` Timur Tabi
2008-03-28 18:07       ` Timur Tabi
2008-03-28 18:09       ` Scott Wood
2008-03-28 18:09         ` Scott Wood
2008-03-28 18:09         ` Scott Wood

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=47ED289D.3020607@freescale.com \
    --to=scottwood@freescale.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=akpm@linux-foundation.org \
    --cc=galak@kernel.crashing.org \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=timur@freescale.com \
    --cc=yorksun@freescale.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.