* [U-Boot] [PATCH 3/4] ZOOM2 Add power reset button
2009-06-10 12:53 ` [U-Boot] [PATCH 2/4] I2C Add initial support for TWL4030 Tom Rix
@ 2009-06-10 12:53 ` Tom Rix
2009-06-10 12:53 ` [U-Boot] [PATCH 4/4] ZOOM1 " Tom Rix
` (2 more replies)
2009-06-10 14:46 ` [U-Boot] [PATCH 2/4] I2C Add initial support for TWL4030 Menon, Nishanth
` (2 subsequent siblings)
3 siblings, 3 replies; 44+ messages in thread
From: Tom Rix @ 2009-06-10 12:53 UTC (permalink / raw)
To: u-boot
The power reset button is on the top right side of the main board.
Press and hold for about to 8 seconds to completely reset the board.
Some of the beta boards have a hardware problem that prevents
using this feature. If is difficult to further characterize the
boards that fail. So disable resetting for all beta boards.
Signed-off-by: Tom Rix <Tom.Rix@windriver.com>
---
board/omap3/zoom2/zoom2.c | 13 +++++++++++++
drivers/i2c/twl4030_i2c.c | 22 ++++++++++++++++++++++
include/configs/omap3_zoom2.h | 1 +
include/twl4030.h | 10 ++++++++++
4 files changed, 46 insertions(+), 0 deletions(-)
diff --git a/board/omap3/zoom2/zoom2.c b/board/omap3/zoom2/zoom2.c
index 08fdafb..d5da920 100644
--- a/board/omap3/zoom2/zoom2.c
+++ b/board/omap3/zoom2/zoom2.c
@@ -32,6 +32,7 @@
#ifdef CONFIG_STATUS_LED
#include <status_led.h>
#endif
+#include <twl4030.h>
#include <asm/io.h>
#include <asm/arch/gpio.h>
#include <asm/arch/mem.h>
@@ -141,6 +142,18 @@ int board_init (void)
/* boot param addr */
gd->bd->bi_boot_params = (OMAP34XX_SDRC_CS0 + 0x100);
+ /*
+ * Board Reset
+ * The board is reset by holding the the large button
+ * on the top right side of the main board for
+ * eight seconds.
+ *
+ * There are reported problems of some beta boards
+ * continously resetting. For those boards, disable resetting.
+ */
+ if (ZOOM2_REVISION_PRODUCTION <= zoom2_get_revision())
+ twl4030_power_reset_init();
+
#if defined(CONFIG_STATUS_LED) && defined(STATUS_LED_BOOT)
status_led_set (STATUS_LED_BOOT, STATUS_LED_ON);
#endif
diff --git a/drivers/i2c/twl4030_i2c.c b/drivers/i2c/twl4030_i2c.c
index 774f813..549f974 100644
--- a/drivers/i2c/twl4030_i2c.c
+++ b/drivers/i2c/twl4030_i2c.c
@@ -35,3 +35,25 @@ static inline int twl4030_i2c_read_u8(u8 chip_no, u8 *val, u8 reg)
return i2c_read(chip_no, reg, 1, val, 1);
}
+/*
+ * Power Reset
+ */
+void twl4030_power_reset_init(void)
+{
+#ifdef CONFIG_OMAP3_ZOOM2
+ u8 val = 0;
+ if (twl4030_i2c_read_u8(TWL4030_CHIP_PM_MASTER, &val,
+ TWL4030_PM_MASTER_P1_SW_EVENTS)) {
+ printf("Error:TWL4030: failed to read the power register\n");
+ printf("Could not initialize hardware reset\n");
+ } else {
+ val |= TWL4030_PM_MASTER_SW_EVENTS_STOPON_PWRON;
+ if (twl4030_i2c_write_u8(TWL4030_CHIP_PM_MASTER, val,
+ TWL4030_PM_MASTER_P1_SW_EVENTS)) {
+ printf("Error:TWL4030: failed to write the power register\n");
+ printf("Could not initialize hardware reset\n");
+ }
+ }
+#endif
+}
+
diff --git a/include/configs/omap3_zoom2.h b/include/configs/omap3_zoom2.h
index c2ad5bf..e69c5f1 100644
--- a/include/configs/omap3_zoom2.h
+++ b/include/configs/omap3_zoom2.h
@@ -145,6 +145,7 @@
#define CONFIG_SYS_I2C_BUS 0
#define CONFIG_SYS_I2C_BUS_SELECT 1
#define CONFIG_DRIVER_OMAP34XX_I2C 1
+#define CONFIG_DRIVER_TWL4030_I2C 1
/*
* Board NAND Info.
diff --git a/include/twl4030.h b/include/twl4030.h
index d17fea5..bb07036 100644
--- a/include/twl4030.h
+++ b/include/twl4030.h
@@ -218,4 +218,14 @@
#define TWL4030_USB_PHY_CLK_CTRL_STS (0xFF)
#define TWL4030_USB_PHY_DPLL_CLK (1 << 0)
+#ifdef CONFIG_DRIVER_TWL4030_I2C
+
+/* Power Reset, use to initialize system wide resetting */
+void twl4030_power_reset_init(void);
+
+#else
+/* stubs */
+#define twl4030_power_reset_init()
+
+#endif /* CONFIG_DRIVER_TWL4030_I2C */
#endif /* TWL4030_H */
--
1.6.0.5
^ permalink raw reply related [flat|nested] 44+ messages in thread
* [U-Boot] [PATCH 4/4] ZOOM1 Add power reset button
2009-06-10 12:53 ` [U-Boot] [PATCH 3/4] ZOOM2 Add power reset button Tom Rix
@ 2009-06-10 12:53 ` Tom Rix
2009-06-12 21:46 ` Jean-Christophe PLAGNIOL-VILLARD
2009-06-10 14:27 ` [U-Boot] [PATCH 3/4] ZOOM2 " Peter Tyser
2009-06-10 17:48 ` Heiko Schocher
2 siblings, 1 reply; 44+ messages in thread
From: Tom Rix @ 2009-06-10 12:53 UTC (permalink / raw)
To: u-boot
The reset button is the red circle on the top right, front of
the board. Press and hold the button for 8 seconds to completely
reset the board.
Signed-off-by: Tom Rix <Tom.Rix@windriver.com>
---
board/omap3/zoom1/zoom1.c | 8 ++++++++
drivers/i2c/twl4030_i2c.c | 2 +-
include/configs/omap3_zoom1.h | 1 +
3 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/board/omap3/zoom1/zoom1.c b/board/omap3/zoom1/zoom1.c
index db4d087..8a3afaf 100644
--- a/board/omap3/zoom1/zoom1.c
+++ b/board/omap3/zoom1/zoom1.c
@@ -31,6 +31,7 @@
* MA 02111-1307 USA
*/
#include <common.h>
+#include <twl4030.h>
#include <asm/io.h>
#include <asm/arch/mux.h>
#include <asm/arch/sys_proto.h>
@@ -51,6 +52,13 @@ int board_init(void)
/* boot param addr */
gd->bd->bi_boot_params = (OMAP34XX_SDRC_CS0 + 0x100);
+ /*
+ * Board Reset
+ * The board is reset by holding the red button on the
+ * top right front face for eight seconds.
+ */
+ twl4030_power_reset_init();
+
return 0;
}
diff --git a/drivers/i2c/twl4030_i2c.c b/drivers/i2c/twl4030_i2c.c
index 549f974..00146f8 100644
--- a/drivers/i2c/twl4030_i2c.c
+++ b/drivers/i2c/twl4030_i2c.c
@@ -40,7 +40,7 @@ static inline int twl4030_i2c_read_u8(u8 chip_no, u8 *val, u8 reg)
*/
void twl4030_power_reset_init(void)
{
-#ifdef CONFIG_OMAP3_ZOOM2
+#if defined(CONFIG_OMAP3_ZOOM2) || defined(CONFIG_OMAP3_ZOOM1)
u8 val = 0;
if (twl4030_i2c_read_u8(TWL4030_CHIP_PM_MASTER, &val,
TWL4030_PM_MASTER_P1_SW_EVENTS)) {
diff --git a/include/configs/omap3_zoom1.h b/include/configs/omap3_zoom1.h
index 9e000ed..983808e 100644
--- a/include/configs/omap3_zoom1.h
+++ b/include/configs/omap3_zoom1.h
@@ -124,6 +124,7 @@
#define CONFIG_SYS_I2C_BUS 0
#define CONFIG_SYS_I2C_BUS_SELECT 1
#define CONFIG_DRIVER_OMAP34XX_I2C 1
+#define CONFIG_DRIVER_TWL4030_I2C 1
/*
* Board NAND Info.
--
1.6.0.5
^ permalink raw reply related [flat|nested] 44+ messages in thread
* [U-Boot] [PATCH 4/4] ZOOM1 Add power reset button
2009-06-10 12:53 ` [U-Boot] [PATCH 4/4] ZOOM1 " Tom Rix
@ 2009-06-12 21:46 ` Jean-Christophe PLAGNIOL-VILLARD
2009-06-12 21:57 ` Tom
0 siblings, 1 reply; 44+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2009-06-12 21:46 UTC (permalink / raw)
To: u-boot
On 07:53 Wed 10 Jun , Tom Rix wrote:
> The reset button is the red circle on the top right, front of
> the board. Press and hold the button for 8 seconds to completely
> reset the board.
>
> Signed-off-by: Tom Rix <Tom.Rix@windriver.com>
> ---
> board/omap3/zoom1/zoom1.c | 8 ++++++++
> drivers/i2c/twl4030_i2c.c | 2 +-
> include/configs/omap3_zoom1.h | 1 +
> 3 files changed, 10 insertions(+), 1 deletions(-)
>
> diff --git a/board/omap3/zoom1/zoom1.c b/board/omap3/zoom1/zoom1.c
> index db4d087..8a3afaf 100644
> --- a/board/omap3/zoom1/zoom1.c
> +++ b/board/omap3/zoom1/zoom1.c
> @@ -31,6 +31,7 @@
> * MA 02111-1307 USA
> */
> #include <common.h>
> +#include <twl4030.h>
> #include <asm/io.h>
> #include <asm/arch/mux.h>
> #include <asm/arch/sys_proto.h>
> @@ -51,6 +52,13 @@ int board_init(void)
> /* boot param addr */
> gd->bd->bi_boot_params = (OMAP34XX_SDRC_CS0 + 0x100);
>
> + /*
> + * Board Reset
> + * The board is reset by holding the red button on the
> + * top right front face for eight seconds.
> + */
> + twl4030_power_reset_init();
> +
> return 0;
> }
>
> diff --git a/drivers/i2c/twl4030_i2c.c b/drivers/i2c/twl4030_i2c.c
> index 549f974..00146f8 100644
> --- a/drivers/i2c/twl4030_i2c.c
> +++ b/drivers/i2c/twl4030_i2c.c
> @@ -40,7 +40,7 @@ static inline int twl4030_i2c_read_u8(u8 chip_no, u8 *val, u8 reg)
> */
> void twl4030_power_reset_init(void)
> {
> -#ifdef CONFIG_OMAP3_ZOOM2
> +#if defined(CONFIG_OMAP3_ZOOM2) || defined(CONFIG_OMAP3_ZOOM1)
I think it will be better to avoid board specifc code in the driver
unless it's the only solution
Best Regards,
J.
^ permalink raw reply [flat|nested] 44+ messages in thread
* [U-Boot] [PATCH 4/4] ZOOM1 Add power reset button
2009-06-12 21:46 ` Jean-Christophe PLAGNIOL-VILLARD
@ 2009-06-12 21:57 ` Tom
2009-06-12 23:08 ` Menon, Nishanth
0 siblings, 1 reply; 44+ messages in thread
From: Tom @ 2009-06-12 21:57 UTC (permalink / raw)
To: u-boot
Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 07:53 Wed 10 Jun , Tom Rix wrote:
>
>> The reset button is the red circle on the top right, front of
>> the board. Press and hold the button for 8 seconds to completely
>> reset the board.
>>
>> Signed-off-by: Tom Rix <Tom.Rix@windriver.com>
>> ---
>> board/omap3/zoom1/zoom1.c | 8 ++++++++
>> drivers/i2c/twl4030_i2c.c | 2 +-
>> include/configs/omap3_zoom1.h | 1 +
>> 3 files changed, 10 insertions(+), 1 deletions(-)
>>
>> diff --git a/board/omap3/zoom1/zoom1.c b/board/omap3/zoom1/zoom1.c
>> index db4d087..8a3afaf 100644
>> --- a/board/omap3/zoom1/zoom1.c
>> +++ b/board/omap3/zoom1/zoom1.c
>> @@ -31,6 +31,7 @@
>> * MA 02111-1307 USA
>> */
>> #include <common.h>
>> +#include <twl4030.h>
>> #include <asm/io.h>
>> #include <asm/arch/mux.h>
>> #include <asm/arch/sys_proto.h>
>> @@ -51,6 +52,13 @@ int board_init(void)
>> /* boot param addr */
>> gd->bd->bi_boot_params = (OMAP34XX_SDRC_CS0 + 0x100);
>>
>> + /*
>> + * Board Reset
>> + * The board is reset by holding the red button on the
>> + * top right front face for eight seconds.
>> + */
>> + twl4030_power_reset_init();
>> +
>> return 0;
>> }
>>
>> diff --git a/drivers/i2c/twl4030_i2c.c b/drivers/i2c/twl4030_i2c.c
>> index 549f974..00146f8 100644
>> --- a/drivers/i2c/twl4030_i2c.c
>> +++ b/drivers/i2c/twl4030_i2c.c
>> @@ -40,7 +40,7 @@ static inline int twl4030_i2c_read_u8(u8 chip_no, u8 *val, u8 reg)
>> */
>> void twl4030_power_reset_init(void)
>> {
>> -#ifdef CONFIG_OMAP3_ZOOM2
>> +#if defined(CONFIG_OMAP3_ZOOM2) || defined(CONFIG_OMAP3_ZOOM1)
>>
> I think it will be better to avoid board specifc code in the driver
> unless it's the only solution
>
>
I think this is zoom1 and zoom2 specific.
I could add this function to each of their board files.
I was trying to avoid that.
Tom
> Best Regards,
> J.
>
^ permalink raw reply [flat|nested] 44+ messages in thread
* [U-Boot] [PATCH 4/4] ZOOM1 Add power reset button
2009-06-12 21:57 ` Tom
@ 2009-06-12 23:08 ` Menon, Nishanth
2009-06-13 2:28 ` Tom
0 siblings, 1 reply; 44+ messages in thread
From: Menon, Nishanth @ 2009-06-12 23:08 UTC (permalink / raw)
To: u-boot
> -----Original Message-----
> From: Tom [mailto:Tom.Rix at windriver.com]
> Sent: Friday, June 12, 2009 4:57 PM
> To: Jean-Christophe PLAGNIOL-VILLARD
> Cc: u-boot at lists.denx.de; Menon, Nishanth
> Subject: Re: [U-Boot] [PATCH 4/4] ZOOM1 Add power reset button
>
> >> */
> >> void twl4030_power_reset_init(void)
> >> {
> >> -#ifdef CONFIG_OMAP3_ZOOM2
> >> +#if defined(CONFIG_OMAP3_ZOOM2) || defined(CONFIG_OMAP3_ZOOM1)
> >>
> > I think it will be better to avoid board specifc code in the driver
> > unless it's the only solution
> >
> >
> I think this is zoom1 and zoom2 specific.
> I could add this function to each of their board files.
> I was trying to avoid that.
>>> + if (twl4030_i2c_read_u8(TWL4030_CHIP_PM_MASTER, &val,
>>> + TWL4030_PM_MASTER_P1_SW_EVENTS)) {
>>> + printf("Error:TWL4030: failed to read the power register\n");
>>> + printf("Could not initialize hardware reset\n");
>>> + } else {
>>> + val |= TWL4030_PM_MASTER_SW_EVENTS_STOPON_PWRON;
>>> + if (twl4030_i2c_write_u8(TWL4030_CHIP_PM_MASTER, val,
>>> + TWL4030_PM_MASTER_P1_SW_EVENTS)) {
Why is this zoom1 and zoom2 specific? You are playing with PM Master registers causing a board reset right? It should in theory work for beagleboard also.. am I wrong?
Regards,
Nishanth Menon
^ permalink raw reply [flat|nested] 44+ messages in thread
* [U-Boot] [PATCH 4/4] ZOOM1 Add power reset button
2009-06-12 23:08 ` Menon, Nishanth
@ 2009-06-13 2:28 ` Tom
2009-06-13 14:16 ` Tom
0 siblings, 1 reply; 44+ messages in thread
From: Tom @ 2009-06-13 2:28 UTC (permalink / raw)
To: u-boot
Menon, Nishanth wrote:
>> -----Original Message-----
>> From: Tom [mailto:Tom.Rix at windriver.com]
>> Sent: Friday, June 12, 2009 4:57 PM
>> To: Jean-Christophe PLAGNIOL-VILLARD
>> Cc: u-boot at lists.denx.de; Menon, Nishanth
>> Subject: Re: [U-Boot] [PATCH 4/4] ZOOM1 Add power reset button
>>
>>
>>>> */
>>>> void twl4030_power_reset_init(void)
>>>> {
>>>> -#ifdef CONFIG_OMAP3_ZOOM2
>>>> +#if defined(CONFIG_OMAP3_ZOOM2) || defined(CONFIG_OMAP3_ZOOM1)
>>>>
>>>>
>>> I think it will be better to avoid board specifc code in the driver
>>> unless it's the only solution
>>>
>>>
>>>
>> I think this is zoom1 and zoom2 specific.
>> I could add this function to each of their board files.
>> I was trying to avoid that.
>>
>>>> + if (twl4030_i2c_read_u8(TWL4030_CHIP_PM_MASTER, &val,
>>>> + TWL4030_PM_MASTER_P1_SW_EVENTS)) {
>>>> + printf("Error:TWL4030: failed to read the power register\n");
>>>> + printf("Could not initialize hardware reset\n");
>>>> + } else {
>>>> + val |= TWL4030_PM_MASTER_SW_EVENTS_STOPON_PWRON;
>>>> + if (twl4030_i2c_write_u8(TWL4030_CHIP_PM_MASTER, val,
>>>> + TWL4030_PM_MASTER_P1_SW_EVENTS)) {
>>>>
>
> Why is this zoom1 and zoom2 specific? You are playing with PM Master registers causing a board reset right? It should in theory work for beagleboard also.. am I wrong?
>
>
Half right I think.
The beagle, from the schematics, has a 'Reset' - 'S2' switch. This is
tied to them omap's sys_nRespwon and to the t2_nRespwon. I think when
the switch is pressed only the omap gets reset. I could try verifing
this but it would take a while. Looking at
theTWL4030_PM_MASTER_P1_SW_EVENTS using 'i2c md 4b 46' it is clear in
both the factory and the current versions of u-boot.
I think that setting this bit in beagle will reset just the twl4030.
Which I think is the right thing to do.
I will try removing the #if-defs and see what happens :|
Tom
> Regards,
> Nishanth Menon
>
^ permalink raw reply [flat|nested] 44+ messages in thread
* [U-Boot] [PATCH 4/4] ZOOM1 Add power reset button
2009-06-13 2:28 ` Tom
@ 2009-06-13 14:16 ` Tom
2009-06-13 14:26 ` Nishanth Menon
0 siblings, 1 reply; 44+ messages in thread
From: Tom @ 2009-06-13 14:16 UTC (permalink / raw)
To: u-boot
Tom wrote:
> Menon, Nishanth wrote:
>>> -----Original Message-----
>>> From: Tom [mailto:Tom.Rix at windriver.com]
>>> Sent: Friday, June 12, 2009 4:57 PM
>>> To: Jean-Christophe PLAGNIOL-VILLARD
>>> Cc: u-boot at lists.denx.de; Menon, Nishanth
>>> Subject: Re: [U-Boot] [PATCH 4/4] ZOOM1 Add power reset button
>>>
>>>>> */
>>>>> void twl4030_power_reset_init(void)
>>>>> {
>>>>> -#ifdef CONFIG_OMAP3_ZOOM2
>>>>> +#if defined(CONFIG_OMAP3_ZOOM2) || defined(CONFIG_OMAP3_ZOOM1)
>>>>>
>>>> I think it will be better to avoid board specifc code in the driver
>>>> unless it's the only solution
>>>>
>>>>
>>> I think this is zoom1 and zoom2 specific.
>>> I could add this function to each of their board files.
>>> I was trying to avoid that.
>>>>> + if (twl4030_i2c_read_u8(TWL4030_CHIP_PM_MASTER, &val,
>>>>> + TWL4030_PM_MASTER_P1_SW_EVENTS)) {
>>>>> + printf("Error:TWL4030: failed to read the power register\n");
>>>>> + printf("Could not initialize hardware reset\n");
>>>>> + } else {
>>>>> + val |= TWL4030_PM_MASTER_SW_EVENTS_STOPON_PWRON;
>>>>> + if (twl4030_i2c_write_u8(TWL4030_CHIP_PM_MASTER, val,
>>>>> + TWL4030_PM_MASTER_P1_SW_EVENTS)) {
>>
>> Why is this zoom1 and zoom2 specific? You are playing with PM Master
>> registers causing a board reset right? It should in theory work for
>> beagleboard also.. am I wrong?
> Half right I think.
> The beagle, from the schematics, has a 'Reset' - 'S2' switch. This is
> tied to them omap's sys_nRespwon and to the t2_nRespwon. I think when
> the switch is pressed only the omap gets reset. I could try verifing
> this but it would take a while. Looking at
> theTWL4030_PM_MASTER_P1_SW_EVENTS using 'i2c md 4b 46' it is clear in
> both the factory and the current versions of u-boot.
>
> I think that setting this bit in beagle will reset just the twl4030.
> Which I think is the right thing to do.
>
> I will try removing the #if-defs and see what happens :|
I have taken a closer look.
I think the 'Cold Reset' label for switch 2 should be relabeled 'Warm
Reset'
twl4030 registers are persistent on beagle and zoom1 when both the sw
reset cmd is given and when the beagle reset or the zoom1 reset (pin
hole in back + handy paperclip) is used. The easiest way to test this is
to set the sw_events manually using
inm 4b 46
then set to
40
Verify with imd 4b 46.
When the hw reset button is used on the zoom1, front face red button,
the board resets and this is clear. On beagle you need to cycle power by
unplugging / replugging power. Otherwise it does not get reset.
Looking at beagle schematics, the ic SN74LVC2G07 has nRESPWRON as an
input. So the resetting of the omap is an or-ing of nRESPWRON and the
switch. The switch has no effect on nRESPWRON. If the input & output of
ic were reversed, you _may_ get the behaviour of resetting omap with a
touch and resetting omap+twl4030 when held for 8+ seconds.
The moral of the story is do not depend on twl4030 to be reset.
For this patch for resetting, the reset logic is generic and should be
in the driver layer and not in the board layer.
Tom
^ permalink raw reply [flat|nested] 44+ messages in thread
* [U-Boot] [PATCH 4/4] ZOOM1 Add power reset button
2009-06-13 14:16 ` Tom
@ 2009-06-13 14:26 ` Nishanth Menon
0 siblings, 0 replies; 44+ messages in thread
From: Nishanth Menon @ 2009-06-13 14:26 UTC (permalink / raw)
To: u-boot
looping in beagleboard for comments.
Tom said the following on 06/13/2009 09:16 AM:
> Tom wrote:
>
>> Menon, Nishanth wrote:
>>
>>>> -----Original Message-----
>>>> From: Tom [mailto:Tom.Rix at windriver.com]
>>>> Sent: Friday, June 12, 2009 4:57 PM
>>>> To: Jean-Christophe PLAGNIOL-VILLARD
>>>> Cc: u-boot at lists.denx.de; Menon, Nishanth
>>>> Subject: Re: [U-Boot] [PATCH 4/4] ZOOM1 Add power reset button
>>>>
>>>>
>>>>>> */
>>>>>> void twl4030_power_reset_init(void)
>>>>>> {
>>>>>> -#ifdef CONFIG_OMAP3_ZOOM2
>>>>>> +#if defined(CONFIG_OMAP3_ZOOM2) || defined(CONFIG_OMAP3_ZOOM1)
>>>>>>
>>>>>>
>>>>> I think it will be better to avoid board specifc code in the driver
>>>>> unless it's the only solution
>>>>>
>>>>>
>>>>>
>>>> I think this is zoom1 and zoom2 specific.
>>>> I could add this function to each of their board files.
>>>> I was trying to avoid that.
>>>>
>>>>>> + if (twl4030_i2c_read_u8(TWL4030_CHIP_PM_MASTER, &val,
>>>>>> + TWL4030_PM_MASTER_P1_SW_EVENTS)) {
>>>>>> + printf("Error:TWL4030: failed to read the power register\n");
>>>>>> + printf("Could not initialize hardware reset\n");
>>>>>> + } else {
>>>>>> + val |= TWL4030_PM_MASTER_SW_EVENTS_STOPON_PWRON;
>>>>>> + if (twl4030_i2c_write_u8(TWL4030_CHIP_PM_MASTER, val,
>>>>>> + TWL4030_PM_MASTER_P1_SW_EVENTS)) {
>>>>>>
>>> Why is this zoom1 and zoom2 specific? You are playing with PM Master
>>> registers causing a board reset right? It should in theory work for
>>> beagleboard also.. am I wrong?
>>>
>> Half right I think.
>> The beagle, from the schematics, has a 'Reset' - 'S2' switch. This is
>> tied to them omap's sys_nRespwon and to the t2_nRespwon. I think when
>> the switch is pressed only the omap gets reset. I could try verifing
>> this but it would take a while. Looking at
>> theTWL4030_PM_MASTER_P1_SW_EVENTS using 'i2c md 4b 46' it is clear in
>> both the factory and the current versions of u-boot.
>>
>> I think that setting this bit in beagle will reset just the twl4030.
>> Which I think is the right thing to do.
>>
>> I will try removing the #if-defs and see what happens :|
>>
>
> I have taken a closer look.
> I think the 'Cold Reset' label for switch 2 should be relabeled 'Warm
> Reset'
> twl4030 registers are persistent on beagle and zoom1 when both the sw
> reset cmd is given and when the beagle reset or the zoom1 reset (pin
> hole in back + handy paperclip) is used. The easiest way to test this is
> to set the sw_events manually using
> inm 4b 46
> then set to
> 40
> Verify with imd 4b 46.
>
> When the hw reset button is used on the zoom1, front face red button,
> the board resets and this is clear. On beagle you need to cycle power by
> unplugging / replugging power. Otherwise it does not get reset.
>
> Looking at beagle schematics, the ic SN74LVC2G07 has nRESPWRON as an
> input. So the resetting of the omap is an or-ing of nRESPWRON and the
> switch. The switch has no effect on nRESPWRON. If the input & output of
> ic were reversed, you _may_ get the behaviour of resetting omap with a
> touch and resetting omap+twl4030 when held for 8+ seconds.
>
> The moral of the story is do not depend on twl4030 to be reset.
>
> For this patch for resetting, the reset logic is generic and should be
> in the driver layer and not in the board layer.
>
> Tom
>
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>
>
^ permalink raw reply [flat|nested] 44+ messages in thread
* [U-Boot] [PATCH 3/4] ZOOM2 Add power reset button
2009-06-10 12:53 ` [U-Boot] [PATCH 3/4] ZOOM2 Add power reset button Tom Rix
2009-06-10 12:53 ` [U-Boot] [PATCH 4/4] ZOOM1 " Tom Rix
@ 2009-06-10 14:27 ` Peter Tyser
2009-06-10 14:43 ` Menon, Nishanth
2009-06-10 17:56 ` Heiko Schocher
2009-06-10 17:48 ` Heiko Schocher
2 siblings, 2 replies; 44+ messages in thread
From: Peter Tyser @ 2009-06-10 14:27 UTC (permalink / raw)
To: u-boot
Hi Tom,
> diff --git a/drivers/i2c/twl4030_i2c.c b/drivers/i2c/twl4030_i2c.c
> index 774f813..549f974 100644
> --- a/drivers/i2c/twl4030_i2c.c
> +++ b/drivers/i2c/twl4030_i2c.c
> @@ -35,3 +35,25 @@ static inline int twl4030_i2c_read_u8(u8 chip_no, u8 *val, u8 reg)
> return i2c_read(chip_no, reg, 1, val, 1);
> }
>
> +/*
> + * Power Reset
> + */
> +void twl4030_power_reset_init(void)
> +{
> +#ifdef CONFIG_OMAP3_ZOOM2
> + u8 val = 0;
> + if (twl4030_i2c_read_u8(TWL4030_CHIP_PM_MASTER, &val,
> + TWL4030_PM_MASTER_P1_SW_EVENTS)) {
> + printf("Error:TWL4030: failed to read the power register\n");
> + printf("Could not initialize hardware reset\n");
> + } else {
> + val |= TWL4030_PM_MASTER_SW_EVENTS_STOPON_PWRON;
> + if (twl4030_i2c_write_u8(TWL4030_CHIP_PM_MASTER, val,
> + TWL4030_PM_MASTER_P1_SW_EVENTS)) {
> + printf("Error:TWL4030: failed to write the power register\n");
> + printf("Could not initialize hardware reset\n");
> + }
> + }
> +#endif
> +}
> +
All other drivers in drivers/i2c are host adapter drivers. Ie they
implement i2c_read(), i2c_write(), i2c_probe(), and i2c_init(). The
twl4030_i2c.c driver doesn't seem to fit this mold. Perhaps it would be
better placed in drivers/misc or a new drivers/power directory similar
to Linux?
FWIW I had the same dilemma with the ds4510 i2c device which has support
for GPIO, EEEPROM, etc and ended up putting it in drivers/misc.
Best,
Peter
^ permalink raw reply [flat|nested] 44+ messages in thread
* [U-Boot] [PATCH 3/4] ZOOM2 Add power reset button
2009-06-10 14:27 ` [U-Boot] [PATCH 3/4] ZOOM2 " Peter Tyser
@ 2009-06-10 14:43 ` Menon, Nishanth
2009-06-10 15:43 ` Dirk Behme
2009-06-10 17:56 ` Heiko Schocher
1 sibling, 1 reply; 44+ messages in thread
From: Menon, Nishanth @ 2009-06-10 14:43 UTC (permalink / raw)
To: u-boot
> -----Original Message-----
> From: Peter Tyser [mailto:ptyser at xes-inc.com]
> Sent: Wednesday, June 10, 2009 9:27 AM
> > diff --git a/drivers/i2c/twl4030_i2c.c b/drivers/i2c/twl4030_i2c.c
> > index 774f813..549f974 100644
> > --- a/drivers/i2c/twl4030_i2c.c
> > +++ b/drivers/i2c/twl4030_i2c.c
> > @@ -35,3 +35,25 @@ static inline int twl4030_i2c_read_u8(u8 chip_no, u8
> *val, u8 reg)
> > return i2c_read(chip_no, reg, 1, val, 1);
> > }
> >
> > +/*
> > + * Power Reset
> > + */
> > +void twl4030_power_reset_init(void)
> > +{
> > +#ifdef CONFIG_OMAP3_ZOOM2
> > + u8 val = 0;
> > + if (twl4030_i2c_read_u8(TWL4030_CHIP_PM_MASTER, &val,
> > + TWL4030_PM_MASTER_P1_SW_EVENTS)) {
> > + printf("Error:TWL4030: failed to read the power register\n");
> > + printf("Could not initialize hardware reset\n");
> > + } else {
> > + val |= TWL4030_PM_MASTER_SW_EVENTS_STOPON_PWRON;
> > + if (twl4030_i2c_write_u8(TWL4030_CHIP_PM_MASTER, val,
> > + TWL4030_PM_MASTER_P1_SW_EVENTS)) {
> > + printf("Error:TWL4030: failed to write the power
> register\n");
> > + printf("Could not initialize hardware reset\n");
> > + }
> > + }
> > +#endif
> > +}
> > +
>
> All other drivers in drivers/i2c are host adapter drivers. Ie they
> implement i2c_read(), i2c_write(), i2c_probe(), and i2c_init(). The
> twl4030_i2c.c driver doesn't seem to fit this mold. Perhaps it would be
> better placed in drivers/misc or a new drivers/power directory similar
> to Linux?
This function probably belongs to board/omap3/common/power.c -> or even better to the board file itself?
Regards,
Nishanth Menon
^ permalink raw reply [flat|nested] 44+ messages in thread
* [U-Boot] [PATCH 3/4] ZOOM2 Add power reset button
2009-06-10 14:43 ` Menon, Nishanth
@ 2009-06-10 15:43 ` Dirk Behme
2009-06-10 16:16 ` Menon, Nishanth
2009-06-10 18:04 ` Heiko Schocher
0 siblings, 2 replies; 44+ messages in thread
From: Dirk Behme @ 2009-06-10 15:43 UTC (permalink / raw)
To: u-boot
Menon, Nishanth wrote:
>> -----Original Message-----
>> From: Peter Tyser [mailto:ptyser at xes-inc.com]
>> Sent: Wednesday, June 10, 2009 9:27 AM
>>> diff --git a/drivers/i2c/twl4030_i2c.c b/drivers/i2c/twl4030_i2c.c
>>> index 774f813..549f974 100644
>>> --- a/drivers/i2c/twl4030_i2c.c
>>> +++ b/drivers/i2c/twl4030_i2c.c
>>> @@ -35,3 +35,25 @@ static inline int twl4030_i2c_read_u8(u8 chip_no, u8
>> *val, u8 reg)
>>> return i2c_read(chip_no, reg, 1, val, 1);
>>> }
>>>
>>> +/*
>>> + * Power Reset
>>> + */
>>> +void twl4030_power_reset_init(void)
>>> +{
>>> +#ifdef CONFIG_OMAP3_ZOOM2
>>> + u8 val = 0;
>>> + if (twl4030_i2c_read_u8(TWL4030_CHIP_PM_MASTER, &val,
>>> + TWL4030_PM_MASTER_P1_SW_EVENTS)) {
>>> + printf("Error:TWL4030: failed to read the power register\n");
>>> + printf("Could not initialize hardware reset\n");
>>> + } else {
>>> + val |= TWL4030_PM_MASTER_SW_EVENTS_STOPON_PWRON;
>>> + if (twl4030_i2c_write_u8(TWL4030_CHIP_PM_MASTER, val,
>>> + TWL4030_PM_MASTER_P1_SW_EVENTS)) {
>>> + printf("Error:TWL4030: failed to write the power
>> register\n");
>>> + printf("Could not initialize hardware reset\n");
>>> + }
>>> + }
>>> +#endif
>>> +}
>>> +
>> All other drivers in drivers/i2c are host adapter drivers. Ie they
>> implement i2c_read(), i2c_write(), i2c_probe(), and i2c_init(). The
>> twl4030_i2c.c driver doesn't seem to fit this mold. Perhaps it would be
>> better placed in drivers/misc or a new drivers/power directory similar
>> to Linux?
>
> This function probably belongs to board/omap3/common/power.c -> or even better to the board file itself?
I was about to mention the opposite ;)
Jean-Christophe asked to move the code from power.c to driver directory
http://lists.denx.de/pipermail/u-boot/2009-May/052400.html
If you follow above discussion, I was fine with power.c. If we get now
a twl4030_i2c.c, we should merge the code from power.c into it, too
(where ever it will be located and named, then).
Best regards
Dirk
^ permalink raw reply [flat|nested] 44+ messages in thread
* [U-Boot] [PATCH 3/4] ZOOM2 Add power reset button
2009-06-10 15:43 ` Dirk Behme
@ 2009-06-10 16:16 ` Menon, Nishanth
2009-06-10 16:25 ` Peter Tyser
2009-06-10 18:06 ` Heiko Schocher
2009-06-10 18:04 ` Heiko Schocher
1 sibling, 2 replies; 44+ messages in thread
From: Menon, Nishanth @ 2009-06-10 16:16 UTC (permalink / raw)
To: u-boot
> -----Original Message-----
> From: Dirk Behme [mailto:dirk.behme at googlemail.com]
> Sent: Wednesday, June 10, 2009 10:44 AM
> >>> --- a/drivers/i2c/twl4030_i2c.c
> >> All other drivers in drivers/i2c are host adapter drivers. Ie they
> >> implement i2c_read(), i2c_write(), i2c_probe(), and i2c_init(). The
> >> twl4030_i2c.c driver doesn't seem to fit this mold. Perhaps it would
> be
> >> better placed in drivers/misc or a new drivers/power directory similar
> >> to Linux?
> >
> > This function probably belongs to board/omap3/common/power.c -> or even
> better to the board file itself?
>
> I was about to mention the opposite ;)
>
> Jean-Christophe asked to move the code from power.c to driver directory
>
> http://lists.denx.de/pipermail/u-boot/2009-May/052400.html
>
> If you follow above discussion, I was fine with power.c. If we get now
> a twl4030_i2c.c, we should merge the code from power.c into it, too
> (where ever it will be located and named, then).
>
This IMHO is the right approach -> but the real question is where in drivers/ directory? How about drivers/i2c/chips and moving the current drivers/i2c/* to drivers/i2c/busses - following the kernel organization?
Regards,
Nishanth Menon
^ permalink raw reply [flat|nested] 44+ messages in thread
* [U-Boot] [PATCH 3/4] ZOOM2 Add power reset button
2009-06-10 16:16 ` Menon, Nishanth
@ 2009-06-10 16:25 ` Peter Tyser
2009-06-10 18:08 ` Heiko Schocher
2009-06-10 18:27 ` Menon, Nishanth
2009-06-10 18:06 ` Heiko Schocher
1 sibling, 2 replies; 44+ messages in thread
From: Peter Tyser @ 2009-06-10 16:25 UTC (permalink / raw)
To: u-boot
On Wed, 2009-06-10 at 11:16 -0500, Menon, Nishanth wrote:
> > -----Original Message-----
> > From: Dirk Behme [mailto:dirk.behme at googlemail.com]
> > Sent: Wednesday, June 10, 2009 10:44 AM
> > >>> --- a/drivers/i2c/twl4030_i2c.c
> > >> All other drivers in drivers/i2c are host adapter drivers. Ie they
> > >> implement i2c_read(), i2c_write(), i2c_probe(), and i2c_init(). The
> > >> twl4030_i2c.c driver doesn't seem to fit this mold. Perhaps it would
> > be
> > >> better placed in drivers/misc or a new drivers/power directory similar
> > >> to Linux?
> > >
> > > This function probably belongs to board/omap3/common/power.c -> or even
> > better to the board file itself?
> >
> > I was about to mention the opposite ;)
> >
> > Jean-Christophe asked to move the code from power.c to driver directory
> >
> > http://lists.denx.de/pipermail/u-boot/2009-May/052400.html
> >
> > If you follow above discussion, I was fine with power.c. If we get now
> > a twl4030_i2c.c, we should merge the code from power.c into it, too
> > (where ever it will be located and named, then).
> >
> This IMHO is the right approach -> but the real question is where in drivers/ directory? How about drivers/i2c/chips and moving the current drivers/i2c/* to drivers/i2c/busses - following the kernel organization?
I'd vote against creating a drivers/i2c/chips directory. I believe this
directory is deprecated in the Linux kernel and they'd prefer drivers be
put in the proper driver/<subsystem> directory. I'd vote to follow this
convention in U-Boot too.
I'm not familiar with the device or what features you plan on supporting
so I can't speak to whether it'd fit better in drivers/power,
drivers/misc, somewhere omap3/board specific, etc.
Best.
Peter
^ permalink raw reply [flat|nested] 44+ messages in thread
* [U-Boot] [PATCH 3/4] ZOOM2 Add power reset button
2009-06-10 16:25 ` Peter Tyser
@ 2009-06-10 18:08 ` Heiko Schocher
2009-06-10 18:27 ` Menon, Nishanth
1 sibling, 0 replies; 44+ messages in thread
From: Heiko Schocher @ 2009-06-10 18:08 UTC (permalink / raw)
To: u-boot
Hello Peter,
Peter Tyser wrote:
> On Wed, 2009-06-10 at 11:16 -0500, Menon, Nishanth wrote:
>>> -----Original Message-----
>>> From: Dirk Behme [mailto:dirk.behme at googlemail.com]
>>> Sent: Wednesday, June 10, 2009 10:44 AM
>>>>>> --- a/drivers/i2c/twl4030_i2c.c
>>>>> All other drivers in drivers/i2c are host adapter drivers. Ie they
>>>>> implement i2c_read(), i2c_write(), i2c_probe(), and i2c_init(). The
>>>>> twl4030_i2c.c driver doesn't seem to fit this mold. Perhaps it would
>>> be
>>>>> better placed in drivers/misc or a new drivers/power directory similar
>>>>> to Linux?
>>>> This function probably belongs to board/omap3/common/power.c -> or even
>>> better to the board file itself?
>>>
>>> I was about to mention the opposite ;)
>>>
>>> Jean-Christophe asked to move the code from power.c to driver directory
>>>
>>> http://lists.denx.de/pipermail/u-boot/2009-May/052400.html
>>>
>>> If you follow above discussion, I was fine with power.c. If we get now
>>> a twl4030_i2c.c, we should merge the code from power.c into it, too
>>> (where ever it will be located and named, then).
>>>
>> This IMHO is the right approach -> but the real question is where in drivers/ directory? How about drivers/i2c/chips and moving the current drivers/i2c/* to drivers/i2c/busses - following the kernel organization?
>
> I'd vote against creating a drivers/i2c/chips directory. I believe this
Full Ack.
> directory is deprecated in the Linux kernel and they'd prefer drivers be
> put in the proper driver/<subsystem> directory. I'd vote to follow this
> convention in U-Boot too.
Yep. I vote for this too.
> I'm not familiar with the device or what features you plan on supporting
> so I can't speak to whether it'd fit better in drivers/power,
> drivers/misc, somewhere omap3/board specific, etc.
I think "drivers/power" would be a good place for it.
bye
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
^ permalink raw reply [flat|nested] 44+ messages in thread
* [U-Boot] [PATCH 3/4] ZOOM2 Add power reset button
2009-06-10 16:25 ` Peter Tyser
2009-06-10 18:08 ` Heiko Schocher
@ 2009-06-10 18:27 ` Menon, Nishanth
2009-06-10 18:21 ` Heiko Schocher
2009-06-10 20:27 ` Jean-Christophe PLAGNIOL-VILLARD
1 sibling, 2 replies; 44+ messages in thread
From: Menon, Nishanth @ 2009-06-10 18:27 UTC (permalink / raw)
To: u-boot
> -----Original Message-----
> From: Peter Tyser [mailto:ptyser at xes-inc.com]
> Sent: Wednesday, June 10, 2009 11:26 AM
> > > >>> --- a/drivers/i2c/twl4030_i2c.c
> > > >> All other drivers in drivers/i2c are host adapter drivers. Ie they
> > > >> implement i2c_read(), i2c_write(), i2c_probe(), and i2c_init().
> The
> > > >> twl4030_i2c.c driver doesn't seem to fit this mold. Perhaps it
> would
> > > be
> > > >> better placed in drivers/misc or a new drivers/power directory
> similar
> > > >> to Linux?
> > > >
> > > > This function probably belongs to board/omap3/common/power.c -> or
> even
> > > better to the board file itself?
> > >
> > > I was about to mention the opposite ;)
> > >
> > > Jean-Christophe asked to move the code from power.c to driver
> directory
> > >
> > > http://lists.denx.de/pipermail/u-boot/2009-May/052400.html
> > >
> > > If you follow above discussion, I was fine with power.c. If we get now
> > > a twl4030_i2c.c, we should merge the code from power.c into it, too
> > > (where ever it will be located and named, then).
> > >
> > This IMHO is the right approach -> but the real question is where in
> drivers/ directory? How about drivers/i2c/chips and moving the current
> drivers/i2c/* to drivers/i2c/busses - following the kernel organization?
>
> I'd vote against creating a drivers/i2c/chips directory. I believe this
> directory is deprecated in the Linux kernel and they'd prefer drivers be
> put in the proper driver/<subsystem> directory. I'd vote to follow this
> convention in U-Boot too.
>
> I'm not familiar with the device or what features you plan on supporting
> so I can't speak to whether it'd fit better in drivers/power,
> drivers/misc, somewhere omap3/board specific, etc.
>
How about this:
Regarding Dirk's and Heiko's comment:
A) How about board/omap3/common/power.c to drivers/power/twl4030.c
On patch [PATCH 2/4] I2C Add initial support for TWL4030:
B) introduce a new header in include/twl4030.h from Tom's patch
Remove drivers/i2c/twl4030_i2c.c from the patch instead add:
#define TWLL4030_READ_U8(MODULE, VAL,REG)\
i2c_read((MODULE), (REG), 1, (VAL), 1)
#define TWLL4030_WRITE_U8(MODULE, VAL,REG)\
i2c_read((MODULE), (REG), 1, (VAL), 1)
to include/twl4030.h in the patch.
C) on [PATCH 3/4] ZOOM2 Add power reset button
The change should go to corresponding board file -> for zoom1 or zoom2.
Regards,
Nishanth Menon
^ permalink raw reply [flat|nested] 44+ messages in thread
* [U-Boot] [PATCH 3/4] ZOOM2 Add power reset button
2009-06-10 18:27 ` Menon, Nishanth
@ 2009-06-10 18:21 ` Heiko Schocher
2009-06-10 18:50 ` Menon, Nishanth
2009-06-10 20:27 ` Jean-Christophe PLAGNIOL-VILLARD
1 sibling, 1 reply; 44+ messages in thread
From: Heiko Schocher @ 2009-06-10 18:21 UTC (permalink / raw)
To: u-boot
Hello Menon,
Menon, Nishanth wrote:
>> -----Original Message-----
>> From: Peter Tyser [mailto:ptyser at xes-inc.com]
>> Sent: Wednesday, June 10, 2009 11:26 AM
>>>>>>> --- a/drivers/i2c/twl4030_i2c.c
>>>>>> All other drivers in drivers/i2c are host adapter drivers. Ie they
>>>>>> implement i2c_read(), i2c_write(), i2c_probe(), and i2c_init().
>> The
>>>>>> twl4030_i2c.c driver doesn't seem to fit this mold. Perhaps it
>> would
>>>> be
>>>>>> better placed in drivers/misc or a new drivers/power directory
>> similar
>>>>>> to Linux?
>>>>> This function probably belongs to board/omap3/common/power.c -> or
>> even
>>>> better to the board file itself?
>>>>
>>>> I was about to mention the opposite ;)
>>>>
>>>> Jean-Christophe asked to move the code from power.c to driver
>> directory
>>>> http://lists.denx.de/pipermail/u-boot/2009-May/052400.html
>>>>
>>>> If you follow above discussion, I was fine with power.c. If we get now
>>>> a twl4030_i2c.c, we should merge the code from power.c into it, too
>>>> (where ever it will be located and named, then).
>>>>
>>> This IMHO is the right approach -> but the real question is where in
>> drivers/ directory? How about drivers/i2c/chips and moving the current
>> drivers/i2c/* to drivers/i2c/busses - following the kernel organization?
>>
>> I'd vote against creating a drivers/i2c/chips directory. I believe this
>> directory is deprecated in the Linux kernel and they'd prefer drivers be
>> put in the proper driver/<subsystem> directory. I'd vote to follow this
>> convention in U-Boot too.
>>
>> I'm not familiar with the device or what features you plan on supporting
>> so I can't speak to whether it'd fit better in drivers/power,
>> drivers/misc, somewhere omap3/board specific, etc.
>>
> How about this:
>
> Regarding Dirk's and Heiko's comment:
> A) How about board/omap3/common/power.c to drivers/power/twl4030.c
I don;t know, if this "board/omap3/common/power.c" is identical
with twl4030 ... ?
> On patch C:
> B) introduce a new header in include/twl4030.h from Tom's patch
> Remove drivers/i2c/twl4030_i2c.c from the patch instead add:
> #define TWLL4030_READ_U8(MODULE, VAL,REG)\
> i2c_read((MODULE), (REG), 1, (VAL), 1)
> #define TWLL4030_WRITE_U8(MODULE, VAL,REG)\
> i2c_read((MODULE), (REG), 1, (VAL), 1)
> to include/twl4030.h in the patch.
Maybe an option ... thats why I think it is no i2c driver ...
> C) on [PATCH 3/4] ZOOM2 Add power reset button
> The change should go to corresponding board file -> for zoom1 or zoom2.
or in "drivers/power/twl4030.c", if it is for all zoom* boards identical.
bye
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
^ permalink raw reply [flat|nested] 44+ messages in thread
* [U-Boot] [PATCH 3/4] ZOOM2 Add power reset button
2009-06-10 18:21 ` Heiko Schocher
@ 2009-06-10 18:50 ` Menon, Nishanth
0 siblings, 0 replies; 44+ messages in thread
From: Menon, Nishanth @ 2009-06-10 18:50 UTC (permalink / raw)
To: u-boot
> -----Original Message-----
> From: Heiko Schocher [mailto:hs at denx.de]
> Sent: Wednesday, June 10, 2009 1:22 PM
> >
> > Regarding Dirk's and Heiko's comment:
> > A) How about board/omap3/common/power.c to drivers/power/twl4030.c
>
> I don;t know, if this "board/omap3/common/power.c" is identical
> with twl4030 ... ?
The objective of power.c was to have only to have power related code for all omap3 platforms -> but currently there is only power_init_r function which is twl4030 compatible chips -> hence makes sense to break it out.
>
> > On patch C:
> > B) introduce a new header in include/twl4030.h from Tom's patch
> > Remove drivers/i2c/twl4030_i2c.c from the patch instead add:
> > #define TWLL4030_READ_U8(MODULE, VAL,REG)\
> > i2c_read((MODULE), (REG), 1, (VAL), 1)
> > #define TWLL4030_WRITE_U8(MODULE, VAL,REG)\
> > i2c_read((MODULE), (REG), 1, (VAL), 1)
> > to include/twl4030.h in the patch.
>
> Maybe an option ... thats why I think it is no i2c driver ...
>
> > C) on [PATCH 3/4] ZOOM2 Add power reset button
> > The change should go to corresponding board file -> for zoom1 or zoom2.
>
> or in "drivers/power/twl4030.c", if it is for all zoom* boards identical.
>
Yes - it can belong there I agree.
Regards,
Nishanth Menon
^ permalink raw reply [flat|nested] 44+ messages in thread
* [U-Boot] [PATCH 3/4] ZOOM2 Add power reset button
2009-06-10 18:27 ` Menon, Nishanth
2009-06-10 18:21 ` Heiko Schocher
@ 2009-06-10 20:27 ` Jean-Christophe PLAGNIOL-VILLARD
2009-06-12 13:02 ` Tom
1 sibling, 1 reply; 44+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2009-06-10 20:27 UTC (permalink / raw)
To: u-boot
> How about this:
>
> Regarding Dirk's and Heiko's comment:
> A) How about board/omap3/common/power.c to drivers/power/twl4030.c
Ack
but I've a patch for Dirk in my queued that I need to process about it
so we have 2 choice
1) apply Dirk's patch first and the move the code to drivers/power
2) rewrite a patch against the next
I've in mind to do the 1) to mention in the changelog Dirk's work
> On patch [PATCH 2/4] I2C Add initial support for TWL4030:
> B) introduce a new header in include/twl4030.h from Tom's patch
> Remove drivers/i2c/twl4030_i2c.c from the patch instead add:
> #define TWLL4030_READ_U8(MODULE, VAL,REG)\
> i2c_read((MODULE), (REG), 1, (VAL), 1)
> #define TWLL4030_WRITE_U8(MODULE, VAL,REG)\
> i2c_read((MODULE), (REG), 1, (VAL), 1)
> to include/twl4030.h in the patch.
please use inline function for this
Best Regards,
J.
^ permalink raw reply [flat|nested] 44+ messages in thread
* [U-Boot] [PATCH 3/4] ZOOM2 Add power reset button
2009-06-10 20:27 ` Jean-Christophe PLAGNIOL-VILLARD
@ 2009-06-12 13:02 ` Tom
2009-06-13 14:27 ` Jean-Christophe PLAGNIOL-VILLARD
0 siblings, 1 reply; 44+ messages in thread
From: Tom @ 2009-06-12 13:02 UTC (permalink / raw)
To: u-boot
Jean-Christophe PLAGNIOL-VILLARD wrote:
>> How about this:
>>
>> Regarding Dirk's and Heiko's comment:
>> A) How about board/omap3/common/power.c to drivers/power/twl4030.c
>>
> Ack
> but I've a patch for Dirk in my queued that I need to process about it
> so we have 2 choice
> 1) apply Dirk's patch first and the move the code to drivers/power
> 2) rewrite a patch against the next
>
>
Please forward me the patch,
I will merge it into the drivers/power/twl4030.c I am creating.
> I've in mind to do the 1) to mention in the changelog Dirk's work
>
>> On patch [PATCH 2/4] I2C Add initial support for TWL4030:
>> B) introduce a new header in include/twl4030.h from Tom's patch
>> Remove drivers/i2c/twl4030_i2c.c from the patch instead add:
>> #define TWLL4030_READ_U8(MODULE, VAL,REG)\
>> i2c_read((MODULE), (REG), 1, (VAL), 1)
>> #define TWLL4030_WRITE_U8(MODULE, VAL,REG)\
>> i2c_read((MODULE), (REG), 1, (VAL), 1)
>> to include/twl4030.h in the patch.
>>
> please use inline function for this
>
>
Yes.
I am doing adding this to twl4030.h
static inline int twl4030_i2c_read_u8(u8 chip_no, u8 *val, u8 reg) {}
> Best Regards,
> J.
>
^ permalink raw reply [flat|nested] 44+ messages in thread
* [U-Boot] [PATCH 3/4] ZOOM2 Add power reset button
2009-06-12 13:02 ` Tom
@ 2009-06-13 14:27 ` Jean-Christophe PLAGNIOL-VILLARD
0 siblings, 0 replies; 44+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2009-06-13 14:27 UTC (permalink / raw)
To: u-boot
On 08:02 Fri 12 Jun , Tom wrote:
> Jean-Christophe PLAGNIOL-VILLARD wrote:
>>> How about this:
>>>
>>> Regarding Dirk's and Heiko's comment:
>>> A) How about board/omap3/common/power.c to drivers/power/twl4030.c
>>>
>> Ack
>> but I've a patch for Dirk in my queued that I need to process about it
>> so we have 2 choice
>> 1) apply Dirk's patch first and the move the code to drivers/power
>> 2) rewrite a patch against the next
>>
>>
> Please forward me the patch,
> I will merge it into the drivers/power/twl4030.c I am creating.
http://www.mail-archive.com/u-boot at lists.denx.de/msg14133.html
Best Regards,
J.
^ permalink raw reply [flat|nested] 44+ messages in thread
* [U-Boot] [PATCH 3/4] ZOOM2 Add power reset button
2009-06-10 16:16 ` Menon, Nishanth
2009-06-10 16:25 ` Peter Tyser
@ 2009-06-10 18:06 ` Heiko Schocher
1 sibling, 0 replies; 44+ messages in thread
From: Heiko Schocher @ 2009-06-10 18:06 UTC (permalink / raw)
To: u-boot
Hello Menon,
Menon, Nishanth wrote:
>> -----Original Message-----
>> From: Dirk Behme [mailto:dirk.behme at googlemail.com]
>> Sent: Wednesday, June 10, 2009 10:44 AM
>>>>> --- a/drivers/i2c/twl4030_i2c.c
>>>> All other drivers in drivers/i2c are host adapter drivers. Ie they
>>>> implement i2c_read(), i2c_write(), i2c_probe(), and i2c_init(). The
>>>> twl4030_i2c.c driver doesn't seem to fit this mold. Perhaps it would
>> be
>>>> better placed in drivers/misc or a new drivers/power directory similar
>>>> to Linux?
>>> This function probably belongs to board/omap3/common/power.c -> or even
>> better to the board file itself?
>>
>> I was about to mention the opposite ;)
>>
>> Jean-Christophe asked to move the code from power.c to driver directory
>>
>> http://lists.denx.de/pipermail/u-boot/2009-May/052400.html
>>
>> If you follow above discussion, I was fine with power.c. If we get now
>> a twl4030_i2c.c, we should merge the code from power.c into it, too
>> (where ever it will be located and named, then).
>>
> This IMHO is the right approach -> but the real question is where in drivers/ directory? How about drivers/i2c/chips and moving the current drivers/i2c/* to drivers/i2c/busses - following the kernel organization?
No, I vote for moving this driver in a "drivers/power" directory.
BTW: Can you please use a linelength <80 characters? Thanks.
bye
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
^ permalink raw reply [flat|nested] 44+ messages in thread
* [U-Boot] [PATCH 3/4] ZOOM2 Add power reset button
2009-06-10 15:43 ` Dirk Behme
2009-06-10 16:16 ` Menon, Nishanth
@ 2009-06-10 18:04 ` Heiko Schocher
1 sibling, 0 replies; 44+ messages in thread
From: Heiko Schocher @ 2009-06-10 18:04 UTC (permalink / raw)
To: u-boot
Hello Dirk,
Dirk Behme wrote:
> Menon, Nishanth wrote:
>>> -----Original Message-----
>>> From: Peter Tyser [mailto:ptyser at xes-inc.com]
>>> Sent: Wednesday, June 10, 2009 9:27 AM
>>>> diff --git a/drivers/i2c/twl4030_i2c.c b/drivers/i2c/twl4030_i2c.c
>>>> index 774f813..549f974 100644
>>>> --- a/drivers/i2c/twl4030_i2c.c
>>>> +++ b/drivers/i2c/twl4030_i2c.c
>>>> @@ -35,3 +35,25 @@ static inline int twl4030_i2c_read_u8(u8 chip_no, u8
>>> *val, u8 reg)
>>>> return i2c_read(chip_no, reg, 1, val, 1);
>>>> }
>>>>
>>>> +/*
>>>> + * Power Reset
>>>> + */
>>>> +void twl4030_power_reset_init(void)
>>>> +{
>>>> +#ifdef CONFIG_OMAP3_ZOOM2
>>>> + u8 val = 0;
>>>> + if (twl4030_i2c_read_u8(TWL4030_CHIP_PM_MASTER, &val,
>>>> + TWL4030_PM_MASTER_P1_SW_EVENTS)) {
>>>> + printf("Error:TWL4030: failed to read the power register\n");
>>>> + printf("Could not initialize hardware reset\n");
>>>> + } else {
>>>> + val |= TWL4030_PM_MASTER_SW_EVENTS_STOPON_PWRON;
>>>> + if (twl4030_i2c_write_u8(TWL4030_CHIP_PM_MASTER, val,
>>>> + TWL4030_PM_MASTER_P1_SW_EVENTS)) {
>>>> + printf("Error:TWL4030: failed to write the power
>>> register\n");
>>>> + printf("Could not initialize hardware reset\n");
>>>> + }
>>>> + }
>>>> +#endif
>>>> +}
>>>> +
>>> All other drivers in drivers/i2c are host adapter drivers. Ie they
>>> implement i2c_read(), i2c_write(), i2c_probe(), and i2c_init(). The
>>> twl4030_i2c.c driver doesn't seem to fit this mold. Perhaps it would be
>>> better placed in drivers/misc or a new drivers/power directory similar
>>> to Linux?
>> This function probably belongs to board/omap3/common/power.c -> or even better to the board file itself?
>
> I was about to mention the opposite ;)
>
> Jean-Christophe asked to move the code from power.c to driver directory
>
> http://lists.denx.de/pipermail/u-boot/2009-May/052400.html
>
> If you follow above discussion, I was fine with power.c. If we get now
> a twl4030_i2c.c, we should merge the code from power.c into it, too
> (where ever it will be located and named, then).
Hmm.. why not in a "drivers/power" directory? This twl4030_i2c.c is no i2c
driver in my opinion. And I won;t to avoid creating subdirs in drivers/i2c.
I think an drivers/power directory would be a good solution.
bye
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
^ permalink raw reply [flat|nested] 44+ messages in thread
* [U-Boot] [PATCH 3/4] ZOOM2 Add power reset button
2009-06-10 14:27 ` [U-Boot] [PATCH 3/4] ZOOM2 " Peter Tyser
2009-06-10 14:43 ` Menon, Nishanth
@ 2009-06-10 17:56 ` Heiko Schocher
1 sibling, 0 replies; 44+ messages in thread
From: Heiko Schocher @ 2009-06-10 17:56 UTC (permalink / raw)
To: u-boot
Hello Peter,
Peter Tyser wrote:
>> diff --git a/drivers/i2c/twl4030_i2c.c b/drivers/i2c/twl4030_i2c.c
>> index 774f813..549f974 100644
>> --- a/drivers/i2c/twl4030_i2c.c
>> +++ b/drivers/i2c/twl4030_i2c.c
>> @@ -35,3 +35,25 @@ static inline int twl4030_i2c_read_u8(u8 chip_no, u8 *val, u8 reg)
>> return i2c_read(chip_no, reg, 1, val, 1);
>> }
>>
>> +/*
>> + * Power Reset
>> + */
>> +void twl4030_power_reset_init(void)
>> +{
>> +#ifdef CONFIG_OMAP3_ZOOM2
>> + u8 val = 0;
>> + if (twl4030_i2c_read_u8(TWL4030_CHIP_PM_MASTER, &val,
>> + TWL4030_PM_MASTER_P1_SW_EVENTS)) {
>> + printf("Error:TWL4030: failed to read the power register\n");
>> + printf("Could not initialize hardware reset\n");
>> + } else {
>> + val |= TWL4030_PM_MASTER_SW_EVENTS_STOPON_PWRON;
>> + if (twl4030_i2c_write_u8(TWL4030_CHIP_PM_MASTER, val,
>> + TWL4030_PM_MASTER_P1_SW_EVENTS)) {
>> + printf("Error:TWL4030: failed to write the power register\n");
>> + printf("Could not initialize hardware reset\n");
>> + }
>> + }
>> +#endif
>> +}
>> +
>
> All other drivers in drivers/i2c are host adapter drivers. Ie they
> implement i2c_read(), i2c_write(), i2c_probe(), and i2c_init(). The
> twl4030_i2c.c driver doesn't seem to fit this mold. Perhaps it would be
> better placed in drivers/misc or a new drivers/power directory similar
> to Linux?
Ack. Ah, I see, maybe drivers/power would be a better place for it.
> FWIW I had the same dilemma with the ds4510 i2c device which has support
> for GPIO, EEEPROM, etc and ended up putting it in drivers/misc.
Yes, I want to see in drivers/i2c only drivers, which implement the
i2c_* functions ... This twl4030 and the ds4510 drivers, use an i2c
driver from hopefully in "drivers/i2c", and should go in an
"drivers/"subsystem"" directory ...
bye
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
^ permalink raw reply [flat|nested] 44+ messages in thread
* [U-Boot] [PATCH 3/4] ZOOM2 Add power reset button
2009-06-10 12:53 ` [U-Boot] [PATCH 3/4] ZOOM2 Add power reset button Tom Rix
2009-06-10 12:53 ` [U-Boot] [PATCH 4/4] ZOOM1 " Tom Rix
2009-06-10 14:27 ` [U-Boot] [PATCH 3/4] ZOOM2 " Peter Tyser
@ 2009-06-10 17:48 ` Heiko Schocher
2 siblings, 0 replies; 44+ messages in thread
From: Heiko Schocher @ 2009-06-10 17:48 UTC (permalink / raw)
To: u-boot
Hello Tom,
Tom Rix wrote:
> The power reset button is on the top right side of the main board.
> Press and hold for about to 8 seconds to completely reset the board.
>
> Some of the beta boards have a hardware problem that prevents
> using this feature. If is difficult to further characterize the
> boards that fail. So disable resetting for all beta boards.
>
> Signed-off-by: Tom Rix <Tom.Rix@windriver.com>
> ---
> board/omap3/zoom2/zoom2.c | 13 +++++++++++++
> drivers/i2c/twl4030_i2c.c | 22 ++++++++++++++++++++++
> include/configs/omap3_zoom2.h | 1 +
> include/twl4030.h | 10 ++++++++++
> 4 files changed, 46 insertions(+), 0 deletions(-)
>
> diff --git a/board/omap3/zoom2/zoom2.c b/board/omap3/zoom2/zoom2.c
> index 08fdafb..d5da920 100644
> --- a/board/omap3/zoom2/zoom2.c
> +++ b/board/omap3/zoom2/zoom2.c
[...]
> diff --git a/drivers/i2c/twl4030_i2c.c b/drivers/i2c/twl4030_i2c.c
> index 774f813..549f974 100644
> --- a/drivers/i2c/twl4030_i2c.c
> +++ b/drivers/i2c/twl4030_i2c.c
> @@ -35,3 +35,25 @@ static inline int twl4030_i2c_read_u8(u8 chip_no, u8 *val, u8 reg)
> return i2c_read(chip_no, reg, 1, val, 1);
> }
>
> +/*
> + * Power Reset
> + */
> +void twl4030_power_reset_init(void)
> +{
What has this to do with an i2c driver? No, I don;t want to see such
a function in an i2c driver. I tend to put this "driver" in an another
dir, like I said in my previous mail maybe in drivers/misc ...
bye
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
^ permalink raw reply [flat|nested] 44+ messages in thread
* [U-Boot] [PATCH 2/4] I2C Add initial support for TWL4030
2009-06-10 12:53 ` [U-Boot] [PATCH 2/4] I2C Add initial support for TWL4030 Tom Rix
2009-06-10 12:53 ` [U-Boot] [PATCH 3/4] ZOOM2 Add power reset button Tom Rix
@ 2009-06-10 14:46 ` Menon, Nishanth
2009-06-10 17:59 ` Heiko Schocher
2009-06-10 17:45 ` Heiko Schocher
2009-07-19 9:19 ` Wolfgang Denk
3 siblings, 1 reply; 44+ messages in thread
From: Menon, Nishanth @ 2009-06-10 14:46 UTC (permalink / raw)
To: u-boot
> -----Original Message-----
> From: Tom Rix [mailto:Tom.Rix at windriver.com]
> Sent: Wednesday, June 10, 2009 7:54 AM
> To: u-boot at lists.denx.de
> Cc: dirk.behme at googlemail.com; Menon, Nishanth; Tom Rix
> Subject: [PATCH 2/4] I2C Add initial support for TWL4030
>
> ---
> drivers/i2c/Makefile | 1 +
> drivers/i2c/twl4030_i2c.c | 37 ++++++++
> include/twl4030.h | 221
This is an interesting area -> in kernel we used to have i2c/busses and i2c/chips -> u-boot has drivers/i2c which probably is equivalent to i2c/busses -> should we create subdirectories there? In the current form, this driver does not fit into drivers/i2c if I am not wrong..
Regards,
Nishanth Menon
^ permalink raw reply [flat|nested] 44+ messages in thread
* [U-Boot] [PATCH 2/4] I2C Add initial support for TWL4030
2009-06-10 14:46 ` [U-Boot] [PATCH 2/4] I2C Add initial support for TWL4030 Menon, Nishanth
@ 2009-06-10 17:59 ` Heiko Schocher
0 siblings, 0 replies; 44+ messages in thread
From: Heiko Schocher @ 2009-06-10 17:59 UTC (permalink / raw)
To: u-boot
Hello Menon,
Menon, Nishanth wrote:
>> -----Original Message-----
>> From: Tom Rix [mailto:Tom.Rix at windriver.com]
>> Sent: Wednesday, June 10, 2009 7:54 AM
>> To: u-boot at lists.denx.de
>> Cc: dirk.behme at googlemail.com; Menon, Nishanth; Tom Rix
>> Subject: [PATCH 2/4] I2C Add initial support for TWL4030
>>
>> ---
>> drivers/i2c/Makefile | 1 +
>> drivers/i2c/twl4030_i2c.c | 37 ++++++++
>> include/twl4030.h | 221
> This is an interesting area -> in kernel we used to have i2c/busses and i2c/chips -> u-boot has drivers/i2c which probably is equivalent to i2c/busses -> should we create subdirectories there? In the current form, this driver does not fit into drivers/i2c if I am not wrong..
No, I think it is not necessary here to create subdirs in "drivers/i2c".
This driver should go in "drivers/power" ...
bye
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
^ permalink raw reply [flat|nested] 44+ messages in thread
* [U-Boot] [PATCH 2/4] I2C Add initial support for TWL4030
2009-06-10 12:53 ` [U-Boot] [PATCH 2/4] I2C Add initial support for TWL4030 Tom Rix
2009-06-10 12:53 ` [U-Boot] [PATCH 3/4] ZOOM2 Add power reset button Tom Rix
2009-06-10 14:46 ` [U-Boot] [PATCH 2/4] I2C Add initial support for TWL4030 Menon, Nishanth
@ 2009-06-10 17:45 ` Heiko Schocher
2009-07-19 9:19 ` Wolfgang Denk
3 siblings, 0 replies; 44+ messages in thread
From: Heiko Schocher @ 2009-06-10 17:45 UTC (permalink / raw)
To: u-boot
Hello Tom,
Tom Rix wrote:
> The TWL4030 supplies many peripheral for OMAP3 boards. These include
> power management, usb and, keyboard.
>
> The product description is found here:
>
> http://focus.ti.com/docs/prod/folders/print/tps65950.html
>
> Product reference document, tps65950.pdf, is found here:
>
> http://www.ti.com/lit/gpn/tps65950
>
> Signed-off-by: Tom Rix <Tom.Rix@windriver.com>
> ---
> drivers/i2c/Makefile | 1 +
> drivers/i2c/twl4030_i2c.c | 37 ++++++++
> include/twl4030.h | 221 +++++++++++++++++++++++++++++++++++++++++++++
> 3 files changed, 259 insertions(+), 0 deletions(-)
> create mode 100644 drivers/i2c/twl4030_i2c.c
> create mode 100644 include/twl4030.h
>
> diff --git a/drivers/i2c/Makefile b/drivers/i2c/Makefile
> index ef32f13..97d9128 100644
> --- a/drivers/i2c/Makefile
> +++ b/drivers/i2c/Makefile
> @@ -36,6 +36,7 @@ COBJS-$(CONFIG_DRIVER_S3C24X0_I2C) += s3c24x0_i2c.o
> COBJS-$(CONFIG_S3C44B0_I2C) += s3c44b0_i2c.o
> COBJS-$(CONFIG_SOFT_I2C) += soft_i2c.o
> COBJS-$(CONFIG_TSI108_I2C) += tsi108_i2c.o
> +COBJS-$(CONFIG_DRIVER_TWL4030_I2C) += twl4030_i2c.o
>
> COBJS := $(COBJS-y)
> SRCS := $(COBJS:.o=.c)
> diff --git a/drivers/i2c/twl4030_i2c.c b/drivers/i2c/twl4030_i2c.c
> new file mode 100644
> index 0000000..774f813
> --- /dev/null
> +++ b/drivers/i2c/twl4030_i2c.c
> @@ -0,0 +1,37 @@
> +/*
> + * Copyright (c) 2009 Wind River Systems, Inc.
> + * Tom Rix <Tom.Rix@windriver.com>
> + *
> + * This program is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public License as
> + * published by the Free Software Foundation; either version 2 of
> + * the License, or (at your option) any later version.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> + * GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program; if not, write to the Free Software
> + * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
> + * MA 02111-1307 USA
> + *
> + * Derived from code on omapzoom, git://git.omapzoom.com/repo/u-boot.git
> + *
> + * Copyright (C) 2007-2009 Texas Instruments, Inc.
> + */
> +
> +#include <twl4030.h>
> +
> +/* Functions to read and write from TWL4030 */
> +static inline int twl4030_i2c_write_u8(u8 chip_no, u8 val, u8 reg)
> +{
> + return i2c_write(chip_no, reg, 1, &val, 1);
> +}
> +
> +static inline int twl4030_i2c_read_u8(u8 chip_no, u8 *val, u8 reg)
> +{
> + return i2c_read(chip_no, reg, 1, val, 1);
> +}
> +
? Is your patch complete?
Where are i2c_read(), i2c_write(),... functions, like in the other
i2c drivers in u-boot? This seems no i2c driver to me, more than
some board specific code, which you can add in your board.c ...
or something like drivers/misc, if this is code is used in more than
one plattform ... ?
> diff --git a/include/twl4030.h b/include/twl4030.h
> new file mode 100644
> index 0000000..d17fea5
> --- /dev/null
> +++ b/include/twl4030.h
> @@ -0,0 +1,221 @@
> +/*
[...]
bye
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
^ permalink raw reply [flat|nested] 44+ messages in thread
* [U-Boot] [PATCH 2/4] I2C Add initial support for TWL4030
2009-06-10 12:53 ` [U-Boot] [PATCH 2/4] I2C Add initial support for TWL4030 Tom Rix
` (2 preceding siblings ...)
2009-06-10 17:45 ` Heiko Schocher
@ 2009-07-19 9:19 ` Wolfgang Denk
2009-07-19 15:23 ` Heiko Schocher
3 siblings, 1 reply; 44+ messages in thread
From: Wolfgang Denk @ 2009-07-19 9:19 UTC (permalink / raw)
To: u-boot
Dear Heiko,
In message <1244638432-30893-3-git-send-email-Tom.Rix@windriver.com> Tom Rix wrote:
> The TWL4030 supplies many peripheral for OMAP3 boards. These include
> power management, usb and, keyboard.
>
> The product description is found here:
>
> http://focus.ti.com/docs/prod/folders/print/tps65950.html
>
> Product reference document, tps65950.pdf, is found here:
>
> http://www.ti.com/lit/gpn/tps65950
>
> Signed-off-by: Tom Rix <Tom.Rix@windriver.com>
> ---
> drivers/i2c/Makefile | 1 +
> drivers/i2c/twl4030_i2c.c | 37 ++++++++
> include/twl4030.h | 221 +++++++++++++++++++++++++++++++++++++++++++++
> 3 files changed, 259 insertions(+), 0 deletions(-)
> create mode 100644 drivers/i2c/twl4030_i2c.c
> create mode 100644 include/twl4030.h
I think this is supposed to go through the i2c repo, but I haven't
seen any comments yet.
Can you please check the state of this patch? Thanks in advance.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Philosophy is a game with objectives and no rules.
Mathematics is a game with rules and no objectives.
^ permalink raw reply [flat|nested] 44+ messages in thread
* [U-Boot] [PATCH 2/4] I2C Add initial support for TWL4030
2009-07-19 9:19 ` Wolfgang Denk
@ 2009-07-19 15:23 ` Heiko Schocher
2009-07-19 17:06 ` Tom
0 siblings, 1 reply; 44+ messages in thread
From: Heiko Schocher @ 2009-07-19 15:23 UTC (permalink / raw)
To: u-boot
Hello Wolfgang,
Wolfgang Denk wrote:
> In message <1244638432-30893-3-git-send-email-Tom.Rix@windriver.com> Tom Rix wrote:
>> The TWL4030 supplies many peripheral for OMAP3 boards. These include
>> power management, usb and, keyboard.
>>
>> The product description is found here:
>>
>> http://focus.ti.com/docs/prod/folders/print/tps65950.html
>>
>> Product reference document, tps65950.pdf, is found here:
>>
>> http://www.ti.com/lit/gpn/tps65950
>>
>> Signed-off-by: Tom Rix <Tom.Rix@windriver.com>
>> ---
>> drivers/i2c/Makefile | 1 +
>> drivers/i2c/twl4030_i2c.c | 37 ++++++++
>> include/twl4030.h | 221 +++++++++++++++++++++++++++++++++++++++++++++
>> 3 files changed, 259 insertions(+), 0 deletions(-)
>> create mode 100644 drivers/i2c/twl4030_i2c.c
>> create mode 100644 include/twl4030.h
>
> I think this is supposed to go through the i2c repo, but I haven't
> seen any comments yet.
Hmm.. there are responses, see for example:
http://lists.denx.de/pipermail/u-boot/2009-June/054086.html
> Can you please check the state of this patch? Thanks in advance.
Hmm.. it is a little long to follow this ... it ended
first here:
http://lists.denx.de/pipermail/u-boot/2009-June/054654.html
waiting for an Ack that it works on omap2 ...
(I Acked the resulting 3 patches, see:
http://lists.denx.de/pipermail/u-boot/2009-June/054585.html
)
Ah, found one more answer from Tom:
http://lists.denx.de/pipermail/u-boot/2009-June/054801.html
ended in:
http://lists.denx.de/pipermail/u-boot/2009-June/055071.html
with a new patchset of 6 patches, starting with:
http://lists.denx.de/pipermail/u-boot/2009-June/055072.html
but state of omap2 is still pending ... see:
http://lists.denx.de/pipermail/u-boot/2009-June/055087.html
then Tom wrote, he has setup a git repo, see:
http://lists.denx.de/pipermail/u-boot/2009-July/055328.html
but I think, the state of the omap2 is pending ... so
I (and I think Jean-Christophe also) wait for, that this
pending state is going away ...
Tom, do you have an update?
(added Jean-Christophe to cc:)
bye
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
^ permalink raw reply [flat|nested] 44+ messages in thread
* [U-Boot] [PATCH 2/4] I2C Add initial support for TWL4030
2009-07-19 15:23 ` Heiko Schocher
@ 2009-07-19 17:06 ` Tom
2009-07-20 9:12 ` Heiko Schocher
2009-07-20 15:38 ` Dirk Behme
0 siblings, 2 replies; 44+ messages in thread
From: Tom @ 2009-07-19 17:06 UTC (permalink / raw)
To: u-boot
Omap2 is still pending.
I was hoping to help Richard out with this last week but he was on travel.
There is not much more I think I can do wrt omap2.
All my targets are omap3.
The nearest I can find online is the nokia n8xx which uses a another
bootloader.
The options as I see them are.
1. Get a pass on omap2 testing
2. Rewrite i2c init to have a omap3 specific init
3. Hack n8xx and try to convience you the results are reasonable
4. Wait for omap2 testing.
I vote for #1.
Tom
Heiko Schocher wrote:
> Hello Wolfgang,
>
> Wolfgang Denk wrote:
>
>> In message <1244638432-30893-3-git-send-email-Tom.Rix@windriver.com> Tom Rix wrote:
>>
>>> The TWL4030 supplies many peripheral for OMAP3 boards. These include
>>> power management, usb and, keyboard.
>>>
>>> The product description is found here:
>>>
>>> http://focus.ti.com/docs/prod/folders/print/tps65950.html
>>>
>>> Product reference document, tps65950.pdf, is found here:
>>>
>>> http://www.ti.com/lit/gpn/tps65950
>>>
>>> Signed-off-by: Tom Rix <Tom.Rix@windriver.com>
>>> ---
>>> drivers/i2c/Makefile | 1 +
>>> drivers/i2c/twl4030_i2c.c | 37 ++++++++
>>> include/twl4030.h | 221 +++++++++++++++++++++++++++++++++++++++++++++
>>> 3 files changed, 259 insertions(+), 0 deletions(-)
>>> create mode 100644 drivers/i2c/twl4030_i2c.c
>>> create mode 100644 include/twl4030.h
>>>
>> I think this is supposed to go through the i2c repo, but I haven't
>> seen any comments yet.
>>
>
>
> Hmm.. there are responses, see for example:
>
> http://lists.denx.de/pipermail/u-boot/2009-June/054086.html
>
>
>> Can you please check the state of this patch? Thanks in advance.
>>
>
> Hmm.. it is a little long to follow this ... it ended
> first here:
>
> http://lists.denx.de/pipermail/u-boot/2009-June/054654.html
>
> waiting for an Ack that it works on omap2 ...
>
> (I Acked the resulting 3 patches, see:
> http://lists.denx.de/pipermail/u-boot/2009-June/054585.html
> )
>
> Ah, found one more answer from Tom:
>
> http://lists.denx.de/pipermail/u-boot/2009-June/054801.html
>
> ended in:
>
> http://lists.denx.de/pipermail/u-boot/2009-June/055071.html
>
> with a new patchset of 6 patches, starting with:
> http://lists.denx.de/pipermail/u-boot/2009-June/055072.html
>
> but state of omap2 is still pending ... see:
>
> http://lists.denx.de/pipermail/u-boot/2009-June/055087.html
>
> then Tom wrote, he has setup a git repo, see:
> http://lists.denx.de/pipermail/u-boot/2009-July/055328.html
>
> but I think, the state of the omap2 is pending ... so
> I (and I think Jean-Christophe also) wait for, that this
> pending state is going away ...
>
> Tom, do you have an update?
>
> (added Jean-Christophe to cc:)
> bye
> Heiko
>
^ permalink raw reply [flat|nested] 44+ messages in thread
* [U-Boot] [PATCH 2/4] I2C Add initial support for TWL4030
2009-07-19 17:06 ` Tom
@ 2009-07-20 9:12 ` Heiko Schocher
2009-07-22 21:41 ` Jean-Christophe PLAGNIOL-VILLARD
2009-07-20 15:38 ` Dirk Behme
1 sibling, 1 reply; 44+ messages in thread
From: Heiko Schocher @ 2009-07-20 9:12 UTC (permalink / raw)
To: u-boot
Hello Tom,
Tom wrote:
> Omap2 is still pending.
> I was hoping to help Richard out with this last week but he was on travel.
>
> There is not much more I think I can do wrt omap2.
> All my targets are omap3.
> The nearest I can find online is the nokia n8xx which uses a another
> bootloader.
>
> The options as I see them are.
>
> 1. Get a pass on omap2 testing
> 2. Rewrite i2c init to have a omap3 specific init
> 3. Hack n8xx and try to convience you the results are reasonable
> 4. Wait for omap2 testing.
>
> I vote for #1.
Hmm.. because I think this patches go through Jean-Christophe he has
to decide if this is acceptable.
bye
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
^ permalink raw reply [flat|nested] 44+ messages in thread
* [U-Boot] [PATCH 2/4] I2C Add initial support for TWL4030
2009-07-20 9:12 ` Heiko Schocher
@ 2009-07-22 21:41 ` Jean-Christophe PLAGNIOL-VILLARD
0 siblings, 0 replies; 44+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2009-07-22 21:41 UTC (permalink / raw)
To: u-boot
On 11:12 Mon 20 Jul , Heiko Schocher wrote:
> Hello Tom,
>
> Tom wrote:
> > Omap2 is still pending.
> > I was hoping to help Richard out with this last week but he was on travel.
> >
> > There is not much more I think I can do wrt omap2.
> > All my targets are omap3.
> > The nearest I can find online is the nokia n8xx which uses a another
> > bootloader.
> >
> > The options as I see them are.
> >
> > 1. Get a pass on omap2 testing
> > 2. Rewrite i2c init to have a omap3 specific init
> > 3. Hack n8xx and try to convience you the results are reasonable
> > 4. Wait for omap2 testing.
> >
> > I vote for #1.
>
> Hmm.. because I think this patches go through Jean-Christophe he has
> to decide if this is acceptable.
we will not get a pass on the omap2
but we will do this in a second step as agree with Nishanth
Best Regards,
J.
^ permalink raw reply [flat|nested] 44+ messages in thread
* [U-Boot] [PATCH 2/4] I2C Add initial support for TWL4030
2009-07-19 17:06 ` Tom
2009-07-20 9:12 ` Heiko Schocher
@ 2009-07-20 15:38 ` Dirk Behme
1 sibling, 0 replies; 44+ messages in thread
From: Dirk Behme @ 2009-07-20 15:38 UTC (permalink / raw)
To: u-boot
Tom wrote:
> Omap2 is still pending.
> I was hoping to help Richard out with this last week but he was on travel.
>
> There is not much more I think I can do wrt omap2.
> All my targets are omap3.
> The nearest I can find online is the nokia n8xx which uses a another
> bootloader.
>
> The options as I see them are.
>
> 1. Get a pass on omap2 testing
> 2. Rewrite i2c init to have a omap3 specific init
> 3. Hack n8xx and try to convience you the results are reasonable
> 4. Wait for omap2 testing.
>
> I vote for #1.
Me too.
Dirk
> Heiko Schocher wrote:
>> Hello Wolfgang,
>>
>> Wolfgang Denk wrote:
>>
>>> In message <1244638432-30893-3-git-send-email-Tom.Rix@windriver.com> Tom Rix wrote:
>>>
>>>> The TWL4030 supplies many peripheral for OMAP3 boards. These include
>>>> power management, usb and, keyboard.
>>>>
>>>> The product description is found here:
>>>>
>>>> http://focus.ti.com/docs/prod/folders/print/tps65950.html
>>>>
>>>> Product reference document, tps65950.pdf, is found here:
>>>>
>>>> http://www.ti.com/lit/gpn/tps65950
>>>>
>>>> Signed-off-by: Tom Rix <Tom.Rix@windriver.com>
>>>> ---
>>>> drivers/i2c/Makefile | 1 +
>>>> drivers/i2c/twl4030_i2c.c | 37 ++++++++
>>>> include/twl4030.h | 221 +++++++++++++++++++++++++++++++++++++++++++++
>>>> 3 files changed, 259 insertions(+), 0 deletions(-)
>>>> create mode 100644 drivers/i2c/twl4030_i2c.c
>>>> create mode 100644 include/twl4030.h
>>>>
>>> I think this is supposed to go through the i2c repo, but I haven't
>>> seen any comments yet.
>>>
>>
>> Hmm.. there are responses, see for example:
>>
>> http://lists.denx.de/pipermail/u-boot/2009-June/054086.html
>>
>>
>>> Can you please check the state of this patch? Thanks in advance.
>>>
>> Hmm.. it is a little long to follow this ... it ended
>> first here:
>>
>> http://lists.denx.de/pipermail/u-boot/2009-June/054654.html
>>
>> waiting for an Ack that it works on omap2 ...
>>
>> (I Acked the resulting 3 patches, see:
>> http://lists.denx.de/pipermail/u-boot/2009-June/054585.html
>> )
>>
>> Ah, found one more answer from Tom:
>>
>> http://lists.denx.de/pipermail/u-boot/2009-June/054801.html
>>
>> ended in:
>>
>> http://lists.denx.de/pipermail/u-boot/2009-June/055071.html
>>
>> with a new patchset of 6 patches, starting with:
>> http://lists.denx.de/pipermail/u-boot/2009-June/055072.html
>>
>> but state of omap2 is still pending ... see:
>>
>> http://lists.denx.de/pipermail/u-boot/2009-June/055087.html
>>
>> then Tom wrote, he has setup a git repo, see:
>> http://lists.denx.de/pipermail/u-boot/2009-July/055328.html
>>
>> but I think, the state of the omap2 is pending ... so
>> I (and I think Jean-Christophe also) wait for, that this
>> pending state is going away ...
>>
>> Tom, do you have an update?
>>
>> (added Jean-Christophe to cc:)
>> bye
>> Heiko
>>
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>
^ permalink raw reply [flat|nested] 44+ messages in thread