All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ralf Baechle <ralf@linux-mips.org>
To: John Crispin <blogic@openwrt.org>
Cc: linux-mips@linux-mips.org
Subject: Re: [PATCH V2 1/6] MIPS: lantiq: reorganize xway code
Date: Thu, 17 Nov 2011 16:28:44 +0000	[thread overview]
Message-ID: <20111117162844.GC26457@linux-mips.org> (raw)
In-Reply-To: <1321453698-2598-1-git-send-email-blogic@openwrt.org>

On Wed, Nov 16, 2011 at 03:28:13PM +0100, John Crispin wrote:

> -	if (insert_resource(&iomem_resource, &ltq_cgu_resource) < 0)
> -		panic("Failed to insert cgu memory\n");

panic strings should not end in \n.

> +void __iomem *ltq_remap_resource(struct resource *res)
>  {
> -	struct clk *clk;
> +	__iomem void *ret = NULL;

void __iomem *ret = NULL;

diff --git a/arch/mips/lantiq/devices.h b/arch/mips/lantiq/devices.h
index 2947bb1..a03c23f 100644
--- a/arch/mips/lantiq/devices.h
+++ b/arch/mips/lantiq/devices.h
@@ -14,6 +14,10 @@

 #define IRQ_RES(resname, irq) \
        {.name = #resname, .start = (irq), .flags = IORESOURCE_IRQ}
+#define MEM_RES(resname, adr_start, adr_size) \
+	{ .name = resname, .flags = IORESOURCE_MEM, \
+         .start = ((adr_start) & ~KSEG1), \
+         .end = ((adr_start + adr_size - 1) & ~KSEG1) }

Generally you're much better off by using physical addresses
as the kernel internal currency.  Don't make assumptions on the
value of the KSEG constants or that its value can be used or
turned into a bitmask.

  Ralf

  parent reply	other threads:[~2011-11-17 16:28 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-16 14:28 [PATCH V2 1/6] MIPS: lantiq: reorganize xway code John Crispin
2011-11-16 14:28 ` [PATCH V2 2/6] MIPS: lantiq: change ltq_request_gpio() call signature John Crispin
2011-11-17 16:46   ` Ralf Baechle
2011-11-16 14:28 ` [PATCH V2 3/6] MIPS: lantiq: make irq.c support the FALC-ON John Crispin
2011-11-17 16:52   ` Ralf Baechle
2011-11-16 14:28 ` [PATCH V2 4/6] MIPS: lantiq: add basic support for FALC-ON John Crispin
2011-11-17 17:01   ` Ralf Baechle
2011-11-16 14:28 ` [PATCH V2 5/6] MIPS: lantiq: add support for FALC-ON GPIOs John Crispin
2011-11-16 14:28 ` [PATCH V2 6/6] MIPS: lantiq: add support for the EASY98000 evaluation board John Crispin
2011-11-17 16:28 ` Ralf Baechle [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-11-21 13:35 [PATCH V2 1/6] MIPS: lantiq: reorganize xway code John Crispin

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=20111117162844.GC26457@linux-mips.org \
    --to=ralf@linux-mips.org \
    --cc=blogic@openwrt.org \
    --cc=linux-mips@linux-mips.org \
    /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.