All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: linuxppc-dev@ozlabs.org
Cc: Scott Wood <scottwood@freescale.com>
Subject: Re: removing get_immrbase()??
Date: Thu, 23 Apr 2009 15:53:55 +0200	[thread overview]
Message-ID: <200904231553.56464.arnd@arndb.de> (raw)
In-Reply-To: <A6732FD8-FBC6-420F-9318-CC111D266993@kernel.crashing.org>

[-- Attachment #1: Type: text/plain, Size: 1412 bytes --]

On Wednesday 22 April 2009, Kumar Gala wrote:

First of all, thanks for bringing this up, I'd love to see get_immrbase() gone.

> arch/powerpc/sysdev/cpm1.c:     mpc8xx_immr = ioremap(get_immrbase(),  
> 0x4000);
>         not sure? ideas?

Nobody has commented on this, so I've taken a brief look at it.

I'd suggest moving the logic up one step at a time. im_cpm, im_siu_conf and
im_ioport could be defined locally in sysdev/cpm1.c rather than through
mpc8xx_immr, all you need for this is to export accessor functions from cpm1 for
iop_pcso and cp_cptr:

void cpm1_set_iop_pcso(u16 pcso)
{
	setbits16(cpm1_ioport.iop_pcso, pcso);
}
void cpm1_clear_iop_pcso(u16 pcso)
{
	clearbits16(cpm1_ioport.iop_pcso, pcso);
}
...

im_sit, im_sitk, im_clkrst and im_clkrstk should be defined locally in m8xx_setup.c,
which is the only place that they are used in. Fortunately, the are all contiguous
in the address sapce, so they can be moved into one new data structure with 
a single static pointer to it in m8xx_setup.c:

static struct {
	struct­ sys_int_timers sit;
	struct clk_and_reset clkrst;
	struct sitk sitk;
	struct cark clkrstk;
} *m8xx_setup_regs;

When this is done, 8xx_immap.h along with all the unused stuff therein can be removed.
In the last step, the device trees can be cleaned up so that you can of_iomap
the regions in those two files directly.

	Arnd <><


[-- Attachment #2: Type: text/html, Size: 8243 bytes --]

      parent reply	other threads:[~2009-04-23 13:54 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-22 18:38 removing get_immrbase()?? Kumar Gala
2009-04-22 19:35 ` Timur Tabi
2009-04-22 20:16   ` Scott Wood
2009-04-22 20:16     ` Timur Tabi
2009-04-22 20:20       ` Scott Wood
2009-04-22 21:31       ` Kumar Gala
2009-04-22 21:33         ` Timur Tabi
2009-04-22 21:39           ` Kumar Gala
2009-04-22 21:46             ` Timur Tabi
2009-04-22 21:54               ` Kumar Gala
2009-04-22 21:57                 ` Timur Tabi
2009-04-22 22:07                   ` Kumar Gala
2009-04-22 22:00               ` Scott Wood
2009-04-22 22:00                 ` Timur Tabi
2009-04-23 13:54             ` Grant Likely
2009-04-22 21:38         ` Scott Wood
2009-04-22 21:55           ` Kumar Gala
2009-04-22 22:33             ` Scott Wood
2009-04-23  0:03               ` Timur Tabi
2009-04-23  2:26             ` David Gibson
2009-04-23  3:36               ` Kumar Gala
2009-04-23  4:06                 ` David Gibson
2009-04-23  4:41                   ` Kumar Gala
2009-04-28  4:12                     ` David Gibson
2009-04-28 13:48                       ` Timur Tabi
2009-04-23 13:07                 ` Timur Tabi
2009-04-23 15:56                 ` Scott Wood
2009-04-23 13:02               ` Timur Tabi
2009-04-23 13:50                 ` Anton Vorontsov
2009-04-23 14:02                   ` Timur Tabi
2009-04-23 14:06                     ` Kumar Gala
2009-04-23 14:09                       ` Timur Tabi
2009-04-24 14:40                       ` Wrobel Heinz-R39252
2009-04-23 14:13                     ` Anton Vorontsov
2009-04-23 16:00                   ` Scott Wood
2009-04-23 16:54                     ` Anton Vorontsov
2009-04-23 17:03                       ` Scott Wood
2009-04-23 17:26                         ` Anton Vorontsov
2009-04-23 17:59                           ` Scott Wood
2009-04-28  4:25                   ` David Gibson
2009-04-28  4:21                 ` David Gibson
2009-04-23 13:53         ` Grant Likely
2009-04-23 14:03           ` Anton Vorontsov
2009-04-28  4:26           ` David Gibson
2009-04-22 19:44 ` Scott Wood
2009-04-22 20:00   ` Kumar Gala
2009-04-22 20:30   ` Scott Wood
2009-04-23 13:53 ` Arnd Bergmann [this message]

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=200904231553.56464.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=scottwood@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.