All of lore.kernel.org
 help / color / mirror / Atom feed
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/7] davinci: eliminate use of IO_ADDRESS() on sysmod
Date: Mon, 14 Mar 2011 17:21:51 +0100	[thread overview]
Message-ID: <201103141721.52033.arnd@arndb.de> (raw)
In-Reply-To: <1300110947-16229-1-git-send-email-manjunath.hadli@ti.com>

On Monday 14 March 2011, Manjunath Hadli wrote:
> Current devices.c file has a number of instances where
> IO_ADDRESS() is used for system module register
> access. Eliminate this in favor of a ioremap()
> based access.
> 
> Consequent to this, a new global pointer davinci_sysmodbase
> has been introduced which gets initialized during
> the initialization of each relevant SoC
> 
> Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>

The change looks good, it's definitely a step in the right
direction.

Acked-by: Arnd Bergmann <arnd@arndb.de>


I think you can go even further:

* A straightforward change would be to move davinci_sysmodbase
  into a local variable of the davinci_setup_mmc function,
  which I believe is the only user. Then you can ioremap
  and iounmap it directly there.

* If you need to access sysmod in multiple places, a nicer
  way would be to make the virtual address pointer static,
  and export the accessor functions for it, rather than
  having a global pointer.

	Arnd

WARNING: multiple messages have this Message-ID (diff)
From: Arnd Bergmann <arnd@arndb.de>
To: linux-arm-kernel@lists.infradead.org
Cc: Manjunath Hadli <manjunath.hadli@ti.com>,
	LMML <linux-media@vger.kernel.org>,
	Kevin Hilman <khilman@deeprootsystems.com>,
	Sekhar Nori <nsekhar@ti.com>, Hans Verkuil <hverkuil@xs4all.nl>,
	dlos <davinci-linux-open-source@linux.davincidsp.com>,
	Mauro Carvalho Chehab <mchehab@redhat.com>
Subject: Re: [PATCH 2/7] davinci: eliminate use of IO_ADDRESS() on sysmod
Date: Mon, 14 Mar 2011 17:21:51 +0100	[thread overview]
Message-ID: <201103141721.52033.arnd@arndb.de> (raw)
In-Reply-To: <1300110947-16229-1-git-send-email-manjunath.hadli@ti.com>

On Monday 14 March 2011, Manjunath Hadli wrote:
> Current devices.c file has a number of instances where
> IO_ADDRESS() is used for system module register
> access. Eliminate this in favor of a ioremap()
> based access.
> 
> Consequent to this, a new global pointer davinci_sysmodbase
> has been introduced which gets initialized during
> the initialization of each relevant SoC
> 
> Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>

The change looks good, it's definitely a step in the right
direction.

Acked-by: Arnd Bergmann <arnd@arndb.de>


I think you can go even further:

* A straightforward change would be to move davinci_sysmodbase
  into a local variable of the davinci_setup_mmc function,
  which I believe is the only user. Then you can ioremap
  and iounmap it directly there.

* If you need to access sysmod in multiple places, a nicer
  way would be to make the virtual address pointer static,
  and export the accessor functions for it, rather than
  having a global pointer.

	Arnd

  parent reply	other threads:[~2011-03-14 16:21 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-14 13:55 [PATCH 2/7] davinci: eliminate use of IO_ADDRESS() on sysmod Manjunath Hadli
2011-03-14 13:55 ` Manjunath Hadli
2011-03-14 14:11 ` Sergei Shtylyov
2011-03-14 14:11   ` Sergei Shtylyov
2011-03-14 16:21 ` Arnd Bergmann [this message]
2011-03-14 16:21   ` Arnd Bergmann
2011-03-15  6:00   ` Nori, Sekhar
2011-03-15  6:00     ` Nori, Sekhar
2011-03-15  9:00     ` Arnd Bergmann
2011-03-15  9:00       ` Arnd Bergmann

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=201103141721.52033.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=linux-arm-kernel@lists.infradead.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.