* [PATCH 1/1] I2C pxa fast mode (400khz) support
@ 2008-07-02 15:26 Jonathan Cameron
[not found] ` <486B9E30.80806-KWPb1pKIrIJaa/9Udqfwiw@public.gmane.org>
2008-07-10 13:31 ` [i2c] " Ben Dooks
0 siblings, 2 replies; 14+ messages in thread
From: Jonathan Cameron @ 2008-07-02 15:26 UTC (permalink / raw)
To: linux-arm-kernel, i2c
Add fast_mode option to i2c_pxa_platform_data and use it to set the ICR_FM bit
appropriately when i2c_pxa_reset is called. Parameter called fast_mode rather
than frequency as this driver is also used for the i2c_pxa_pwr bus which has
different normal and fast frequencies.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
---
drivers/i2c/busses/i2c-pxa.c | 4 +++-
include/asm-arm/arch-pxa/i2c.h | 1 +
include/asm-arm/arch-pxa/pxa-regs.h | 1 +
3 files changed, 5 insertions(+), 1 deletion(-)
--- a/include/asm-arm/arch-pxa/pxa-regs.h 2008-06-30 20:06:02.000000000 +0100
+++ b/include/asm-arm/arch-pxa/pxa-regs.h 2008-07-02 14:03:19.000000000 +0100
@@ -448,6 +448,7 @@
#define ICR_ALDIE (1 << 12) /* enable arbitration interrupt */
#define ICR_SADIE (1 << 13) /* slave address detected int enable */
#define ICR_UR (1 << 14) /* unit reset */
+#define ICR_FM (1 << 15) /* fast mode */
#define ISR_RWM (1 << 0) /* read/write mode */
#define ISR_ACKNAK (1 << 1) /* ack/nak status */
--- a/include/asm-arm/arch-pxa/i2c.h 2008-06-30 20:04:02.000000000 +0100
+++ b/include/asm-arm/arch-pxa/i2c.h 2008-07-02 13:59:59.000000000 +0100
@@ -66,6 +66,7 @@ struct i2c_pxa_platform_data {
struct i2c_slave_client *slave;
unsigned int class;
int use_pio;
+ int fast_mode;
};
extern void pxa_set_i2c_info(struct i2c_pxa_platform_data *info);
--- a/drivers/i2c/busses/i2c-pxa.c 2008-06-30 20:05:51.000000000 +0100
+++ b/drivers/i2c/busses/i2c-pxa.c 2008-07-02 15:50:31.000000000 +0100
@@ -67,6 +67,7 @@ struct pxa_i2c {
int irq;
int use_pio;
+ int fast_mode;
};
#define _IBMR(i2c) ((i2c)->reg_base + 0)
@@ -365,7 +366,7 @@ static void i2c_pxa_reset(struct pxa_i2c
writel(i2c->slave_addr, _ISAR(i2c));
/* set control register values */
- writel(I2C_ICR_INIT, _ICR(i2c));
+ writel(I2C_ICR_INIT | (i2c->fast_mode ? ICR_FM : 0), _ICR(i2c));
#ifdef CONFIG_I2C_PXA_SLAVE
dev_info(&i2c->adap.dev, "Enabling slave mode\n");
@@ -1041,6 +1042,7 @@ static int i2c_pxa_probe(struct platform
if (plat) {
i2c->adap.class = plat->class;
i2c->use_pio = plat->use_pio;
+ i2c->fast_mode = plat->fast_mode;
}
if (i2c->use_pio) {
-------------------------------------------------------------------
List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel
FAQ: http://www.arm.linux.org.uk/mailinglists/faq.php
Etiquette: http://www.arm.linux.org.uk/mailinglists/etiquette.php
^ permalink raw reply [flat|nested] 14+ messages in thread[parent not found: <486B9E30.80806-KWPb1pKIrIJaa/9Udqfwiw@public.gmane.org>]
* Re: [PATCH 1/1] I2C pxa fast mode (400khz) support [not found] ` <486B9E30.80806-KWPb1pKIrIJaa/9Udqfwiw@public.gmane.org> @ 2008-07-03 2:00 ` Eric Miao 2008-07-10 13:29 ` [i2c] " Ben Dooks 2008-07-09 16:48 ` Jean Delvare 1 sibling, 1 reply; 14+ messages in thread From: Eric Miao @ 2008-07-03 2:00 UTC (permalink / raw) To: Jonathan Cameron Cc: linux-arm-kernel-xIg/pKzrS19vn6HldHNs0ANdhmdF6hFW, i2c-GZX6beZjE8VD60Wz+7aTrA Jonathan Cameron wrote: > Add fast_mode option to i2c_pxa_platform_data and use it to set the ICR_FM bit > appropriately when i2c_pxa_reset is called. Parameter called fast_mode rather > than frequency as this driver is also used for the i2c_pxa_pwr bus which has > different normal and fast frequencies. Maybe we should convert that (as well as 'use_pio') to a bit field to save another byte. Otherwise looks OK to me. > > Signed-off-by: Jonathan Cameron <jic23-KWPb1pKIrIJaa/9Udqfwiw@public.gmane.org> > --- > drivers/i2c/busses/i2c-pxa.c | 4 +++- > include/asm-arm/arch-pxa/i2c.h | 1 + > include/asm-arm/arch-pxa/pxa-regs.h | 1 + > 3 files changed, 5 insertions(+), 1 deletion(-) > > --- a/include/asm-arm/arch-pxa/pxa-regs.h 2008-06-30 20:06:02.000000000 +0100 > +++ b/include/asm-arm/arch-pxa/pxa-regs.h 2008-07-02 14:03:19.000000000 +0100 > @@ -448,6 +448,7 @@ > #define ICR_ALDIE (1 << 12) /* enable arbitration interrupt */ > #define ICR_SADIE (1 << 13) /* slave address detected int enable */ > #define ICR_UR (1 << 14) /* unit reset */ > +#define ICR_FM (1 << 15) /* fast mode */ > > #define ISR_RWM (1 << 0) /* read/write mode */ > #define ISR_ACKNAK (1 << 1) /* ack/nak status */ > --- a/include/asm-arm/arch-pxa/i2c.h 2008-06-30 20:04:02.000000000 +0100 > +++ b/include/asm-arm/arch-pxa/i2c.h 2008-07-02 13:59:59.000000000 +0100 > @@ -66,6 +66,7 @@ struct i2c_pxa_platform_data { > struct i2c_slave_client *slave; > unsigned int class; > int use_pio; > + int fast_mode; > }; > > extern void pxa_set_i2c_info(struct i2c_pxa_platform_data *info); > --- a/drivers/i2c/busses/i2c-pxa.c 2008-06-30 20:05:51.000000000 +0100 > +++ b/drivers/i2c/busses/i2c-pxa.c 2008-07-02 15:50:31.000000000 +0100 > @@ -67,6 +67,7 @@ struct pxa_i2c { > > int irq; > int use_pio; > + int fast_mode; > }; > > #define _IBMR(i2c) ((i2c)->reg_base + 0) > @@ -365,7 +366,7 @@ static void i2c_pxa_reset(struct pxa_i2c > writel(i2c->slave_addr, _ISAR(i2c)); > > /* set control register values */ > - writel(I2C_ICR_INIT, _ICR(i2c)); > + writel(I2C_ICR_INIT | (i2c->fast_mode ? ICR_FM : 0), _ICR(i2c)); > > #ifdef CONFIG_I2C_PXA_SLAVE > dev_info(&i2c->adap.dev, "Enabling slave mode\n"); > @@ -1041,6 +1042,7 @@ static int i2c_pxa_probe(struct platform > if (plat) { > i2c->adap.class = plat->class; > i2c->use_pio = plat->use_pio; > + i2c->fast_mode = plat->fast_mode; > } > > if (i2c->use_pio) { > > > > _______________________________________________ > i2c mailing list > i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org > http://lists.lm-sensors.org/mailman/listinfo/i2c _______________________________________________ i2c mailing list i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org http://lists.lm-sensors.org/mailman/listinfo/i2c ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [i2c] [PATCH 1/1] I2C pxa fast mode (400khz) support 2008-07-03 2:00 ` Eric Miao @ 2008-07-10 13:29 ` Ben Dooks [not found] ` <20080710132956.GG30539-elnMNo+KYs3pIgCt6eIbzw@public.gmane.org> 0 siblings, 1 reply; 14+ messages in thread From: Ben Dooks @ 2008-07-10 13:29 UTC (permalink / raw) To: Eric Miao; +Cc: i2c, linux-arm-kernel On Thu, Jul 03, 2008 at 10:00:36AM +0800, Eric Miao wrote: > Jonathan Cameron wrote: > > Add fast_mode option to i2c_pxa_platform_data and use it to set the ICR_FM bit > > appropriately when i2c_pxa_reset is called. Parameter called fast_mode rather > > than frequency as this driver is also used for the i2c_pxa_pwr bus which has > > different normal and fast frequencies. > > Maybe we should convert that (as well as 'use_pio') to a bit field to save > another byte. I think use_pio and fast_mode could both be bits. > Otherwise looks OK to me. > > > > > Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> > > --- > > drivers/i2c/busses/i2c-pxa.c | 4 +++- > > include/asm-arm/arch-pxa/i2c.h | 1 + > > include/asm-arm/arch-pxa/pxa-regs.h | 1 + > > 3 files changed, 5 insertions(+), 1 deletion(-) > > > > --- a/include/asm-arm/arch-pxa/pxa-regs.h 2008-06-30 20:06:02.000000000 +0100 > > +++ b/include/asm-arm/arch-pxa/pxa-regs.h 2008-07-02 14:03:19.000000000 +0100 > > @@ -448,6 +448,7 @@ > > #define ICR_ALDIE (1 << 12) /* enable arbitration interrupt */ > > #define ICR_SADIE (1 << 13) /* slave address detected int enable */ > > #define ICR_UR (1 << 14) /* unit reset */ > > +#define ICR_FM (1 << 15) /* fast mode */ > > > > #define ISR_RWM (1 << 0) /* read/write mode */ > > #define ISR_ACKNAK (1 << 1) /* ack/nak status */ > > --- a/include/asm-arm/arch-pxa/i2c.h 2008-06-30 20:04:02.000000000 +0100 > > +++ b/include/asm-arm/arch-pxa/i2c.h 2008-07-02 13:59:59.000000000 +0100 > > @@ -66,6 +66,7 @@ struct i2c_pxa_platform_data { > > struct i2c_slave_client *slave; > > unsigned int class; > > int use_pio; > > + int fast_mode; > > }; > > > > extern void pxa_set_i2c_info(struct i2c_pxa_platform_data *info); > > --- a/drivers/i2c/busses/i2c-pxa.c 2008-06-30 20:05:51.000000000 +0100 > > +++ b/drivers/i2c/busses/i2c-pxa.c 2008-07-02 15:50:31.000000000 +0100 > > @@ -67,6 +67,7 @@ struct pxa_i2c { > > > > int irq; > > int use_pio; > > + int fast_mode; > > }; > > > > #define _IBMR(i2c) ((i2c)->reg_base + 0) > > @@ -365,7 +366,7 @@ static void i2c_pxa_reset(struct pxa_i2c > > writel(i2c->slave_addr, _ISAR(i2c)); > > > > /* set control register values */ > > - writel(I2C_ICR_INIT, _ICR(i2c)); > > + writel(I2C_ICR_INIT | (i2c->fast_mode ? ICR_FM : 0), _ICR(i2c)); > > > > #ifdef CONFIG_I2C_PXA_SLAVE > > dev_info(&i2c->adap.dev, "Enabling slave mode\n"); > > @@ -1041,6 +1042,7 @@ static int i2c_pxa_probe(struct platform > > if (plat) { > > i2c->adap.class = plat->class; > > i2c->use_pio = plat->use_pio; > > + i2c->fast_mode = plat->fast_mode; > > } > > > > if (i2c->use_pio) { > > > > > > > > _______________________________________________ > > i2c mailing list > > i2c@lm-sensors.org > > http://lists.lm-sensors.org/mailman/listinfo/i2c > > > _______________________________________________ > i2c mailing list > i2c@lm-sensors.org > http://lists.lm-sensors.org/mailman/listinfo/i2c -- Ben (ben@fluff.org, http://www.fluff.org/) 'a smiley only costs 4 bytes' ------------------------------------------------------------------- List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel FAQ: http://www.arm.linux.org.uk/mailinglists/faq.php Etiquette: http://www.arm.linux.org.uk/mailinglists/etiquette.php ^ permalink raw reply [flat|nested] 14+ messages in thread
[parent not found: <20080710132956.GG30539-elnMNo+KYs3pIgCt6eIbzw@public.gmane.org>]
* Re: [PATCH 1/1] I2C pxa fast mode (400khz) support [not found] ` <20080710132956.GG30539-elnMNo+KYs3pIgCt6eIbzw@public.gmane.org> @ 2008-07-12 2:20 ` David Brownell [not found] ` <200807111920.29739.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org> 0 siblings, 1 reply; 14+ messages in thread From: David Brownell @ 2008-07-12 2:20 UTC (permalink / raw) To: Ben Dooks Cc: linux-arm-kernel-xIg/pKzrS19vn6HldHNs0ANdhmdF6hFW, i2c-GZX6beZjE8VD60Wz+7aTrA On Thursday 10 July 2008, Ben Dooks wrote: > On Thu, Jul 03, 2008 at 10:00:36AM +0800, Eric Miao wrote: > > Jonathan Cameron wrote: > > > Add fast_mode option to i2c_pxa_platform_data and use it to set the ICR_FM bit > > > appropriately when i2c_pxa_reset is called. Parameter called fast_mode rather > > > than frequency as this driver is also used for the i2c_pxa_pwr bus which has > > > different normal and fast frequencies. > > > > Maybe we should convert that (as well as 'use_pio') to a bit field to save > > another byte. > > I think use_pio and fast_mode could both be bits. Or alternatively, "bool" ... which is usually a byte, and on ARM will let GCC eliminate a comparision instruction. Just load byte and branch on zero/nonzero, vs needing one more instruction. (In odd cases, it can be more important to conserve the extra seven bits.) _______________________________________________ i2c mailing list i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org http://lists.lm-sensors.org/mailman/listinfo/i2c ^ permalink raw reply [flat|nested] 14+ messages in thread
[parent not found: <200807111920.29739.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>]
* Re: [PATCH 1/1] I2C pxa fast mode (400khz) support [not found] ` <200807111920.29739.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org> @ 2008-07-12 21:02 ` Troy Kisky [not found] ` <48791BF8.8080500-Q5RJGjKts06CY9SHAMCTRUEOCMrvLtNR@public.gmane.org> 0 siblings, 1 reply; 14+ messages in thread From: Troy Kisky @ 2008-07-12 21:02 UTC (permalink / raw) To: David Brownell Cc: linux-arm-kernel-xIg/pKzrS19vn6HldHNs0ANdhmdF6hFW, Ben Dooks, i2c-GZX6beZjE8VD60Wz+7aTrA David Brownell wrote: > On Thursday 10 July 2008, Ben Dooks wrote: >> On Thu, Jul 03, 2008 at 10:00:36AM +0800, Eric Miao wrote: >>> Jonathan Cameron wrote: >>>> Add fast_mode option to i2c_pxa_platform_data and use it to set the ICR_FM bit >>>> appropriately when i2c_pxa_reset is called. Parameter called fast_mode rather >>>> than frequency as this driver is also used for the i2c_pxa_pwr bus which has >>>> different normal and fast frequencies. >>> Maybe we should convert that (as well as 'use_pio') to a bit field to save >>> another byte. >> I think use_pio and fast_mode could both be bits. > > Or alternatively, "bool" ... which is usually a byte, and > on ARM will let GCC eliminate a comparision instruction. > Just load byte and branch on zero/nonzero, vs needing one > more instruction. Unfortunately, on ARM the LDR/LDRB instructions can not update the condition codes. _______________________________________________ i2c mailing list i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org http://lists.lm-sensors.org/mailman/listinfo/i2c ^ permalink raw reply [flat|nested] 14+ messages in thread
[parent not found: <48791BF8.8080500-Q5RJGjKts06CY9SHAMCTRUEOCMrvLtNR@public.gmane.org>]
* Re: [PATCH 1/1] I2C pxa fast mode (400khz) support [not found] ` <48791BF8.8080500-Q5RJGjKts06CY9SHAMCTRUEOCMrvLtNR@public.gmane.org> @ 2008-07-12 21:35 ` David Brownell 0 siblings, 0 replies; 14+ messages in thread From: David Brownell @ 2008-07-12 21:35 UTC (permalink / raw) To: Troy Kisky Cc: linux-arm-kernel-xIg/pKzrS19vn6HldHNs0ANdhmdF6hFW, Ben Dooks, i2c-GZX6beZjE8VD60Wz+7aTrA > >> I think use_pio and fast_mode could both be bits. > > > > Or alternatively, "bool" ... which is usually a byte, and > > on ARM will let GCC eliminate a comparision instruction. > > Just load byte and branch on zero/nonzero, vs needing one > > more instruction. > > Unfortunately, on ARM the LDR/LDRB instructions can not > update the condition codes. Right, sorry -- I was looking at MOV not LDRB. I don't use assembler often enough to remember that little asymmetry: data movement involving memory uses different notations and instructions. If only the instruction set were as regular as a PDP-11 ... ;) _______________________________________________ i2c mailing list i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org http://lists.lm-sensors.org/mailman/listinfo/i2c ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 1/1] I2C pxa fast mode (400khz) support [not found] ` <486B9E30.80806-KWPb1pKIrIJaa/9Udqfwiw@public.gmane.org> 2008-07-03 2:00 ` Eric Miao @ 2008-07-09 16:48 ` Jean Delvare 1 sibling, 0 replies; 14+ messages in thread From: Jean Delvare @ 2008-07-09 16:48 UTC (permalink / raw) To: Jonathan Cameron, Ben Dooks Cc: linux-arm-kernel-xIg/pKzrS19vn6HldHNs0ANdhmdF6hFW, i2c-GZX6beZjE8VD60Wz+7aTrA On Wed, 02 Jul 2008 16:26:40 +0100, Jonathan Cameron wrote: > Add fast_mode option to i2c_pxa_platform_data and use it to set the ICR_FM bit > appropriately when i2c_pxa_reset is called. Parameter called fast_mode rather > than frequency as this driver is also used for the i2c_pxa_pwr bus which has > different normal and fast frequencies. > > Signed-off-by: Jonathan Cameron <jic23-KWPb1pKIrIJaa/9Udqfwiw@public.gmane.org> > --- > drivers/i2c/busses/i2c-pxa.c | 4 +++- > include/asm-arm/arch-pxa/i2c.h | 1 + > include/asm-arm/arch-pxa/pxa-regs.h | 1 + > 3 files changed, 5 insertions(+), 1 deletion(-) > > --- a/include/asm-arm/arch-pxa/pxa-regs.h 2008-06-30 20:06:02.000000000 +0100 > +++ b/include/asm-arm/arch-pxa/pxa-regs.h 2008-07-02 14:03:19.000000000 +0100 > @@ -448,6 +448,7 @@ > #define ICR_ALDIE (1 << 12) /* enable arbitration interrupt */ > #define ICR_SADIE (1 << 13) /* slave address detected int enable */ > #define ICR_UR (1 << 14) /* unit reset */ > +#define ICR_FM (1 << 15) /* fast mode */ > > #define ISR_RWM (1 << 0) /* read/write mode */ > #define ISR_ACKNAK (1 << 1) /* ack/nak status */ > --- a/include/asm-arm/arch-pxa/i2c.h 2008-06-30 20:04:02.000000000 +0100 > +++ b/include/asm-arm/arch-pxa/i2c.h 2008-07-02 13:59:59.000000000 +0100 > @@ -66,6 +66,7 @@ struct i2c_pxa_platform_data { > struct i2c_slave_client *slave; > unsigned int class; > int use_pio; > + int fast_mode; > }; > > extern void pxa_set_i2c_info(struct i2c_pxa_platform_data *info); > --- a/drivers/i2c/busses/i2c-pxa.c 2008-06-30 20:05:51.000000000 +0100 > +++ b/drivers/i2c/busses/i2c-pxa.c 2008-07-02 15:50:31.000000000 +0100 > @@ -67,6 +67,7 @@ struct pxa_i2c { > > int irq; > int use_pio; > + int fast_mode; > }; > > #define _IBMR(i2c) ((i2c)->reg_base + 0) > @@ -365,7 +366,7 @@ static void i2c_pxa_reset(struct pxa_i2c > writel(i2c->slave_addr, _ISAR(i2c)); > > /* set control register values */ > - writel(I2C_ICR_INIT, _ICR(i2c)); > + writel(I2C_ICR_INIT | (i2c->fast_mode ? ICR_FM : 0), _ICR(i2c)); > > #ifdef CONFIG_I2C_PXA_SLAVE > dev_info(&i2c->adap.dev, "Enabling slave mode\n"); > @@ -1041,6 +1042,7 @@ static int i2c_pxa_probe(struct platform > if (plat) { > i2c->adap.class = plat->class; > i2c->use_pio = plat->use_pio; > + i2c->fast_mode = plat->fast_mode; > } > > if (i2c->use_pio) { Patch looks OK to me. Ben, i2c-pxa is embedded so this is something for you. -- Jean Delvare _______________________________________________ i2c mailing list i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org http://lists.lm-sensors.org/mailman/listinfo/i2c ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [i2c] [PATCH 1/1] I2C pxa fast mode (400khz) support 2008-07-02 15:26 [PATCH 1/1] I2C pxa fast mode (400khz) support Jonathan Cameron [not found] ` <486B9E30.80806-KWPb1pKIrIJaa/9Udqfwiw@public.gmane.org> @ 2008-07-10 13:31 ` Ben Dooks [not found] ` <20080710133150.GH30539-elnMNo+KYs3pIgCt6eIbzw@public.gmane.org> 1 sibling, 1 reply; 14+ messages in thread From: Ben Dooks @ 2008-07-10 13:31 UTC (permalink / raw) To: Jonathan Cameron; +Cc: linux-arm-kernel, i2c On Wed, Jul 02, 2008 at 04:26:40PM +0100, Jonathan Cameron wrote: > Add fast_mode option to i2c_pxa_platform_data and use it to set the ICR_FM bit > appropriately when i2c_pxa_reset is called. Parameter called fast_mode rather > than frequency as this driver is also used for the i2c_pxa_pwr bus which has > different normal and fast frequencies. > > Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Unfortuantely due to the problem of all the registers in one place, this really will need to be applied by RMK. However due to the current amount of work in the PXA tree, and the number of patches he is carrying for merging this is going to be too late for this kernel merge. I would like to see the pxa-regs.h split up further so that subsystems can issue patches to it without causing problems for Russell... I will bring this up for the next round of development. -- Ben (ben@fluff.org, http://www.fluff.org/) 'a smiley only costs 4 bytes' ------------------------------------------------------------------- List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel FAQ: http://www.arm.linux.org.uk/mailinglists/faq.php Etiquette: http://www.arm.linux.org.uk/mailinglists/etiquette.php ^ permalink raw reply [flat|nested] 14+ messages in thread
[parent not found: <20080710133150.GH30539-elnMNo+KYs3pIgCt6eIbzw@public.gmane.org>]
* Re: [PATCH 1/1] I2C pxa fast mode (400khz) support [not found] ` <20080710133150.GH30539-elnMNo+KYs3pIgCt6eIbzw@public.gmane.org> @ 2008-07-10 13:48 ` eric miao 2008-07-13 15:40 ` [i2c] " Jonathan Cameron 0 siblings, 1 reply; 14+ messages in thread From: eric miao @ 2008-07-10 13:48 UTC (permalink / raw) To: Ben Dooks Cc: i2c-GZX6beZjE8VD60Wz+7aTrA, linux-arm-kernel-xIg/pKzrS19vn6HldHNs0ANdhmdF6hFW On Thu, Jul 10, 2008 at 9:31 PM, Ben Dooks <ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org> wrote: > On Wed, Jul 02, 2008 at 04:26:40PM +0100, Jonathan Cameron wrote: >> Add fast_mode option to i2c_pxa_platform_data and use it to set the ICR_FM bit >> appropriately when i2c_pxa_reset is called. Parameter called fast_mode rather >> than frequency as this driver is also used for the i2c_pxa_pwr bus which has >> different normal and fast frequencies. >> >> Signed-off-by: Jonathan Cameron <jic23-KWPb1pKIrIJaa/9Udqfwiw@public.gmane.org> > > Unfortuantely due to the problem of all the registers in > one place, this really will need to be applied by RMK. However > due to the current amount of work in the PXA tree, and the > number of patches he is carrying for merging this is going > to be too late for this kernel merge. > Actually, this round of separation work of the pxa-regs.h has been done several weeks ago, so I don't see this patch is likely to cause any merge conflict. But Russell is going to freeze the pxa branch, I see little chance this be fixed quickly and get into :( -- Cheers - eric _______________________________________________ i2c mailing list i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org http://lists.lm-sensors.org/mailman/listinfo/i2c ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [i2c] [PATCH 1/1] I2C pxa fast mode (400khz) support 2008-07-10 13:48 ` eric miao @ 2008-07-13 15:40 ` Jonathan Cameron 2008-07-15 9:43 ` Ben Dooks 0 siblings, 1 reply; 14+ messages in thread From: Jonathan Cameron @ 2008-07-13 15:40 UTC (permalink / raw) To: eric miao; +Cc: linux-arm-kernel, Ben Dooks, i2c eric miao wrote: > On Thu, Jul 10, 2008 at 9:31 PM, Ben Dooks <ben-linux@fluff.org> wrote: >> On Wed, Jul 02, 2008 at 04:26:40PM +0100, Jonathan Cameron wrote: >>> Add fast_mode option to i2c_pxa_platform_data and use it to set the ICR_FM bit >>> appropriately when i2c_pxa_reset is called. Parameter called fast_mode rather >>> than frequency as this driver is also used for the i2c_pxa_pwr bus which has >>> different normal and fast frequencies. >>> >>> Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> >> Unfortuantely due to the problem of all the registers in >> one place, this really will need to be applied by RMK. However >> due to the current amount of work in the PXA tree, and the >> number of patches he is carrying for merging this is going >> to be too late for this kernel merge. >> > > Actually, this round of separation work of the pxa-regs.h has been > done several weeks ago, so I don't see this patch is likely to > cause any merge conflict. > > But Russell is going to freeze the pxa branch, I see little chance > this be fixed quickly and get into :( > Dear all, thanks for the comments. I'll switch the use_pio and fast_mode flags to bit fields and resend when next kernel merge begins. As I'm maintaining rather a lot of platform specific stuff anyway for my use, one more won't do any harm for a few weeks! Cheers, -- Jonathan Cameron ------------------------------------------------------------------- List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel FAQ: http://www.arm.linux.org.uk/mailinglists/faq.php Etiquette: http://www.arm.linux.org.uk/mailinglists/etiquette.php ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [i2c] [PATCH 1/1] I2C pxa fast mode (400khz) support 2008-07-13 15:40 ` [i2c] " Jonathan Cameron @ 2008-07-15 9:43 ` Ben Dooks 2008-07-15 9:54 ` Russell King - ARM Linux 0 siblings, 1 reply; 14+ messages in thread From: Ben Dooks @ 2008-07-15 9:43 UTC (permalink / raw) To: Jonathan Cameron; +Cc: linux-arm-kernel, Ben Dooks, i2c On Sun, Jul 13, 2008 at 04:40:27PM +0100, Jonathan Cameron wrote: > eric miao wrote: > > On Thu, Jul 10, 2008 at 9:31 PM, Ben Dooks <ben-linux@fluff.org> wrote: > >> On Wed, Jul 02, 2008 at 04:26:40PM +0100, Jonathan Cameron wrote: > >>> Add fast_mode option to i2c_pxa_platform_data and use it to set the ICR_FM bit > >>> appropriately when i2c_pxa_reset is called. Parameter called fast_mode rather > >>> than frequency as this driver is also used for the i2c_pxa_pwr bus which has > >>> different normal and fast frequencies. > >>> > >>> Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> > >> Unfortuantely due to the problem of all the registers in > >> one place, this really will need to be applied by RMK. However > >> due to the current amount of work in the PXA tree, and the > >> number of patches he is carrying for merging this is going > >> to be too late for this kernel merge. > >> > > > > Actually, this round of separation work of the pxa-regs.h has been > > done several weeks ago, so I don't see this patch is likely to > > cause any merge conflict. > > > > But Russell is going to freeze the pxa branch, I see little chance > > this be fixed quickly and get into :( > > > Dear all, thanks for the comments. > > I'll switch the use_pio and fast_mode flags to bit fields and resend > when next kernel merge begins. > > As I'm maintaining rather a lot of platform specific stuff anyway for > my use, one more won't do any harm for a few weeks! I think most of RMK's pxa tree has been merged, so a diff against a current -git release should give you a better starting point. -- Ben (ben@fluff.org, http://www.fluff.org/) 'a smiley only costs 4 bytes' ------------------------------------------------------------------- List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel FAQ: http://www.arm.linux.org.uk/mailinglists/faq.php Etiquette: http://www.arm.linux.org.uk/mailinglists/etiquette.php ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [i2c] [PATCH 1/1] I2C pxa fast mode (400khz) support 2008-07-15 9:43 ` Ben Dooks @ 2008-07-15 9:54 ` Russell King - ARM Linux 2008-07-15 10:37 ` Uwe Kleine-König 0 siblings, 1 reply; 14+ messages in thread From: Russell King - ARM Linux @ 2008-07-15 9:54 UTC (permalink / raw) To: Ben Dooks; +Cc: i2c, linux-arm-kernel On Tue, Jul 15, 2008 at 10:43:24AM +0100, Ben Dooks wrote: > I think most of RMK's pxa tree has been merged, so a diff > against a current -git release should give you a better > starting point. There's still around 300K of PXA stuff outstanding - but unfortunately I can't update the 'nightly' snapshots with the outstanding commits because I can't get a reasonable patch out of git: $ git-diff -u master...pxa |less diff --cc MAINTAINERS index 1528e58,8f0ec46,c68a118..20aef95 --- a/MAINTAINERS +++ b/MAINTAINERS @@@@ -481,11 -475,11 -475,11 +475,28 @@@@ M: kernel@wantstofly.or L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only) S: Maintained +++ARM/COMPULAB CM-X270/EM-X270 MACHINE SUPPORT +++P: Mike Rapoport +++M: mike@compulab.co.il +++L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only) +++S: Maintained +++ This is basically because 'master...pxa' has multiple common ancestors. You can get a diff from 'master..pxa' but that will be a patch which removes changes in master but not pxa, and applies changes in pxa but not master, which isn't useful. Of course, those with git can get the full tree and there isn't a problem moving through the history... those using the patches, however, are going to be facing a problem for the time being. ------------------------------------------------------------------- List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel FAQ: http://www.arm.linux.org.uk/mailinglists/faq.php Etiquette: http://www.arm.linux.org.uk/mailinglists/etiquette.php ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [i2c] [PATCH 1/1] I2C pxa fast mode (400khz) support 2008-07-15 9:54 ` Russell King - ARM Linux @ 2008-07-15 10:37 ` Uwe Kleine-König 2008-07-15 10:51 ` Russell King - ARM Linux 0 siblings, 1 reply; 14+ messages in thread From: Uwe Kleine-König @ 2008-07-15 10:37 UTC (permalink / raw) To: Russell King - ARM Linux Cc: i2c@lm-sensors.org, Ben Dooks, linux-arm-kernel@lists.arm.linux.org.uk Hi Russell, Russell King - ARM Linux wrote: > On Tue, Jul 15, 2008 at 10:43:24AM +0100, Ben Dooks wrote: > > I think most of RMK's pxa tree has been merged, so a diff > > against a current -git release should give you a better > > starting point. > > There's still around 300K of PXA stuff outstanding - but unfortunately > I can't update the 'nightly' snapshots with the outstanding commits > because I can't get a reasonable patch out of git: > > $ git-diff -u master...pxa |less > diff --cc MAINTAINERS > index 1528e58,8f0ec46,c68a118..20aef95 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@@@ -481,11 -475,11 -475,11 +475,28 @@@@ M: kernel@wantstofly.or > L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only) > S: Maintained > > +++ARM/COMPULAB CM-X270/EM-X270 MACHINE SUPPORT > +++P: Mike Rapoport > +++M: mike@compulab.co.il > +++L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only) > +++S: Maintained > +++ > > This is basically because 'master...pxa' has multiple common ancestors. Hm, I don't see that with your current tree: ukleinek@zentaur:~/gsrc/linux-2.6$ git merge-base --all rmk/pxa rmk/master 543cf4cb3fe6f6cae3651ba918b9c56200b257d0 and so git-diff -u rmk/master...rmk/pxa looks good here, too. Anyway, IIRC you can apply the above patch with git-apply, didn't test it though. And if you don't want the people having to rely on git, you still can merge master and pxa and provide a diff between some fixed base and the merge result. (Or provide two patches and let the others do the merge.) Best regards Uwe -- Uwe Kleine-König, Software Engineer Digi International GmbH Branch Breisach, Küferstrasse 8, 79206 Breisach, Germany Tax: 315/5781/0242 / VAT: DE153662976 / Reg. Amtsgericht Dortmund HRB 13962 ------------------------------------------------------------------- List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel FAQ: http://www.arm.linux.org.uk/mailinglists/faq.php Etiquette: http://www.arm.linux.org.uk/mailinglists/etiquette.php ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [i2c] [PATCH 1/1] I2C pxa fast mode (400khz) support 2008-07-15 10:37 ` Uwe Kleine-König @ 2008-07-15 10:51 ` Russell King - ARM Linux 0 siblings, 0 replies; 14+ messages in thread From: Russell King - ARM Linux @ 2008-07-15 10:51 UTC (permalink / raw) To: Uwe Kleine-König Cc: i2c@lm-sensors.org, Ben Dooks, linux-arm-kernel@lists.arm.linux.org.uk On Tue, Jul 15, 2008 at 12:37:25PM +0200, Uwe Kleine-König wrote: > Hm, I don't see that with your current tree: > > ukleinek@zentaur:~/gsrc/linux-2.6$ git merge-base --all rmk/pxa rmk/master > 543cf4cb3fe6f6cae3651ba918b9c56200b257d0 That's because you're not looking at the right master. My master branch is now Linus' tip, but I'm not pushing that update out because my scripts will also push out the patch and mbox files (which, because of this, for PXA and devel will be empty.) I fully understand why this happens, it's just annoying when it does that we lose the ability to have a nice clean patch. It'll all resolve itself in the fullness of time (iow, after the SPI tree has been merged followed by the remainder of the PXA tree.) ------------------------------------------------------------------- List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel FAQ: http://www.arm.linux.org.uk/mailinglists/faq.php Etiquette: http://www.arm.linux.org.uk/mailinglists/etiquette.php ^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2008-07-15 10:51 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-02 15:26 [PATCH 1/1] I2C pxa fast mode (400khz) support Jonathan Cameron
[not found] ` <486B9E30.80806-KWPb1pKIrIJaa/9Udqfwiw@public.gmane.org>
2008-07-03 2:00 ` Eric Miao
2008-07-10 13:29 ` [i2c] " Ben Dooks
[not found] ` <20080710132956.GG30539-elnMNo+KYs3pIgCt6eIbzw@public.gmane.org>
2008-07-12 2:20 ` David Brownell
[not found] ` <200807111920.29739.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
2008-07-12 21:02 ` Troy Kisky
[not found] ` <48791BF8.8080500-Q5RJGjKts06CY9SHAMCTRUEOCMrvLtNR@public.gmane.org>
2008-07-12 21:35 ` David Brownell
2008-07-09 16:48 ` Jean Delvare
2008-07-10 13:31 ` [i2c] " Ben Dooks
[not found] ` <20080710133150.GH30539-elnMNo+KYs3pIgCt6eIbzw@public.gmane.org>
2008-07-10 13:48 ` eric miao
2008-07-13 15:40 ` [i2c] " Jonathan Cameron
2008-07-15 9:43 ` Ben Dooks
2008-07-15 9:54 ` Russell King - ARM Linux
2008-07-15 10:37 ` Uwe Kleine-König
2008-07-15 10:51 ` Russell King - ARM Linux
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox