From: ben-i2c@fluff.org (Ben Dooks)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/7] arm/pxa2xx: reorganize I2C files
Date: Thu, 25 Nov 2010 23:55:20 +0000 [thread overview]
Message-ID: <20101125235520.GC15948@trinity.fluff.org> (raw)
In-Reply-To: <1290633617-15311-3-git-send-email-bigeasy@linutronix.de>
On Wed, Nov 24, 2010 at 10:20:12PM +0100, Sebastian Andrzej Siewior wrote:
> This patch moves the register definitions into include/asm so it can be
> accessed from X86 the same way as on ARM. This move also alters the
> unused register offset definitins (IBMR, ...) and uses them in the
> calculation macros (_IBMR,...).
> The header file from plat-pxa is moved the include/linux for the same
> reason.
> This change should make no functional change to the PXA code. The move
> is verified by building the following defconfigs:
> cm_x2xx_defconfig corgi_defconfig em_x270_defconfig ezx_defconfig
> imote2_defconfig pxa3xx_defconfig spitz_defconfig zeus_defconfig
> raumfeld_defconfig magician_defconfig mmp2_defconfig pxa168_defconfig
> pxa910_defconfig
>
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> Signed-off-by: Dirk Brandewie <dirk.brandewie@gmail.com>
> ---
> arch/arm/include/asm/pxa_i2c.h | 19 +++++++++++++++++++
> arch/arm/mach-mmp/include/mach/mmp2.h | 2 +-
> arch/arm/mach-mmp/include/mach/pxa168.h | 2 +-
> arch/arm/mach-mmp/include/mach/pxa910.h | 2 +-
> arch/arm/mach-pxa/balloon3.c | 3 +--
> arch/arm/mach-pxa/cm-x300.c | 2 +-
> arch/arm/mach-pxa/colibri-pxa270-income.c | 3 +--
> arch/arm/mach-pxa/corgi.c | 2 +-
> arch/arm/mach-pxa/csb726.c | 2 +-
> arch/arm/mach-pxa/devices.c | 2 +-
> arch/arm/mach-pxa/em-x270.c | 2 +-
> arch/arm/mach-pxa/ezx.c | 2 +-
> arch/arm/mach-pxa/hx4700.c | 2 +-
> arch/arm/mach-pxa/littleton.c | 2 +-
> arch/arm/mach-pxa/magician.c | 2 +-
> arch/arm/mach-pxa/mainstone.c | 2 +-
> arch/arm/mach-pxa/mioa701.c | 2 +-
> arch/arm/mach-pxa/mxm8x10.c | 2 +-
> arch/arm/mach-pxa/palm27x.c | 3 +--
> arch/arm/mach-pxa/pcm990-baseboard.c | 2 +-
> arch/arm/mach-pxa/poodle.c | 2 +-
> arch/arm/mach-pxa/pxa27x.c | 2 +-
> arch/arm/mach-pxa/pxa3xx.c | 2 +-
> arch/arm/mach-pxa/raumfeld.c | 2 +-
> arch/arm/mach-pxa/saar.c | 2 +-
> arch/arm/mach-pxa/spitz.c | 3 +--
> arch/arm/mach-pxa/stargate2.c | 2 +-
> arch/arm/mach-pxa/tavorevb3.c | 3 +--
> arch/arm/mach-pxa/tosa.c | 2 +-
> arch/arm/mach-pxa/trizeps4.c | 2 +-
> arch/arm/mach-pxa/viper.c | 2 +-
> arch/arm/mach-pxa/vpac270.c | 3 +--
> arch/arm/mach-pxa/xcep.c | 3 +--
> arch/arm/mach-pxa/z2.c | 3 +--
> arch/arm/mach-pxa/zeus.c | 3 +--
> arch/arm/mach-pxa/zylonite_pxa300.c | 2 +-
> drivers/i2c/busses/i2c-pxa.c | 16 ++--------------
> .../plat/i2c.h => include/linux/i2c/pxa-i2c.h | 1 +
> 38 files changed, 57 insertions(+), 58 deletions(-)
> create mode 100644 arch/arm/include/asm/pxa_i2c.h
> rename arch/arm/plat-pxa/include/plat/i2c.h => include/linux/i2c/pxa-i2c.h (99%)
>
> diff --git a/arch/arm/include/asm/pxa_i2c.h b/arch/arm/include/asm/pxa_i2c.h
> new file mode 100644
> index 0000000..f6da8a1
> --- /dev/null
> +++ b/arch/arm/include/asm/pxa_i2c.h
> @@ -0,0 +1,19 @@
> +#ifndef __ASM_PXA_I2C_H__
> +#define __ASM_PXA_I2C_H__
> +
> +/*
> + * I2C registers definitions
> + */
> +#define IBMR (0x00)
> +#define IDBR (0x04)
> +#define ICR (0x08)
> +#define ISR (0x0c)
> +#define ISAR (0x10)
> +
> +#define _IBMR(i2c) ((i2c)->reg_base + (IBMR << (i2c)->reg_shift))
> +#define _IDBR(i2c) ((i2c)->reg_base + (IDBR << (i2c)->reg_shift))
> +#define _ICR(i2c) ((i2c)->reg_base + (ICR << (i2c)->reg_shift))
> +#define _ISR(i2c) ((i2c)->reg_base + (ISR << (i2c)->reg_shift))
> +#define _ISAR(i2c) ((i2c)->reg_base + (ISAR << (i2c)->reg_shift))
> +
> +#endif
> diff --git a/arch/arm/mach-mmp/include/mach/mmp2.h b/arch/arm/mach-mmp/include/mach/mmp2.h
> index dbba6e8..95adfea 100644
> --- a/arch/arm/mach-mmp/include/mach/mmp2.h
> +++ b/arch/arm/mach-mmp/include/mach/mmp2.h
> @@ -9,8 +9,8 @@ extern void __init mmp2_init_irq(void);
> extern void mmp2_clear_pmic_int(void);
>
> #include <linux/i2c.h>
> +#include <linux/i2c/pxa-i2c.h>
> #include <mach/devices.h>
> -#include <plat/i2c.h>
Anyone an opinion on whther to alter all arch-arm machine includes
or add a re-direct of plat/i2c.h to linux/i2c/pxa-i2c.h
--
Ben
Q: What's a light-year?
A: One-third less calories than a regular year.
next prev parent reply other threads:[~2010-11-25 23:55 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-24 21:20 I2C support for Sodaville Sebastian Andrzej Siewior
2010-11-24 21:20 ` [PATCH 1/7] i2c/pxa2xx: Don't touch ISAR if not in slave mode Sebastian Andrzej Siewior
2010-11-25 23:52 ` Ben Dooks
2010-11-26 18:28 ` [sodaville] " Sebastian Andrzej Siewior
2010-11-24 21:20 ` [PATCH 2/7] arm/pxa2xx: reorganize I2C files Sebastian Andrzej Siewior
2010-11-25 23:55 ` Ben Dooks [this message]
2010-11-26 0:03 ` Russell King - ARM Linux
2010-11-26 14:11 ` Sebastian Andrzej Siewior
2010-11-24 21:20 ` [PATCH 3/7] i2c/pxa2xx: Add PCI support for PXA I2C controller Sebastian Andrzej Siewior
2010-11-25 23:59 ` Ben Dooks
2010-11-26 14:16 ` Sebastian Andrzej Siewior
2010-11-24 21:20 ` [PATCH 4/7] i2c/pxa2xx: add support for shared IRQ handler Sebastian Andrzej Siewior
2010-11-25 2:26 ` Haojian Zhuang
2010-11-25 10:48 ` Sebastian Andrzej Siewior
2010-11-24 21:20 ` [PATCH 5/7] i2c/pxa2xx: check timeout correctly Sebastian Andrzej Siewior
2010-11-24 21:20 ` [PATCH 6/7] i2c/pxa2xx: reset the chip if the bus is not free Sebastian Andrzej Siewior
2010-11-25 2:30 ` Haojian Zhuang
2010-11-25 2:49 ` Haojian Zhuang
2010-11-25 6:43 ` Igor Grinberg
2010-11-25 7:04 ` Haojian Zhuang
2010-11-25 12:24 ` Sebastian Andrzej Siewior
2010-11-25 13:10 ` Igor Grinberg
2010-11-25 13:39 ` Sebastian Andrzej Siewior
2010-11-24 21:20 ` [PATCH 7/7] i2c/pxa2xx: pass of_node from platform driver to adapter Sebastian Andrzej Siewior
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=20101125235520.GC15948@trinity.fluff.org \
--to=ben-i2c@fluff.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).