From: Heiko Schocher <hs@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] arm, i2c: added support for the TWSI I2C Interface
Date: Thu, 16 Jul 2009 12:03:34 +0200 [thread overview]
Message-ID: <4A5EFAF6.7060205@denx.de> (raw)
In-Reply-To: <73173D32E9439E4ABB5151606C3E19E202DDF26F91@SC-VEXCH1.marvell.com>
Hello Prafulla,
Prafulla Wadaskar wrote:
>> -----Original Message-----
>> From: Heiko Schocher [mailto:hs at denx.de]
>> Sent: Thursday, July 16, 2009 1:31 PM
>> To: Jean-Christophe PLAGNIOL-VILLARD; Prafulla Wadaskar
>> Cc: U-Boot user list
>> Subject: arm, i2c: added support for the TWSI I2C Interface
>>
>> added support for the Hardware I2C TWSI Interface on
>> kirkwood SOCs, based on the Linux driver, without IRQ
>> support.
>>
>> Tested on a ARM926EJS (CPU Core Version FEROCEON_88FR131
>> SOC Family: KIRKWOOD, KW88F6281) based suen3 board
>>
>> Signed-off-by: Heiko Schocher <hs@denx.de>
>> ---
>> drivers/i2c/Makefile | 1 +
>> drivers/i2c/mv64xxx-i2c.c | 452
> Can you rename this?
Of course, what name do you prefer?
>> +++++++++++++++++++++++++++++++++++++++++++++
>> 2 files changed, 453 insertions(+), 0 deletions(-)
>> create mode 100644 drivers/i2c/mv64xxx-i2c.c
>>
>> diff --git a/drivers/i2c/Makefile b/drivers/i2c/Makefile
>> index ef32f13..ce30111 100644
>> --- a/drivers/i2c/Makefile
>> +++ b/drivers/i2c/Makefile
>> @@ -33,6 +33,7 @@ COBJS-$(CONFIG_DRIVER_OMAP1510_I2C) +=
>> omap1510_i2c.o
>> COBJS-$(CONFIG_DRIVER_OMAP24XX_I2C) += omap24xx_i2c.o
>> COBJS-$(CONFIG_DRIVER_OMAP34XX_I2C) += omap24xx_i2c.o
>> COBJS-$(CONFIG_DRIVER_S3C24X0_I2C) += s3c24x0_i2c.o
>> +COBJS-$(CONFIG_I2C_MV64xxx) += mv64xxx-i2c.o
> Put this in order
What do you mean?
>> COBJS-$(CONFIG_S3C44B0_I2C) += s3c44b0_i2c.o
>> COBJS-$(CONFIG_SOFT_I2C) += soft_i2c.o
>> COBJS-$(CONFIG_TSI108_I2C) += tsi108_i2c.o
>> diff --git a/drivers/i2c/mv64xxx-i2c.c b/drivers/i2c/mv64xxx-i2c.c
>> new file mode 100644
>> index 0000000..6ba2782
>> --- /dev/null
>> +++ b/drivers/i2c/mv64xxx-i2c.c
>> @@ -0,0 +1,452 @@
>> +/*
>> + * Driver for the i2c controller on the Marvell line of host bridges
>> + * (e.g, gt642[46]0, mv643[46]0, mv644[46]0, and Orion SoC family).
> Pls add kirkwood too..
OK.
>> + *
>> + * Based on:
>> + * Author: Mark A. Greer <mgreer@mvista.com>
>> + *
>> + * 2005 (c) MontaVista, Software, Inc. This file is licensed under
>> + * the terms of the GNU General Public License version 2.
>> This program
>> + * is licensed "as is" without any warranty of any kind,
>> whether express
>> + * or implied.
>> + *
>> + * ported from Linux to u-boot
>> + * (C) Copyright 2009
>> + * Heiko Schocher, DENX Software Engineering, hs at denx.de.
>> + *
>> + */
>> +#include <common.h>
>> +#include <i2c.h>
>> +#include <asm/arch/kirkwood.h>
>> +#include <asm/errno.h>
>> +#include <asm/io.h>
>> +
>> +DECLARE_GLOBAL_DATA_PTR;
>> +
>> +static unsigned int i2c_bus_num __attribute__ ((section
>> (".data"))) = 0;
>> +#if defined(CONFIG_I2C_MUX)
>> +static unsigned int i2c_bus_num_mux __attribute__ ((section
>> ("data"))) = 0;
>> +#endif
>> +
>> +/* Register defines */
>> +#define MV64XXX_I2C_REG_SLAVE_ADDR 0x00
>> +#define MV64XXX_I2C_REG_DATA 0x04
> MV64XX does not sound generic supported SoCs,
> Can you choose better name? like TWSI.
Ah, OK. Used the names from the Linux driver. So I think above define
for selecting this drivers should be something like that:
CONFIG_DRIVER_I2C_TWSI ... (I vote for using CONFIG_DRIVER_I2C_ for
new drivers and maybe I find some time renaming the existing drivers to
this format...)
and replace MV64xxx with TWSI ... right?
> I will go through in details latter on
OK, thanks in advance.
bye
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
next prev parent reply other threads:[~2009-07-16 10:03 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-16 8:01 [U-Boot] arm, i2c: added support for the TWSI I2C Interface Heiko Schocher
2009-07-16 8:52 ` Prafulla Wadaskar
2009-07-16 10:03 ` Heiko Schocher [this message]
2009-07-16 10:06 ` Prafulla Wadaskar
2009-07-16 10:17 ` Heiko Schocher
2009-07-16 10:19 ` Prafulla Wadaskar
2009-07-16 11:09 ` Heiko Schocher
2009-07-18 10:55 ` Jean-Christophe PLAGNIOL-VILLARD
2009-07-18 12:42 ` Wolfgang Denk
2009-07-18 12:54 ` Heiko Schocher
2009-07-18 12:57 ` Wolfgang Denk
2009-07-18 13:21 ` Heiko Schocher
2009-07-18 13:50 ` Wolfgang Denk
2009-07-19 5:52 ` Heiko Schocher
2009-07-20 7:59 ` [U-Boot] [PATCH v3] " Heiko Schocher
2009-07-22 21:46 ` Jean-Christophe PLAGNIOL-VILLARD
2009-07-23 5:09 ` Prafulla Wadaskar
2009-07-28 7:31 ` Heiko Schocher
2009-07-18 10:56 ` [U-Boot] [PATCH] i2c: use for CONFIGs a common naming convention CONFIG_I2C Jean-Christophe PLAGNIOL-VILLARD
2009-07-18 12:49 ` Wolfgang Denk
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=4A5EFAF6.7060205@denx.de \
--to=hs@denx.de \
--cc=u-boot@lists.denx.de \
/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.