OMAP3: Add support for mvBlueLYNX-X
Subsystems (3)
cover OMAP3: Add support for mvBlueLYNX-X
Add support for the Matrix Vision mvBlueLYNX-X, an OMAP3-based intelligent camera.
These patches were created on top of v2011.06, but they also apply cleanly to master and u-boot-arm/master. What should I use as base to submit such a patch?
Howard D. Gray (1):
Add 37xx ESx revision numbers.
Michael Jones (5):
fpga: support FPP Cyclone configuration
mmc: rescan fails on empty slot
mv_common.c: don't compile reset_environment if ENV_IS_NOWHERE
ARMV7: OMAP: I2C driver: Write more than 1 byte at a time in
i2c_write
mvblx: Initial support for mvBlueLYNX-X
MAINTAINERS | 4 + MAKEALL | 1 + arch/arm/cpu/armv7/omap3/sys_info.c | 13 +- arch/arm/include/asm/arch-omap3/omap3.h | 10 + board/matrix_vision/common/mv_common.c | 2 + board/matrix_vision/mvblx/Makefile | 53 ++++ board/matrix_vision/mvblx/config.mk | 33 +++ board/matrix_vision/mvblx/fpga.c | 222 +++++++++++++++++ board/matrix_vision/mvblx/fpga.h | 32 +++ board/matrix_vision/mvblx/mvblx.c | 171 +++++++++++++ board/matrix_vision/mvblx/mvblx.h | 362 ++++++++++++++++++++++++++++ board/matrix_vision/mvblx/sys_eeprom.c | 396 +++++++++++++++++++++++++++++++ boards.cfg | 1 + common/cmd_mmc.c | 6 +- doc/README.omap3 | 5 + drivers/fpga/cyclon2.c | 10 + drivers/i2c/omap24xx_i2c.c | 134 +++++------ include/configs/omap3_mvblx.h | 312 ++++++++++++++++++++++++ 18 files changed, 1686 insertions(+), 81 deletions(-) create mode 100644 board/matrix_vision/mvblx/Makefile create mode 100644 board/matrix_vision/mvblx/config.mk create mode 100644 board/matrix_vision/mvblx/fpga.c create mode 100644 board/matrix_vision/mvblx/fpga.h create mode 100644 board/matrix_vision/mvblx/mvblx.c create mode 100644 board/matrix_vision/mvblx/mvblx.h create mode 100644 board/matrix_vision/mvblx/sys_eeprom.c create mode 100644 include/configs/omap3_mvblx.h
Signature · 6 lines
1.7.5.4 MATRIX VISION GmbH, Talstrasse 16, DE-71570 Oppenweiler Registergericht: Amtsgericht Stuttgart, HRB 271090 Geschaeftsfuehrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner, Erhard Meier
PATCH 1/7 fpga: add #define for Altera Cyclone EP3C5
--- include/ACEX1K.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
include/ACEX1K.h +1 -0
@@ -76,6 +76,7 @@ typedef struct {#define Altera_EP2C8_SIZE 247942#define Altera_EP2C20_SIZE 586562#define Altera_EP2C35_SIZE 883905 +#define Altera_EP3C5_SIZE 368011/* .rbf size in bytes */ /* Descriptor Macros *********************************************************************/
Signature · 6 lines
1.7.5.4 MATRIX VISION GmbH, Talstrasse 16, DE-71570 Oppenweiler Registergericht: Amtsgericht Stuttgart, HRB 271090 Geschaeftsfuehrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner, Erhard Meier
Wolfgang Denk
AppliedPATCH 1/7 fpga: add #define for Altera Cyclone EP3C5
Dear Michael Jones,
Quoted 5 lines · In message <[email protected]>…
Signed-off-by Michael Jones <[email protected]>--- include/ACEX1K.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 5 lines
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 "Gravitation cannot be held responsible for people falling in love." - Albert Einstein
PATCH 2/7 fpga: support FPP Cyclone configuration
In reply to Michael JonesSupport FPGAs which use Fast Passive Parallel configuration
--- drivers/fpga/cyclon2.c | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-)
drivers/fpga/cyclon2.c +10 -0
@@ -63,6 +63,16 @@ int CYC2_load (Altera_desc * desc, void *buf, size_t bsize) ret_val =CYC2_ps_load (desc, buf, bsize);break ; +case fast_passive_parallel: +/* Fast Passive Parallel (FPP) and PS only differ in what is +* done in the write() callback. Use the existing PS load +* function for FPP, too. +*/ +PRINTF ("%s: Launching Fast Passive Parallel Loader\n" , + __FUNCTION__); + ret_val =CYC2_ps_load (desc, buf, bsize); +break ; +/* Add new interface types here */ default :
Signature · 6 lines
1.7.5.4 MATRIX VISION GmbH, Talstrasse 16, DE-71570 Oppenweiler Registergericht: Amtsgericht Stuttgart, HRB 271090 Geschaeftsfuehrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner, Erhard Meier
Wolfgang Denk
AppliedPATCH 2/7 fpga: support FPP Cyclone configuration
Dear Michael Jones,
Quoted 6 lines · In message <[email protected]>…
Support FPGAs which use Fast Passive Parallel configuration
Signed-off-by Michael Jones <[email protected]>--- drivers/fpga/cyclon2.c | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 5 lines
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 It is easier to write an incorrect program than understand a correct one.
PATCH 3/7 ARMV7: OMAP3: Add 37xx ESx revision numbers.
In reply to Michael JonesFrom: "Howard D. Gray" <[email protected]>
--- arch/arm/cpu/armv7/omap3/sys_info.c | 13 ++++++++++++- arch/arm/include/asm/arch-omap3/omap3.h | 10 ++++++++++ 2 files changed, 22 insertions(+), 1 deletions(-)
arch/arm/cpu/armv7/omap3/sys_info.c +12 -1
@@ -43,6 +43,12 @@ static char *rev_s[CPU_3XX_MAX_REV] = {"UNKNOWN" , "3.1.2"}; +/* this is the revision table for 37xx CPUs */ +static char *rev_s_37xx[CPU_37XX_MAX_REV ] = { +"1.0" , +"1.1" , +"1.2" }; +/***************************************************************** * dieid_num_r(void) - read and set die ID *****************************************************************/
@@ -344,7 +350,12 @@ int print_cpuinfo (void) sec_s ="?" ; } -printf ("%s%s-%s ES%s, CPU-OPP2, L3-165MHz, Max CPU Clock %s\n" , +if (CPU_OMAP36XX ==get_cpu_family ()) +printf ("%s%s-%s ES%s, CPU-OPP2, L3-165MHz, Max CPU Clock %s\n" , + cpu_family_s, cpu_s, sec_s, + rev_s_37xx[get_cpu_rev ()], max_clk); +else +printf ("%s%s-%s ES%s, CPU-OPP2, L3-165MHz, Max CPU Clock %s\n" , cpu_family_s, cpu_s, sec_s, rev_s[get_cpu_rev ()], max_clk);
arch/arm/include/asm/arch-omap3/omap3.h +10 -0
@@ -193,6 +193,16 @@ struct gpio {#define CPU_3XX_ES312 7#define CPU_3XX_MAX_REV 8 +/* +* 37xx real hardware: +* ES1.0 onwards, the value maps to contents of IDCODE register [31:28]. +*/ + +#define CPU_37XX_ES10 0 +#define CPU_37XX_ES11 1 +#define CPU_37XX_ES12 2 +#define CPU_37XX_MAX_REV 3 +#define CPU_3XX_ID_SHIFT 28#define WIDTH_8BIT 0x0000
Signature · 1 line
1.7.5.4
PATCH v2 3/7 ARMV7: OMAP3: Add 37xx ESx revision numbers.
From: "Howard D. Gray" <[email protected]>
---
Changes for v2:
- None. Resubmitting to include custodian in cc:
arch/arm/cpu/armv7/omap3/sys_info.c | 13 ++++++++++++- arch/arm/include/asm/arch-omap3/omap3.h | 10 ++++++++++ 2 files changed, 22 insertions(+), 1 deletions(-)
arch/arm/cpu/armv7/omap3/sys_info.c +12 -1
@@ -43,6 +43,12 @@ static char *rev_s[CPU_3XX_MAX_REV] = {"UNKNOWN" , "3.1.2"}; +/* this is the revision table for 37xx CPUs */ +static char *rev_s_37xx[CPU_37XX_MAX_REV ] = { +"1.0" , +"1.1" , +"1.2" }; +/***************************************************************** * dieid_num_r(void) - read and set die ID *****************************************************************/
@@ -344,7 +350,12 @@ int print_cpuinfo (void) sec_s ="?" ; } -printf ("%s%s-%s ES%s, CPU-OPP2, L3-165MHz, Max CPU Clock %s\n" , +if (CPU_OMAP36XX ==get_cpu_family ()) +printf ("%s%s-%s ES%s, CPU-OPP2, L3-165MHz, Max CPU Clock %s\n" , + cpu_family_s, cpu_s, sec_s, + rev_s_37xx[get_cpu_rev ()], max_clk); +else +printf ("%s%s-%s ES%s, CPU-OPP2, L3-165MHz, Max CPU Clock %s\n" , cpu_family_s, cpu_s, sec_s, rev_s[get_cpu_rev ()], max_clk);
arch/arm/include/asm/arch-omap3/omap3.h +10 -0
@@ -193,6 +193,16 @@ struct gpio {#define CPU_3XX_ES312 7#define CPU_3XX_MAX_REV 8 +/* +* 37xx real hardware: +* ES1.0 onwards, the value maps to contents of IDCODE register [31:28]. +*/ + +#define CPU_37XX_ES10 0 +#define CPU_37XX_ES11 1 +#define CPU_37XX_ES12 2 +#define CPU_37XX_MAX_REV 3 +#define CPU_3XX_ID_SHIFT 28#define WIDTH_8BIT 0x0000
Signature · 6 lines
1.7.5.4 MATRIX VISION GmbH, Talstrasse 16, DE-71570 Oppenweiler Registergericht: Amtsgericht Stuttgart, HRB 271090 Geschaeftsfuehrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner, Erhard Meier
PATCH 4/7 mmc: rescan fails on empty slot
In reply to Michael JonesFail in 'mmc rescan' if mmc_init() returns error
--- common/cmd_mmc.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-)
common/cmd_mmc.c +4 -2
@@ -165,9 +165,11 @@ int do_mmcops(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) } mmc->has_init =0 ; -mmc_init (mmc); -return 0 ; +if (mmc_init (mmc)) +return 1 ; +else +return 0 ; }else if (strncmp (argv[1 ],"part" ,4 ) ==0 ) {block_dev_desc_t *mmc_dev;struct mmc *mmc =find_mmc_device (curr_device);
Signature · 6 lines
1.7.5.4 MATRIX VISION GmbH, Talstrasse 16, DE-71570 Oppenweiler Registergericht: Amtsgericht Stuttgart, HRB 271090 Geschaeftsfuehrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner, Erhard Meier
PATCH v2 4/7 mmc: rescan fails on empty slot
Fail in 'mmc rescan' if mmc_init() returns error
---
Changes for v2:
- None. Resubmitting to include custodian in cc:
common/cmd_mmc.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-)
common/cmd_mmc.c +4 -2
@@ -165,9 +165,11 @@ int do_mmcops(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) } mmc->has_init =0 ; -mmc_init (mmc); -return 0 ; +if (mmc_init (mmc)) +return 1 ; +else +return 0 ; }else if (strncmp (argv[1 ],"part" ,4 ) ==0 ) {block_dev_desc_t *mmc_dev;struct mmc *mmc =find_mmc_device (curr_device);
Signature · 6 lines
1.7.5.4 MATRIX VISION GmbH, Talstrasse 16, DE-71570 Oppenweiler Registergericht: Amtsgericht Stuttgart, HRB 271090 Geschaeftsfuehrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner, Erhard Meier
PATCH v2 4/7 mmc: rescan fails on empty slot
Quoted 1 line · Michael Jones
Fail in 'mmc rescan' if
mmc_init()returns error
I think, if we're going to do this, we should change them all.
Also, for the purpose you want, it seems like we should consider adding or modifying a command to just report whether the slot has a card.
Quoted 14 lines
Signed-off-by Michael Jones <[email protected]>---
Changes for v2:
?- None. Resubmitting to include custodian in cc:?common/cmd_mmc.c | ? ?6 ++++--
?1 files changed, 4 insertions(+), 2 deletions(-)common/cmd_mmc.c +0
-0
common/cmd_mmc.c int do_mmcops(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) · line 172
Quoted 10 lines
common/cmd_mmc.c +4
-2@@ -165,9 +165,11 @@ int do_mmcops(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) ? ? ? ? ? ? ? ?} ? ? ? ? ? ? ? ?mmc->has_init = 0; - ? ? ? ? ? ? ? mmc_init(mmc); - ? ? ? ? ? ? ? return 0; + ? ? ? ? ? ? ? if (mmc_init(mmc)) + ? ? ? ? ? ? ? ? ? ? ? return 1; + ? ? ? ? ? ? ? else + ? ? ? ? ? ? ? ? ? ? ? return 0;
Is there a reason to return 1 instead of returning whatever error mmc_init() returns?
ie:
return mmc_init(mmc);
Andy
PATCH v2 4/7 mmc: rescan fails on empty slot
Ok, I feel dumb. I apparently applied this already. But I'm still interested in a response to my comments/questions. :)
Quoted 47 lines · Andy Fleming
Quoted 1 line · Michael Jones
Fail in 'mmc rescan' if
mmc_init()returns errorI think, if we're going to do this, we should change them all.
Also, for the purpose you want, it seems like we should consider adding or modifying a command to just report whether the slot has a card.
Quoted 14 lines
Signed-off-by Michael Jones <[email protected]>---
Changes for v2:
?- None. Resubmitting to include custodian in cc:?common/cmd_mmc.c | ? ?6 ++++--
?1 files changed, 4 insertions(+), 2 deletions(-)common/cmd_mmc.c +0
-0common/cmd_mmc.c int do_mmcops(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) · line 172
Quoted 10 lines
common/cmd_mmc.c +4
-2@@ -165,9 +165,11 @@ int do_mmcops(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) ? ? ? ? ? ? ? ?} ? ? ? ? ? ? ? ?mmc->has_init = 0; - ? ? ? ? ? ? ? mmc_init(mmc); - ? ? ? ? ? ? ? return 0; + ? ? ? ? ? ? ? if (mmc_init(mmc)) + ? ? ? ? ? ? ? ? ? ? ? return 1; + ? ? ? ? ? ? ? else + ? ? ? ? ? ? ? ? ? ? ? return 0;Is there a reason to return 1 instead of returning whatever error
mmc_init()returns?ie:
return
mmc_init(mmc);Andy
PATCH v2 4/7 mmc: rescan fails on empty slot
Hi Andy,
Quoted 3 lines · Andy Fleming
Ok, I feel dumb. I apparently applied this already. But I'm still interested in a response to my comments/questions. :)
OK, I'll humor you :)
Quoted 7 lines · Andy Fleming
Quoted 5 lines
Quoted 1 line · Michael Jones
Fail in 'mmc rescan' if
mmc_init()returns errorI think, if we're going to do this, we should change them all.
I agree it would be logical to return failed from the other mmc commands if mmc_init() fails. I can submit such a patch for that if you want after we agree the best way to structure the 'return' (see below).
Quoted 4 lines
Quoted 4 lines
Also, for the purpose you want, it seems like we should consider adding or modifying a command to just report whether the slot has a card.
Yes, that would be logical and tidier than the current solution. However, the way it is now also meets my needs, although it's ugly because it prints "Card did not respond to voltage select!".
Quoted 31 lines
Quoted 31 lines
Quoted 16 lines
Signed-off-by Michael Jones <[email protected]>---
Changes for v2:
- None. Resubmitting to include custodian in cc:common/cmd_mmc.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-)common/cmd_mmc.c +0
-0common/cmd_mmc.c int do_mmcops(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) · line 172
Quoted 10 lines
common/cmd_mmc.c +4
-2@@ -165,9 +165,11 @@ int do_mmcops(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) } mmc->has_init =0 ; -mmc_init (mmc); -return 0 ; +if (mmc_init (mmc)) +return 1 ; +else +return 0 ;Is there a reason to return 1 instead of returning whatever error
mmc_init()returns?
Quoted 3 lines
Quoted 3 lines
ie:
return
mmc_init(mmc);
It looked to me like do_mmcops should only return either a 1 for fail or 0 for success. mmc_init() returns UNUSABLE_ERR (interesting that it's not NO_CARD_ERR) when there is no card.
This is the command I wanted to enable with the patch:
if mmc rescan; then echo "rescan true"; else echo "rescan false"; fi;
As it is, when the slot is empty this prints:
Card did not respond to voltage select!
rescan false
If UNUSABLE_ERR is returned directly from do_mmcops, I get:
Card did not respond to voltage select!
exit not allowed from main input shell.
Do you want something more compact like 'return !!mmc_init(mmc)' or
return mmc_init(mmc) ? 1 : 0; ?
Quoted 4 lines
Quoted 4 lines
Andy
-Michael
MATRIX VISION GmbH, Talstrasse 16, DE-71570 Oppenweiler
Registergericht: Amtsgericht Stuttgart, HRB 271090
Geschaeftsfuehrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner, Erhard Meier
PATCH 4/7 mmc: rescan fails on empty slot
In reply to Michael JonesHi Michael.
I have some question. there are some mmc_init().
But you are only checked there..
Did you have any special reason?
Regards,
Jaehoon Chung
Quoted 25 lines · Michael Jones
Fail in 'mmc rescan' if
mmc_init()returns errorSigned-off-by Michael Jones <[email protected]>--- common/cmd_mmc.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-)common/cmd_mmc.c +4
-2@@ -165,9 +165,11 @@ int do_mmcops(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) } mmc->has_init =0 ; -mmc_init (mmc); -return 0 ; +if (mmc_init (mmc)) +return 1 ; +else +return 0 ; }else if (strncmp (argv[1 ],"part" ,4 ) ==0 ) {block_dev_desc_t *mmc_dev;struct mmc *mmc =find_mmc_device (curr_device);
PATCH 4/7 mmc: rescan fails on empty slot
Hi Jaehoon Chung,
Quoted 9 lines · Jaehoon Chung
Hi Michael.
I have some question. there are some
mmc_init().
But you are only checked there..
Did you have any special reason?Regards,
Jaehoon Chung
The purpose of my patch was to enable an if/else to detect whether there was a card in the slot. Among the available mmc commands, I thought 'mmc rescan' was the most logical to be able to use to detect whether a slot was empty or not.
Below is a survey of other places where a similar check could be done. I think that if a similar check is to be made in these cases, they could be in separate patch(es) from this one.
- 'mmc read/write': These commands should fail anyway if the slot were empty.
- 'mmc part' prints "## Unknown partition table" if the slot is empty, although the command itself still returns successfully. I suppose the check could make sense here.
- 'mmc dev': I thought there was perhaps a use case where it makes sense to switch to a mmc device which is currently empty. If that is not true, it would probably make sense to do the same check there.
- 'mmcinfo': Currently this basically prints '0' for all the fields when the slot is empty. It probably would be more logical to print "device init failed" or similar instead.
-Michael
Quoted 19 lines
Quoted 17 lines · Michael Jones
Fail in 'mmc rescan' if
mmc_init()returns errorSigned-off-by Michael Jones <[email protected]>--- common/cmd_mmc.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-)common/cmd_mmc.c +0
-1@@ -165,9 +165,11 @@ int do_mmcops(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) } mmc->has_init =0 ; -mmc_init (mmc);
Quoted 9 lines
common/cmd_mmc.c int do_mmcops(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) · line 175
Quoted 8 lines
common/cmd_mmc.c +4
-1-return 0 ; +if (mmc_init (mmc)) +return 1 ; +else +return 0 ; }else if (strncmp (argv[1 ],"part" ,4 ) ==0 ) {block_dev_desc_t *mmc_dev;struct mmc *mmc =find_mmc_device (curr_device);
MATRIX VISION GmbH, Talstrasse 16, DE-71570 Oppenweiler
Registergericht: Amtsgericht Stuttgart, HRB 271090
Geschaeftsfuehrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner, Erhard Meier
PATCH 4/7 mmc: rescan fails on empty slot
Hi Michael
Thanks for your explanation. :)
Regards,
Jaehoon Chung
Quoted 71 lines · Michael Jones
Hi Jaehoon Chung,
Quoted 8 lines · Jaehoon Chung
Hi Michael.
I have some question. there are some
mmc_init().
But you are only checked there..
Did you have any special reason?Regards,
Jaehoon ChungThe purpose of my patch was to enable an if/else to detect whether there was a card in the slot. Among the available mmc commands, I thought 'mmc rescan' was the most logical to be able to use to detect whether a slot was empty or not.
Below is a survey of other places where a similar check could be done. I think that if a similar check is to be made in these cases, they could be in separate patch(es) from this one.
- 'mmc read/write': These commands should fail anyway if the slot were empty.
- 'mmc part' prints "## Unknown partition table" if the slot is empty, although the command itself still returns successfully. I suppose the check could make sense here.
- 'mmc dev': I thought there was perhaps a use case where it makes sense to switch to a mmc device which is currently empty. If that is not true, it would probably make sense to do the same check there.
- 'mmcinfo': Currently this basically prints '0' for all the fields when the slot is empty. It probably would be more logical to print "device init failed" or similar instead.-Michael
Quoted 18 lines
Quoted 17 lines · Michael Jones
Fail in 'mmc rescan' if
mmc_init()returns errorSigned-off-by Michael Jones <[email protected]>--- common/cmd_mmc.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-)common/cmd_mmc.c +0
-1@@ -165,9 +165,11 @@ int do_mmcops(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) } mmc->has_init =0 ; -mmc_init (mmc);Quoted 8 lines
common/cmd_mmc.c int do_mmcops(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) · line 175
Quoted 8 lines
common/cmd_mmc.c +4
-1-return 0 ; +if (mmc_init (mmc)) +return 1 ; +else +return 0 ; }else if (strncmp (argv[1 ],"part" ,4 ) ==0 ) {block_dev_desc_t *mmc_dev;struct mmc *mmc =find_mmc_device (curr_device);MATRIX VISION GmbH, Talstrasse 16, DE-71570 Oppenweiler
Registergericht: Amtsgericht Stuttgart, HRB 271090
Geschaeftsfuehrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner, Erhard Meier
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
PATCH 5/7 mv_common.c: don't compile reset_environment if ENV_IS_NOWHERE
In reply to Michael JonesDoesn't make sense to provide this function to boards which defined CONFIG_ENV_IS_NOWHERE. Such a board gets a linking error because common/env_nowhere.c doesn't define saveenv().
--- board/matrix_vision/common/mv_common.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
board/matrix_vision/common/mv_common.c +2 -0
@@ -38,6 +38,7 @@ static char* entries_to_keep[] = {#define MV_MAX_ENV_ENTRY_LENGTH 64#define MV_KEEP_ENTRIES ARRAY_SIZE(entries_to_keep) +#ifndef CONFIG_ENV_IS_NOWHERE void mv_reset_environment (void ) {int i;
@@ -67,6 +68,7 @@ void mv_reset_environment(void) saveenv(); } +#endif int mv_load_fpga (void ) {
Signature · 6 lines
1.7.5.4 MATRIX VISION GmbH, Talstrasse 16, DE-71570 Oppenweiler Registergericht: Amtsgericht Stuttgart, HRB 271090 Geschaeftsfuehrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner, Erhard Meier
PATCH v2 5/7 mv_common.c: don't compile reset_environment if ENV_IS_NOWHERE
Doesn't make sense to provide this function to boards which defined CONFIG_ENV_IS_NOWHERE. Such a board gets a linking error because common/env_nowhere.c doesn't define saveenv().
---
Changes for v2:
- None. Resubmitting to include custodian in cc:
board/matrix_vision/common/mv_common.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
board/matrix_vision/common/mv_common.c +2 -0
@@ -38,6 +38,7 @@ static char* entries_to_keep[] = {#define MV_MAX_ENV_ENTRY_LENGTH 64#define MV_KEEP_ENTRIES ARRAY_SIZE(entries_to_keep) +#ifndef CONFIG_ENV_IS_NOWHERE void mv_reset_environment (void ) {int i;
@@ -67,6 +68,7 @@ void mv_reset_environment(void) saveenv(); } +#endif int mv_load_fpga (void ) {
Signature · 1 line
1.7.5.4
Wolfgang Denk
AppliedPATCH v2 5/7 mv_common.c: don't compile reset_environment if ENV_IS_NOWHERE
Dear Michael Jones,
Quoted 11 lines · In message <[email protected]>…
Doesn't make sense to provide this function to boards which defined
CONFIG_ENV_IS_NOWHERE. Such a board gets a linking error becausecommon/env_nowhere.cdoesn't definesaveenv().Signed-off-by Michael Jones <[email protected]>---
Changes for v2:
- None. Resubmitting to include custodian in cc:board/matrix_vision/common/mv_common.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 5 lines
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 Fascinating, a totally parochial attitude. -- Spock, "Metamorphosis", stardate 3219.8
PATCH 5/7 mv_common.c: don't compile reset_environment if ENV_IS_NOWHERE
In reply to Michael JonesQuoted 3 lines · Michael Jones
Doesn't make sense to provide this function to boards which defined
CONFIG_ENV_IS_NOWHERE. Such a board gets a linking error becausecommon/env_nowhere.cdoesn't definesaveenv().
-mike
PATCH 6/7 ARMV7: OMAP: I2C driver: Write more than 1 byte at a time in i2c_write
In reply to Michael JonesThis allows the EEPROM layer to send a single i2c write command per page, and wait CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS between i2c write commands.
--- drivers/i2c/omap24xx_i2c.c | 134 ++++++++++++++++++------------------------- 1 files changed, 56 insertions(+), 78 deletions(-)
drivers/i2c/omap24xx_i2c.c +56 -78
@@ -216,77 +216,6 @@ read_exit:return i2c_error; } -static int i2c_write_byte (u8 devaddr,u8 regoffset,u8 value) -{ -int i2c_error =0 ; -u16 status; - -/* wait until bus not busy */ -wait_for_bb (); - -/* two bytes */ -writew (2 , &i2c_base->cnt); -/* set slave address */ -writew (devaddr, &i2c_base->sa); -/* stop bit needed here */ -writew (I2C_CON_EN |I2C_CON_MST |I2C_CON_STT |I2C_CON_TRX | -I2C_CON_STP , &i2c_base->con); - -while (1 ) { - status =wait_for_pin (); -if (status ==0 || status &I2C_STAT_NACK ) { - i2c_error =1 ; - goto write_exit; - } -if (status &I2C_STAT_XRDY ) { -#if defined(CONFIG_OMAP243X ) || defined(CONFIG_OMAP34XX ) || \ - defined(CONFIG_OMAP44XX ) -/* send register offset */ -writeb (regoffset, &i2c_base->data); -writew (I2C_STAT_XRDY , &i2c_base->stat); - -while (1 ) { - status =wait_for_pin (); -if (status ==0 || status &I2C_STAT_NACK ) { - i2c_error =1 ; - goto write_exit; - } -if (status &I2C_STAT_XRDY ) { -/* send data */ -writeb (value, &i2c_base->data); -writew (I2C_STAT_XRDY , &i2c_base->stat); - } -if (status &I2C_STAT_ARDY ) { -writew (I2C_STAT_ARDY , &i2c_base->stat); -break ; - } - } -break ; -#else -/* send out two bytes */ -writew ((value <<8 ) + regoffset, &i2c_base->data); -writew (I2C_STAT_XRDY , &i2c_base->stat); -#endif - } -if (status &I2C_STAT_ARDY ) { -writew (I2C_STAT_ARDY , &i2c_base->stat); -break ; - } - } - -wait_for_bb (); - - status =readw (&i2c_base->stat); -if (status &I2C_STAT_NACK ) - i2c_error =1 ; - -write_exit: -flush_fifo (); -writew (0xFFFF , &i2c_base->stat); -writew (0 , &i2c_base->cnt); -return i2c_error; -} -static void flush_fifo (void ) {u16 stat;
@@ -372,26 +301,75 @@ int i2c_read (uchar chip, uint addr, int alen, uchar * buffer, int len)int i2c_write (uchar chip,uint addr,int alen,uchar * buffer,int len) {int i; +u16 status; +int i2c_error =0 ;if (alen >1 ) { -printf ("I2C read: addr len %d not supported\n" , alen); +printf ("I2C write: addr len %d not supported\n" , alen);return 1 ; }if (addr + len >256 ) { -printf ("I2C read: address out of range\n" ); +printf ("I2C write: address 0x%x + 0x%x out of range\n" );return 1 ; } +/* wait until bus not busy */ +wait_for_bb (); + +/* start address phase - will write regoffset + len bytes data */ +/* TODO consider case when !CONFIG_OMAP243X/34XX/44XX */ +writew (alen+len, &i2c_base->cnt); +/* set slave address */ +writew (chip, &i2c_base->sa); +/* stop bit needed here */ +writew (I2C_CON_EN |I2C_CON_MST |I2C_CON_STT |I2C_CON_TRX | +I2C_CON_STP , &i2c_base->con); + +/* Send address byte */ + status =wait_for_pin (); + +if (status ==0 || status &I2C_STAT_NACK ) { + i2c_error =1 ; +printf ("%s:%d error status=0x%x\n" , __func__, __LINE__, status); + goto write_exit; + } + +if (status &I2C_STAT_XRDY ) { +writeb (addr &0xFF , &i2c_base->data); +writew (I2C_STAT_XRDY , &i2c_base->stat); + }else { + i2c_error =1 ; +printf ("%s:%d error status=0x%x\n" , __func__, __LINE__, status); + goto write_exit; + } + +/* address phase is over, now write data */ for (i =0 ; i < len; i++) { -if (i2c_write_byte (chip, addr + i, buffer[i])) { -printf ("I2C read: I/O error\n" ); -i2c_init (CONFIG_SYS_I2C_SPEED ,CONFIG_SYS_I2C_SLAVE ); -return 1 ; + status =wait_for_pin (); + +if (status ==0 || status &I2C_STAT_NACK ) { + i2c_error =1 ; +printf ("%s:%d error status=0x%x\n" , + __func__, __LINE__, status); + goto write_exit; + } + +if (status &I2C_STAT_XRDY ) { +writeb (buffer[i], &i2c_base->data); +writew (I2C_STAT_XRDY , &i2c_base->stat); + }else { + i2c_error =1 ; +printf ("%s:%d i=%d error status=0x%x\n" , + __func__, __LINE__, i, status); + goto write_exit; } } -return 0 ; +write_exit: +flush_fifo (); +writew (0xFFFF , &i2c_base->stat); +return i2c_error; }static void wait_for_bb (void )
Signature · 6 lines
1.7.5.4 MATRIX VISION GmbH, Talstrasse 16, DE-71570 Oppenweiler Registergericht: Amtsgericht Stuttgart, HRB 271090 Geschaeftsfuehrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner, Erhard Meier
PATCH v2 6/7 ARMV7: OMAP: I2C driver: Write more than 1 byte at a time in i2c_write
This allows the EEPROM layer to send a single i2c write command per page, and wait CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS between i2c write commands.
---
Changes for v2:
- None. Resubmitting to include custodian in cc:
drivers/i2c/omap24xx_i2c.c | 134 ++++++++++++++++++------------------------- 1 files changed, 56 insertions(+), 78 deletions(-)
drivers/i2c/omap24xx_i2c.c +56 -78
@@ -216,77 +216,6 @@ read_exit:return i2c_error; } -static int i2c_write_byte (u8 devaddr,u8 regoffset,u8 value) -{ -int i2c_error =0 ; -u16 status; - -/* wait until bus not busy */ -wait_for_bb (); - -/* two bytes */ -writew (2 , &i2c_base->cnt); -/* set slave address */ -writew (devaddr, &i2c_base->sa); -/* stop bit needed here */ -writew (I2C_CON_EN |I2C_CON_MST |I2C_CON_STT |I2C_CON_TRX | -I2C_CON_STP , &i2c_base->con); - -while (1 ) { - status =wait_for_pin (); -if (status ==0 || status &I2C_STAT_NACK ) { - i2c_error =1 ; - goto write_exit; - } -if (status &I2C_STAT_XRDY ) { -#if defined(CONFIG_OMAP243X ) || defined(CONFIG_OMAP34XX ) || \ - defined(CONFIG_OMAP44XX ) -/* send register offset */ -writeb (regoffset, &i2c_base->data); -writew (I2C_STAT_XRDY , &i2c_base->stat); - -while (1 ) { - status =wait_for_pin (); -if (status ==0 || status &I2C_STAT_NACK ) { - i2c_error =1 ; - goto write_exit; - } -if (status &I2C_STAT_XRDY ) { -/* send data */ -writeb (value, &i2c_base->data); -writew (I2C_STAT_XRDY , &i2c_base->stat); - } -if (status &I2C_STAT_ARDY ) { -writew (I2C_STAT_ARDY , &i2c_base->stat); -break ; - } - } -break ; -#else -/* send out two bytes */ -writew ((value <<8 ) + regoffset, &i2c_base->data); -writew (I2C_STAT_XRDY , &i2c_base->stat); -#endif - } -if (status &I2C_STAT_ARDY ) { -writew (I2C_STAT_ARDY , &i2c_base->stat); -break ; - } - } - -wait_for_bb (); - - status =readw (&i2c_base->stat); -if (status &I2C_STAT_NACK ) - i2c_error =1 ; - -write_exit: -flush_fifo (); -writew (0xFFFF , &i2c_base->stat); -writew (0 , &i2c_base->cnt); -return i2c_error; -} -static void flush_fifo (void ) {u16 stat;
@@ -372,26 +301,75 @@ int i2c_read (uchar chip, uint addr, int alen, uchar * buffer, int len)int i2c_write (uchar chip,uint addr,int alen,uchar * buffer,int len) {int i; +u16 status; +int i2c_error =0 ;if (alen >1 ) { -printf ("I2C read: addr len %d not supported\n" , alen); +printf ("I2C write: addr len %d not supported\n" , alen);return 1 ; }if (addr + len >256 ) { -printf ("I2C read: address out of range\n" ); +printf ("I2C write: address 0x%x + 0x%x out of range\n" );return 1 ; } +/* wait until bus not busy */ +wait_for_bb (); + +/* start address phase - will write regoffset + len bytes data */ +/* TODO consider case when !CONFIG_OMAP243X/34XX/44XX */ +writew (alen+len, &i2c_base->cnt); +/* set slave address */ +writew (chip, &i2c_base->sa); +/* stop bit needed here */ +writew (I2C_CON_EN |I2C_CON_MST |I2C_CON_STT |I2C_CON_TRX | +I2C_CON_STP , &i2c_base->con); + +/* Send address byte */ + status =wait_for_pin (); + +if (status ==0 || status &I2C_STAT_NACK ) { + i2c_error =1 ; +printf ("%s:%d error status=0x%x\n" , __func__, __LINE__, status); + goto write_exit; + } + +if (status &I2C_STAT_XRDY ) { +writeb (addr &0xFF , &i2c_base->data); +writew (I2C_STAT_XRDY , &i2c_base->stat); + }else { + i2c_error =1 ; +printf ("%s:%d error status=0x%x\n" , __func__, __LINE__, status); + goto write_exit; + } + +/* address phase is over, now write data */ for (i =0 ; i < len; i++) { -if (i2c_write_byte (chip, addr + i, buffer[i])) { -printf ("I2C read: I/O error\n" ); -i2c_init (CONFIG_SYS_I2C_SPEED ,CONFIG_SYS_I2C_SLAVE ); -return 1 ; + status =wait_for_pin (); + +if (status ==0 || status &I2C_STAT_NACK ) { + i2c_error =1 ; +printf ("%s:%d error status=0x%x\n" , + __func__, __LINE__, status); + goto write_exit; + } + +if (status &I2C_STAT_XRDY ) { +writeb (buffer[i], &i2c_base->data); +writew (I2C_STAT_XRDY , &i2c_base->stat); + }else { + i2c_error =1 ; +printf ("%s:%d i=%d error status=0x%x\n" , + __func__, __LINE__, i, status); + goto write_exit; } } -return 0 ; +write_exit: +flush_fifo (); +writew (0xFFFF , &i2c_base->stat); +return i2c_error; }static void wait_for_bb (void )
Signature · 6 lines
1.7.5.4 MATRIX VISION GmbH, Talstrasse 16, DE-71570 Oppenweiler Registergericht: Amtsgericht Stuttgart, HRB 271090 Geschaeftsfuehrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner, Erhard Meier
PATCH v2 6/7 ARMV7: OMAP: I2C driver: Write more than 1 byte at a time in i2c_write
Hello Michael,
Sorry for the long delay...
Quoted 16 lines · Michael Jones
This allows the EEPROM layer to send a single i2c write command per page, and wait
CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MSbetween i2c write commands.Signed-off-by Michael Jones <[email protected]>---
Changes for v2:
- None. Resubmitting to include custodian in cc:drivers/i2c/omap24xx_i2c.c | 134 ++++++++++++++++++------------------------- 1 files changed, 56 insertions(+), 78 deletions(-)drivers/i2c/omap24xx_i2c.c +0
-0
[...]
Quoted 14 lines
drivers/i2c/omap24xx_i2c.c +3
-1@@ -372,26 +301,75 @@ int i2c_read (uchar chip, uint addr, int alen, uchar * buffer, int len)int i2c_write (uchar chip,uint addr,int alen,uchar * buffer,int len) {int i; +u16 status; +int i2c_error =0 ;if (alen >1 ) { -printf ("I2C read: addr len %d not supported\n" , alen); +printf ("I2C write: addr len %d not supported\n" , alen);return 1 ; }if (addr + len >256 ) {
drivers/i2c/omap24xx_i2c.c int i2c_read (uchar chip, uint addr, int alen, uchar * buffer, int len) · line 321
Quoted 10 lines
drivers/i2c/omap24xx_i2c.c +6
-1-printf ("I2C read: address out of range\n" ); +printf ("I2C write: address 0x%x + 0x%x out of range\n" );return 1 ; } +/* wait until bus not busy */ +wait_for_bb (); + +/* start address phase - will write regoffset + len bytes data */ +/* TODO consider case when !CONFIG_OMAP243X/34XX/44XX */
Do we have this usecase?
drivers/i2c/omap24xx_i2c.c int i2c_read (uchar chip, uint addr, int alen, uchar * buffer, int len) · line 322
Quoted 1 line
drivers/i2c/omap24xx_i2c.c +1
-0+writew (alen+len, &i2c_base->cnt);
please change to "alen + len"
drivers/i2c/omap24xx_i2c.c int i2c_read (uchar chip, uint addr, int alen, uchar * buffer, int len) · line 334
Quoted 12 lines
drivers/i2c/omap24xx_i2c.c +12
-0+/* set slave address */ +writew (chip, &i2c_base->sa); +/* stop bit needed here */ +writew (I2C_CON_EN |I2C_CON_MST |I2C_CON_STT |I2C_CON_TRX | +I2C_CON_STP , &i2c_base->con); + +/* Send address byte */ + status =wait_for_pin (); + +if (status ==0 || status &I2C_STAT_NACK ) { + i2c_error =1 ; +printf ("%s:%d error status=0x%x\n" , __func__, __LINE__, status);
Can you change this printf to output some more info, instead __func__, __LINE__?
drivers/i2c/omap24xx_i2c.c int i2c_read (uchar chip, uint addr, int alen, uchar * buffer, int len) · line 343
Quoted 9 lines
drivers/i2c/omap24xx_i2c.c +9
-0+ goto write_exit; + } + +if (status &I2C_STAT_XRDY ) { +writeb (addr &0xFF , &i2c_base->data); +writew (I2C_STAT_XRDY , &i2c_base->stat); + }else { + i2c_error =1 ; +printf ("%s:%d error status=0x%x\n" , __func__, __LINE__, status);
here too.
Quoted 5 lines
drivers/i2c/omap24xx_i2c.c +4
-0+ goto write_exit; + } + +/* address phase is over, now write data */ for (i =0 ; i < len; i++) {
drivers/i2c/omap24xx_i2c.c int i2c_read (uchar chip, uint addr, int alen, uchar * buffer, int len) · line 354
Quoted 10 lines
drivers/i2c/omap24xx_i2c.c +6
-4-if (i2c_write_byte (chip, addr + i, buffer[i])) { -printf ("I2C read: I/O error\n" ); -i2c_init (CONFIG_SYS_I2C_SPEED ,CONFIG_SYS_I2C_SLAVE ); -return 1 ; + status =wait_for_pin (); + +if (status ==0 || status &I2C_STAT_NACK ) { + i2c_error =1 ; +printf ("%s:%d error status=0x%x\n" , + __func__, __LINE__, status);
also here ...
drivers/i2c/omap24xx_i2c.c int i2c_read (uchar chip, uint addr, int alen, uchar * buffer, int len) · line 364
Quoted 10 lines
drivers/i2c/omap24xx_i2c.c +10
-0+ goto write_exit; + } + +if (status &I2C_STAT_XRDY ) { +writeb (buffer[i], &i2c_base->data); +writew (I2C_STAT_XRDY , &i2c_base->stat); + }else { + i2c_error =1 ; +printf ("%s:%d i=%d error status=0x%x\n" , + __func__, __LINE__, i, status);
and here.
drivers/i2c/omap24xx_i2c.c int i2c_read (uchar chip, uint addr, int alen, uchar * buffer, int len) · line 375
Quoted 12 lines
drivers/i2c/omap24xx_i2c.c +5
-1+ goto write_exit; } } -return 0 ; +write_exit: +flush_fifo (); +writew (0xFFFF , &i2c_base->stat); +return i2c_error; }static void wait_for_bb (void )
bye,
Heiko
Signature · 2 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
PATCH v2 6/7 ARMV7: OMAP: I2C driver: Write more than 1 byte at a time in i2c_write
Hi Heiko,
Thanks for the review.
Quoted 42 lines · Heiko Schocher
Hello Michael,
Sorry for the long delay...
Quoted 16 lines · Michael Jones
This allows the EEPROM layer to send a single i2c write command per page, and wait
CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MSbetween i2c write commands.Signed-off-by Michael Jones <[email protected]>---
Changes for v2:
- None. Resubmitting to include custodian in cc:drivers/i2c/omap24xx_i2c.c | 134 ++++++++++++++++++------------------------- 1 files changed, 56 insertions(+), 78 deletions(-)drivers/i2c/omap24xx_i2c.c +0
-0[...]
Quoted 19 lines
drivers/i2c/omap24xx_i2c.c +4
-2@@ -372,26 +301,75 @@ int i2c_read (uchar chip, uint addr, int alen, uchar * buffer, int len)int i2c_write (uchar chip,uint addr,int alen,uchar * buffer,int len) {int i; +u16 status; +int i2c_error =0 ;if (alen >1 ) { -printf ("I2C read: addr len %d not supported\n" , alen); +printf ("I2C write: addr len %d not supported\n" , alen);return 1 ; }if (addr + len >256 ) { -printf ("I2C read: address out of range\n" ); +printf ("I2C write: address 0x%x + 0x%x out of range\n" );return 1 ; }
Quoted 7 lines
drivers/i2c/omap24xx_i2c.c int i2c_read (uchar chip, uint addr, int alen, uchar * buffer, int len) · line 321
Quoted 5 lines
drivers/i2c/omap24xx_i2c.c +5
-0+/* wait until bus not busy */ +wait_for_bb (); + +/* start address phase - will write regoffset + len bytes data */ +/* TODO consider case when !CONFIG_OMAP243X/34XX/44XX */ Do we have this usecase?
I don't know, I assumed so, as there is the following #ifdef in the part I removed:
#if defined(CONFIG_OMAP243X) || defined(CONFIG_OMAP34XX) || \defined(CONFIG_OMAP44XX)
#else
/* there is code here that I didn't consider when replacing it. */ #endif
Quoted 4 lines
drivers/i2c/omap24xx_i2c.c int i2c_read (uchar chip, uint addr, int alen, uchar * buffer, int len) · line 322
Quoted 2 lines
drivers/i2c/omap24xx_i2c.c +1
-0+writew (alen+len, &i2c_base->cnt);please change to "alen + len"
OK. I thought checkpatch.pl would've found that.
Quoted 15 lines
drivers/i2c/omap24xx_i2c.c int i2c_read (uchar chip, uint addr, int alen, uchar * buffer, int len) · line 334
Quoted 13 lines
drivers/i2c/omap24xx_i2c.c +12
-0+/* set slave address */ +writew (chip, &i2c_base->sa); +/* stop bit needed here */ +writew (I2C_CON_EN |I2C_CON_MST |I2C_CON_STT |I2C_CON_TRX | +I2C_CON_STP , &i2c_base->con); + +/* Send address byte */ + status =wait_for_pin (); + +if (status ==0 || status &I2C_STAT_NACK ) { + i2c_error =1 ; +printf ("%s:%d error status=0x%x\n" , __func__, __LINE__, status);Can you change this printf to output some more info, instead
__func__,__LINE__?
OK, I will make these more informative. Do you not want __func__ to be in the output? I originally put __LINE__ in as well because the strings were otherwise identical, so I'm fine with getting rid of that once the messages are unique.
[snip]
Quoted 3 lines
bye,
Heiko
Question about cosmetics: the README says "In sources originating from U-Boot a style corresponding to "Lindent -pcs" (adding spaces before parameters to function calls) is actually used." Currently this is not uniform in this file, because checkpatch.pl doesn't like the spaces between function names and '(' (and neither do I). Are there supposed to be such spaces in U-Boot code? Or can we uniformly remove them in this file?
-Michael
MATRIX VISION GmbH, Talstrasse 16, DE-71570 Oppenweiler
Registergericht: Amtsgericht Stuttgart, HRB 271090
Geschaeftsfuehrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner, Erhard Meier
PATCH v2 6/7 ARMV7: OMAP: I2C driver: Write more than 1 byte at a time in i2c_write
Hello Michael,
Quoted 53 lines · Michael Jones
Hi Heiko,
Thanks for the review.
Quoted 41 lines · Heiko Schocher
Hello Michael,
Sorry for the long delay...
Quoted 16 lines · Michael Jones
This allows the EEPROM layer to send a single i2c write command per page, and wait
CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MSbetween i2c write commands.Signed-off-by Michael Jones <[email protected]>---
Changes for v2:
- None. Resubmitting to include custodian in cc:drivers/i2c/omap24xx_i2c.c | 134 ++++++++++++++++++------------------------- 1 files changed, 56 insertions(+), 78 deletions(-)drivers/i2c/omap24xx_i2c.c +0
-0[...]
Quoted 19 lines
drivers/i2c/omap24xx_i2c.c +4
-2@@ -372,26 +301,75 @@ int i2c_read (uchar chip, uint addr, int alen, uchar * buffer, int len)int i2c_write (uchar chip,uint addr,int alen,uchar * buffer,int len) {int i; +u16 status; +int i2c_error =0 ;if (alen >1 ) { -printf ("I2C read: addr len %d not supported\n" , alen); +printf ("I2C write: addr len %d not supported\n" , alen);return 1 ; }if (addr + len >256 ) { -printf ("I2C read: address out of range\n" ); +printf ("I2C write: address 0x%x + 0x%x out of range\n" );return 1 ; }Quoted 6 lines
drivers/i2c/omap24xx_i2c.c int i2c_read (uchar chip, uint addr, int alen, uchar * buffer, int len) · line 321
Quoted 5 lines
drivers/i2c/omap24xx_i2c.c +5
-0+/* wait until bus not busy */ +wait_for_bb (); + +/* start address phase - will write regoffset + len bytes data */ +/* TODO consider case when !CONFIG_OMAP243X/34XX/44XX */ Do we have this usecase?
Quoted 8 lines
I don't know, I assumed so, as there is the following #ifdef in the part I removed:
#if
defined(CONFIG_OMAP243X)||defined(CONFIG_OMAP34XX)|| \defined(CONFIG_OMAP44XX)
#else
/* there is code here that I didn't consider when replacing it. */ #endif
Hmm.. I have to look at this deeper, but your patch shouldn;t break any existing board...
Quoted 4 lines
Quoted 2 lines
drivers/i2c/omap24xx_i2c.c int i2c_read (uchar chip, uint addr, int alen, uchar * buffer, int len) · line 322
Quoted 1 line
drivers/i2c/omap24xx_i2c.c +1
-0+writew (alen+len, &i2c_base->cnt);please change to "alen + len"
OK. I thought checkpatch.pl would've found that.
Yes, I also checked your patch with checkpatch, but it didn;t found this ...
Quoted 14 lines
Quoted 5 lines
Quoted 5 lines
drivers/i2c/omap24xx_i2c.c +5
-0+/* set slave address */ +writew (chip, &i2c_base->sa); +/* stop bit needed here */ +writew (I2C_CON_EN |I2C_CON_MST |I2C_CON_STT |I2C_CON_TRX | +I2C_CON_STP , &i2c_base->con);Quoted 8 lines
drivers/i2c/omap24xx_i2c.c int i2c_read (uchar chip, uint addr, int alen, uchar * buffer, int len) · line 334
Quoted 7 lines
drivers/i2c/omap24xx_i2c.c +7
-0+ +/* Send address byte */ + status =wait_for_pin (); + +if (status ==0 || status &I2C_STAT_NACK ) { + i2c_error =1 ; +printf ("%s:%d error status=0x%x\n" , __func__, __LINE__, status);Can you change this printf to output some more info, instead
__func__,__LINE__?
Quoted 4 lines
OK, I will make these more informative. Do you not want
__func__to be in the output? I originally put__LINE__in as well because the strings were otherwise identical, so I'm fine with getting rid of that once the messages are unique.
Thanks! I think, we don;t need __func__ and __LINE__, if you make informative printfs ...
Quoted 11 lines
[snip]
Quoted 2 lines
bye,
HeikoQuestion about cosmetics: the README says "In sources originating from U-Boot a style corresponding to "Lindent -pcs" (adding spaces before parameters to function calls) is actually used." Currently this is not uniform in this file, because checkpatch.pl doesn't like the spaces between function names and '(' (and neither do I). Are there supposed to be such spaces in U-Boot code? Or can we uniformly remove them in this file?
We should get this "checkpatch compatible". If you do such a cosmetic change, please split this in a seperate patch, thanks!
bye,
Heiko
Signature · 2 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
PATCH v3 1/1 ARMV7: OMAP: I2C driver: Write more than 1 byte at a time in i2c_write
This allows the EEPROM layer to send a single i2c write command per page, and wait CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS between i2c write commands.
---
Changes for v3:
- Rewrote error messages to be more descriptive.
Changes for v2:
- None. Resubmitting to include custodian in cc:
drivers/i2c/omap24xx_i2c.c | 135 ++++++++++++++++++------------------------- 1 files changed, 57 insertions(+), 78 deletions(-)
drivers/i2c/omap24xx_i2c.c +57 -78
@@ -216,77 +216,6 @@ read_exit:return i2c_error; } -static int i2c_write_byte (u8 devaddr,u8 regoffset,u8 value) -{ -int i2c_error =0 ; -u16 status; - -/* wait until bus not busy */ -wait_for_bb (); - -/* two bytes */ -writew (2 , &i2c_base->cnt); -/* set slave address */ -writew (devaddr, &i2c_base->sa); -/* stop bit needed here */ -writew (I2C_CON_EN |I2C_CON_MST |I2C_CON_STT |I2C_CON_TRX | -I2C_CON_STP , &i2c_base->con); - -while (1 ) { - status =wait_for_pin (); -if (status ==0 || status &I2C_STAT_NACK ) { - i2c_error =1 ; - goto write_exit; - } -if (status &I2C_STAT_XRDY ) { -#if defined(CONFIG_OMAP243X ) || defined(CONFIG_OMAP34XX ) || \ - defined(CONFIG_OMAP44XX ) -/* send register offset */ -writeb (regoffset, &i2c_base->data); -writew (I2C_STAT_XRDY , &i2c_base->stat); - -while (1 ) { - status =wait_for_pin (); -if (status ==0 || status &I2C_STAT_NACK ) { - i2c_error =1 ; - goto write_exit; - } -if (status &I2C_STAT_XRDY ) { -/* send data */ -writeb (value, &i2c_base->data); -writew (I2C_STAT_XRDY , &i2c_base->stat); - } -if (status &I2C_STAT_ARDY ) { -writew (I2C_STAT_ARDY , &i2c_base->stat); -break ; - } - } -break ; -#else -/* send out two bytes */ -writew ((value <<8 ) + regoffset, &i2c_base->data); -writew (I2C_STAT_XRDY , &i2c_base->stat); -#endif - } -if (status &I2C_STAT_ARDY ) { -writew (I2C_STAT_ARDY , &i2c_base->stat); -break ; - } - } - -wait_for_bb (); - - status =readw (&i2c_base->stat); -if (status &I2C_STAT_NACK ) - i2c_error =1 ; - -write_exit: -flush_fifo (); -writew (0xFFFF , &i2c_base->stat); -writew (0 , &i2c_base->cnt); -return i2c_error; -} -static void flush_fifo (void ) {u16 stat;
@@ -372,26 +301,76 @@ int i2c_read (uchar chip, uint addr, int alen, uchar * buffer, int len)int i2c_write (uchar chip,uint addr,int alen,uchar * buffer,int len) {int i; +u16 status; +int i2c_error =0 ;if (alen >1 ) { -printf ("I2C read: addr len %d not supported\n" , alen); +printf ("I2C write: addr len %d not supported\n" , alen);return 1 ; }if (addr + len >256 ) { -printf ("I2C read: address out of range\n" ); +printf ("I2C write: address 0x%x + 0x%x out of range\n" );return 1 ; } +/* wait until bus not busy */ +wait_for_bb (); + +/* start address phase - will write regoffset + len bytes data */ +/* TODO consider case when !CONFIG_OMAP243X/34XX/44XX */ +writew (alen + len, &i2c_base->cnt); +/* set slave address */ +writew (chip, &i2c_base->sa); +/* stop bit needed here */ +writew (I2C_CON_EN |I2C_CON_MST |I2C_CON_STT |I2C_CON_TRX | +I2C_CON_STP , &i2c_base->con); + +/* Send address byte */ + status =wait_for_pin (); + +if (status ==0 || status &I2C_STAT_NACK ) { + i2c_error =1 ; +printf ("error waiting for i2c address ACK (status=0x%x)\n" , + status); + goto write_exit; + } + +if (status &I2C_STAT_XRDY ) { +writeb (addr &0xFF , &i2c_base->data); +writew (I2C_STAT_XRDY , &i2c_base->stat); + }else { + i2c_error =1 ; +printf ("i2c bus not ready for transmit (status=0x%x)\n" , + status); + goto write_exit; + } + +/* address phase is over, now write data */ for (i =0 ; i < len; i++) { -if (i2c_write_byte (chip, addr + i, buffer[i])) { -printf ("I2C read: I/O error\n" ); -i2c_init (CONFIG_SYS_I2C_SPEED ,CONFIG_SYS_I2C_SLAVE ); -return 1 ; + status =wait_for_pin (); + +if (status ==0 || status &I2C_STAT_NACK ) { + i2c_error =1 ; +printf ("i2c error waiting for data ACK (status=0x%x)\n" , + status); + goto write_exit; + } + +if (status &I2C_STAT_XRDY ) { +writeb (buffer[i], &i2c_base->data); +writew (I2C_STAT_XRDY , &i2c_base->stat); + }else { + i2c_error =1 ; +printf ("i2c bus not ready for Tx (i=%d)\n" , i); + goto write_exit; } } -return 0 ; +write_exit: +flush_fifo (); +writew (0xFFFF , &i2c_base->stat); +return i2c_error; }static void wait_for_bb (void )
Signature · 6 lines
1.7.5.4 MATRIX VISION GmbH, Talstrasse 16, DE-71570 Oppenweiler Registergericht: Amtsgericht Stuttgart, HRB 271090 Geschaeftsfuehrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner, Erhard Meier
PATCH 1/1 ARMV7: OMAP: I2C driver: cosmetic: make checkpatch-compatible
--- drivers/i2c/omap24xx_i2c.c | 105 ++++++++++++++++++++++---------------------- 1 files changed, 53 insertions(+), 52 deletions(-)
drivers/i2c/omap24xx_i2c.c +53 -52
@@ -31,8 +31,8 @@ DECLARE_GLOBAL_DATA_PTR;#define I2C_TIMEOUT 1000 -static void wait_for_bb (void ); -static u16 wait_for_pin (void ); +static void wait_for_bb (void ); +static u16 wait_for_pin (void );static void flush_fifo (void );static struct i2c *i2c_base = (struct i2c *)I2C_DEFAULT_BASE ;
@@ -40,7 +40,7 @@ static struct i2c *i2c_base = (struct i2c *)I2C_DEFAULT_BASE;static unsigned int bus_initialized[I2C_BUS_MAX ];static unsigned int current_bus; -void i2c_init (int speed,int slaveadd) +void i2c_init (int speed,int slaveadd) {int psc, fsscll, fssclh;int hsscll =0 , hssclh =0 ;
@@ -107,9 +107,9 @@ void i2c_init (int speed, int slaveadd) sclh = (unsigned int )fssclh; } -if (readw (&i2c_base->con) &I2C_CON_EN ) { -writew (0 , &i2c_base->con); -udelay (50000 ); +if (readw (&i2c_base->con) &I2C_CON_EN ) { +writew (0 , &i2c_base->con); +udelay (50000 ); }writew (0x2 , &i2c_base->sysc);/* for ES2 after soft reset */
@@ -130,35 +130,36 @@ void i2c_init (int speed, int slaveadd)writew (sclh, &i2c_base->sclh);/* own address */ -writew (slaveadd, &i2c_base->oa); -writew (I2C_CON_EN , &i2c_base->con); +writew (slaveadd, &i2c_base->oa); +writew (I2C_CON_EN , &i2c_base->con);/* have to enable intrrupts or OMAP i2c module doesn't work */ -writew (I2C_IE_XRDY_IE |I2C_IE_RRDY_IE |I2C_IE_ARDY_IE | +writew (I2C_IE_XRDY_IE |I2C_IE_RRDY_IE |I2C_IE_ARDY_IE |I2C_IE_NACK_IE |I2C_IE_AL_IE , &i2c_base->ie); -udelay (1000 ); +udelay (1000 );flush_fifo (); -writew (0xFFFF , &i2c_base->stat); -writew (0 , &i2c_base->cnt); +writew (0xFFFF , &i2c_base->stat); +writew (0 , &i2c_base->cnt);if (gd->flags &GD_FLG_RELOC ) bus_initialized[current_bus] =1 ; } -static int i2c_read_byte (u8 devaddr,u8 regoffset,u8 * value) +static int i2c_read_byte (u8 devaddr,u8 regoffset,u8 *value) {int i2c_error =0 ;u16 status;/* wait until bus not busy */ -wait_for_bb (); +wait_for_bb ();/* one byte only */ -writew (1 , &i2c_base->cnt); +writew (1 , &i2c_base->cnt);/* set slave address */ -writew (devaddr, &i2c_base->sa); +writew (devaddr, &i2c_base->sa);/* no stop bit needed here */ -writew (I2C_CON_EN |I2C_CON_MST |I2C_CON_STT |I2C_CON_TRX , &i2c_base->con); +writew (I2C_CON_EN |I2C_CON_MST |I2C_CON_STT | +I2C_CON_TRX , &i2c_base->con);/* send register offset */ while (1 ) {
@@ -196,7 +197,7 @@ static int i2c_read_byte (u8 devaddr, u8 regoffset, u8 * value) }if (status &I2C_STAT_RRDY ) {#if defined(CONFIG_OMAP243X ) || defined(CONFIG_OMAP34XX ) || \ - defined(CONFIG_OMAP44XX ) + defined(CONFIG_OMAP44XX ) *value =readb (&i2c_base->data);#else *value =readw (&i2c_base->data);
@@ -211,8 +212,8 @@ static int i2c_read_byte (u8 devaddr, u8 regoffset, u8 * value) read_exit:flush_fifo (); -writew (0xFFFF , &i2c_base->stat); -writew (0 , &i2c_base->cnt); +writew (0xFFFF , &i2c_base->stat); +writew (0 , &i2c_base->cnt);return i2c_error; }
@@ -222,38 +223,37 @@ static void flush_fifo(void)/* note: if you try and read data when its not there or ready * you get a bus error */ -while (1 ){ +while (1 ) { stat =readw (&i2c_base->stat); -if (stat ==I2C_STAT_RRDY ){ +if (stat ==I2C_STAT_RRDY ) {#if defined(CONFIG_OMAP243X ) || defined(CONFIG_OMAP34XX ) || \ - defined(CONFIG_OMAP44XX ) + defined(CONFIG_OMAP44XX )readb (&i2c_base->data);#else readw (&i2c_base->data);#endif -writew (I2C_STAT_RRDY ,&i2c_base->stat); +writew (I2C_STAT_RRDY , &i2c_base->stat);udelay (1000 ); - }else + }else break ; } } -int i2c_probe (uchar chip) +int i2c_probe (uchar chip) {u16 status;int res =1 ;/* default = fail */ -if (chip ==readw (&i2c_base->oa)) { +if (chip ==readw (&i2c_base->oa))return res; - }/* wait until bus not busy */ -wait_for_bb (); +wait_for_bb ();/* try to write one byte */ -writew (1 , &i2c_base->cnt); +writew (1 , &i2c_base->cnt);/* set slave address */ -writew (chip, &i2c_base->sa); +writew (chip, &i2c_base->sa);/* stop bit needed here */ writew (I2C_CON_EN |I2C_CON_MST |I2C_CON_STT |I2C_CON_TRX |I2C_CON_STP , &i2c_base->con);
@@ -268,29 +268,30 @@ int i2c_probe (uchar chip)writew (0 , &i2c_base->con);flush_fifo (); -writew (0 , &i2c_base->cnt);/* don't allow any more data in...we don't want it.*/ +/* don't allow any more data in... we don't want it. */ +writew (0 , &i2c_base->cnt);writew (0xFFFF , &i2c_base->stat);return res; } -int i2c_read (uchar chip,uint addr,int alen,uchar * buffer,int len) +int i2c_read (uchar chip,uint addr,int alen,uchar *buffer,int len) {int i;if (alen >1 ) { -printf ("I2C read: addr len %d not supported\n" , alen); +printf ("I2C read: addr len %d not supported\n" , alen);return 1 ; }if (addr + len >256 ) { -printf ("I2C read: address out of range\n" ); +printf ("I2C read: address out of range\n" );return 1 ; }for (i =0 ; i < len; i++) { -if (i2c_read_byte (chip, addr + i, &buffer[i])) { -printf ("I2C read: I/O error\n" ); -i2c_init (CONFIG_SYS_I2C_SPEED ,CONFIG_SYS_I2C_SLAVE ); +if (i2c_read_byte (chip, addr + i, &buffer[i])) { +printf ("I2C read: I/O error\n" ); +i2c_init (CONFIG_SYS_I2C_SPEED ,CONFIG_SYS_I2C_SLAVE );return 1 ; } }
@@ -298,7 +299,7 @@ int i2c_read (uchar chip, uint addr, int alen, uchar * buffer, int len)return 0 ; } -int i2c_write (uchar chip,uint addr,int alen,uchar * buffer,int len) +int i2c_write (uchar chip,uint addr,int alen,uchar *buffer,int len) {int i;u16 status;
@@ -373,40 +374,40 @@ write_exit:return i2c_error; } -static void wait_for_bb (void ) +static void wait_for_bb (void ) {int timeout =I2C_TIMEOUT ;u16 stat;writew (0xFFFF , &i2c_base->stat);/* clear current interrupts...*/ -while ((stat =readw (&i2c_base->stat) &I2C_STAT_BB ) && timeout--) { -writew (stat, &i2c_base->stat); +while ((stat =readw (&i2c_base->stat) &I2C_STAT_BB ) && timeout--) { +writew (stat, &i2c_base->stat);udelay (1000 ); }if (timeout <=0 ) { -printf ("timed out in wait_for_bb: I2C_STAT=%x\n" , -readw (&i2c_base->stat)); +printf ("timed out in wait_for_bb: I2C_STAT=%x\n" , +readw (&i2c_base->stat)); }writew (0xFFFF , &i2c_base->stat);/* clear delayed stuff*/ } -static u16 wait_for_pin (void ) +static u16 wait_for_pin (void ) {u16 status;int timeout =I2C_TIMEOUT ;do { -udelay (1000 ); - status =readw (&i2c_base->stat); - }while ( !(status & +udelay (1000 ); + status =readw (&i2c_base->stat); + }while (!(status & (I2C_STAT_ROVR |I2C_STAT_XUDF |I2C_STAT_XRDY |I2C_STAT_RRDY |I2C_STAT_ARDY |I2C_STAT_NACK |I2C_STAT_AL )) && timeout--);if (timeout <=0 ) { -printf ("timed out in wait_for_pin: I2C_STAT=%x\n" , -readw (&i2c_base->stat)); +printf ("timed out in wait_for_pin: I2C_STAT=%x\n" , +readw (&i2c_base->stat));writew (0xFFFF , &i2c_base->stat); status =0 ; }
@@ -421,7 +422,7 @@ int i2c_set_bus_num(unsigned int bus)return -1 ; } -#if I2C_BUS_MAX ==3 +#if I2C_BUS_MAX ==3 if (bus ==2 ) i2c_base = (struct i2c *)I2C_BASE3 ;else
@@ -433,7 +434,7 @@ int i2c_set_bus_num(unsigned int bus) current_bus = bus; -if (!bus_initialized[current_bus]) +if (!bus_initialized[current_bus])i2c_init (CONFIG_SYS_I2C_SPEED ,CONFIG_SYS_I2C_SLAVE );return 0 ;
Signature · 6 lines
1.7.5.4 MATRIX VISION GmbH, Talstrasse 16, DE-71570 Oppenweiler Registergericht: Amtsgericht Stuttgart, HRB 271090 Geschaeftsfuehrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner, Erhard Meier
PATCH v3 1/1 ARMV7: OMAP: I2C driver: Write more than 1 byte at a time in i2c_write
In reply to Michael JonesHello Michael,
Quoted 9 lines · Michael Jones
This allows the EEPROM layer to send a single i2c write command per page, and wait
CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MSbetween i2c write commands.Signed-off-by Michael Jones <[email protected]>---
Changes for v3:
- Rewrote error messages to be more descriptive.
Quoted 5 lines
Changes for v2:
- None. Resubmitting to include custodian in cc:drivers/i2c/omap24xx_i2c.c | 135 ++++++++++++++++++------------------------- 1 files changed, 57 insertions(+), 78 deletions(-)
Doing a "MAKEALL" for the omap boards throws following warning:
Configuring for cm_t35 board...omap24xx_i2c.c: In function 'i2c_write':
omap24xx_i2c.c:314: warning: too few arguments for format
text data bss dec hex filename
287288 8156 221036 516480 7e180 ./u-boot
Configuring for omap3_overo board... omap24xx_i2c.c: In function 'i2c_write':
omap24xx_i2c.c:314: warning: too few arguments for format
text data bss dec hex filename
256804 7556 212180 476540 7457c ./u-boot
Configuring for omap3_pandora board... omap24xx_i2c.c: In function 'i2c_write':
omap24xx_i2c.c:314: warning: too few arguments for format
text data bss dec hex filename
366033 7956 206620 580609 8dc01 ./u-boot
[...]
Please fix!
Quoted 5 lines
drivers/i2c/omap24xx_i2c.c +0
-0
[...]
Quoted 6 lines
drivers/i2c/omap24xx_i2c.c +2
-0@@ -372,26 +301,76 @@ int i2c_read (uchar chip, uint addr, int alen, uchar * buffer, int len)int i2c_write (uchar chip,uint addr,int alen,uchar * buffer,int len) {int i; +u16 status; +int i2c_error =0 ;
drivers/i2c/omap24xx_i2c.c int i2c_read (uchar chip, uint addr, int alen, uchar * buffer, int len) · line 313
Quoted 10 lines
drivers/i2c/omap24xx_i2c.c +2
-2if (alen >1 ) { -printf ("I2C read: addr len %d not supported\n" , alen); +printf ("I2C write: addr len %d not supported\n" , alen);return 1 ; }if (addr + len >256 ) { -printf ("I2C read: address out of range\n" ); +printf ("I2C write: address 0x%x + 0x%x out of range\n" );
^^^^ ^^^^
missing Arguments here!
@Sandeep Paulraj, beside of that warning, could you Ack/Nack this patch, so I can apply this patch to u-boot-i2c, or do you pick up this patch?
bye,
Heiko
Signature · 2 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
PATCH v4 1/1 ARMV7: OMAP: I2C driver: Write more than 1 byte at a time in i2c_write
This allows the EEPROM layer to send a single i2c write command per page, and wait CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS between i2c write commands.
---
Changes for v4:
- Added missing args for printf on out-of-range
Changes for v3:
- Rewrote error messages to be more descriptive.
Changes for v2:
- None. Resubmitting to include custodian in cc:
drivers/i2c/omap24xx_i2c.c | 136 +++++++++++++++++++------------------------- 1 files changed, 58 insertions(+), 78 deletions(-)
drivers/i2c/omap24xx_i2c.c +58 -78
@@ -216,77 +216,6 @@ read_exit:return i2c_error; } -static int i2c_write_byte (u8 devaddr,u8 regoffset,u8 value) -{ -int i2c_error =0 ; -u16 status; - -/* wait until bus not busy */ -wait_for_bb (); - -/* two bytes */ -writew (2 , &i2c_base->cnt); -/* set slave address */ -writew (devaddr, &i2c_base->sa); -/* stop bit needed here */ -writew (I2C_CON_EN |I2C_CON_MST |I2C_CON_STT |I2C_CON_TRX | -I2C_CON_STP , &i2c_base->con); - -while (1 ) { - status =wait_for_pin (); -if (status ==0 || status &I2C_STAT_NACK ) { - i2c_error =1 ; - goto write_exit; - } -if (status &I2C_STAT_XRDY ) { -#if defined(CONFIG_OMAP243X ) || defined(CONFIG_OMAP34XX ) || \ - defined(CONFIG_OMAP44XX ) -/* send register offset */ -writeb (regoffset, &i2c_base->data); -writew (I2C_STAT_XRDY , &i2c_base->stat); - -while (1 ) { - status =wait_for_pin (); -if (status ==0 || status &I2C_STAT_NACK ) { - i2c_error =1 ; - goto write_exit; - } -if (status &I2C_STAT_XRDY ) { -/* send data */ -writeb (value, &i2c_base->data); -writew (I2C_STAT_XRDY , &i2c_base->stat); - } -if (status &I2C_STAT_ARDY ) { -writew (I2C_STAT_ARDY , &i2c_base->stat); -break ; - } - } -break ; -#else -/* send out two bytes */ -writew ((value <<8 ) + regoffset, &i2c_base->data); -writew (I2C_STAT_XRDY , &i2c_base->stat); -#endif - } -if (status &I2C_STAT_ARDY ) { -writew (I2C_STAT_ARDY , &i2c_base->stat); -break ; - } - } - -wait_for_bb (); - - status =readw (&i2c_base->stat); -if (status &I2C_STAT_NACK ) - i2c_error =1 ; - -write_exit: -flush_fifo (); -writew (0xFFFF , &i2c_base->stat); -writew (0 , &i2c_base->cnt); -return i2c_error; -} -static void flush_fifo (void ) {u16 stat;
@@ -372,26 +301,77 @@ int i2c_read (uchar chip, uint addr, int alen, uchar * buffer, int len)int i2c_write (uchar chip,uint addr,int alen,uchar * buffer,int len) {int i; +u16 status; +int i2c_error =0 ;if (alen >1 ) { -printf ("I2C read: addr len %d not supported\n" , alen); +printf ("I2C write: addr len %d not supported\n" , alen);return 1 ; }if (addr + len >256 ) { -printf ("I2C read: address out of range\n" ); +printf ("I2C write: address 0x%x + 0x%x out of range\n" , + addr, len);return 1 ; } +/* wait until bus not busy */ +wait_for_bb (); + +/* start address phase - will write regoffset + len bytes data */ +/* TODO consider case when !CONFIG_OMAP243X/34XX/44XX */ +writew (alen + len, &i2c_base->cnt); +/* set slave address */ +writew (chip, &i2c_base->sa); +/* stop bit needed here */ +writew (I2C_CON_EN |I2C_CON_MST |I2C_CON_STT |I2C_CON_TRX | +I2C_CON_STP , &i2c_base->con); + +/* Send address byte */ + status =wait_for_pin (); + +if (status ==0 || status &I2C_STAT_NACK ) { + i2c_error =1 ; +printf ("error waiting for i2c address ACK (status=0x%x)\n" , + status); + goto write_exit; + } + +if (status &I2C_STAT_XRDY ) { +writeb (addr &0xFF , &i2c_base->data); +writew (I2C_STAT_XRDY , &i2c_base->stat); + }else { + i2c_error =1 ; +printf ("i2c bus not ready for transmit (status=0x%x)\n" , + status); + goto write_exit; + } + +/* address phase is over, now write data */ for (i =0 ; i < len; i++) { -if (i2c_write_byte (chip, addr + i, buffer[i])) { -printf ("I2C read: I/O error\n" ); -i2c_init (CONFIG_SYS_I2C_SPEED ,CONFIG_SYS_I2C_SLAVE ); -return 1 ; + status =wait_for_pin (); + +if (status ==0 || status &I2C_STAT_NACK ) { + i2c_error =1 ; +printf ("i2c error waiting for data ACK (status=0x%x)\n" , + status); + goto write_exit; + } + +if (status &I2C_STAT_XRDY ) { +writeb (buffer[i], &i2c_base->data); +writew (I2C_STAT_XRDY , &i2c_base->stat); + }else { + i2c_error =1 ; +printf ("i2c bus not ready for Tx (i=%d)\n" , i); + goto write_exit; } } -return 0 ; +write_exit: +flush_fifo (); +writew (0xFFFF , &i2c_base->stat); +return i2c_error; }static void wait_for_bb (void )
Signature · 6 lines
1.7.5.4 MATRIX VISION GmbH, Talstrasse 16, DE-71570 Oppenweiler Registergericht: Amtsgericht Stuttgart, HRB 271090 Geschaeftsfuehrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner, Erhard Meier
PATCH v4 1/1 ARMV7: OMAP: I2C driver: Write more than 1 byte at a time in i2c_write
Hello Paulraj,
Quoted 9 lines · Michael Jones
This allows the EEPROM layer to send a single i2c write command per page, and wait
CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MSbetween i2c write commands.Signed-off-by Michael Jones <[email protected]>---
Changes for v4:
- Added missing args for printf on out-of-range
Quoted 8 lines
Changes for v3:
- Rewrote error messages to be more descriptive.Changes for v2:
- None. Resubmitting to include custodian in cc:drivers/i2c/omap24xx_i2c.c | 136 +++++++++++++++++++------------------------- 1 files changed, 58 insertions(+), 78 deletions(-)
This patch is now checkpatch and makeall clean, can you Ack/Nack this patch, so I can pick it up, if you give your ack? (Or do you want to apply it, so I can Ack it)
There is also a cosmetic (checkpatch cleanup) patch for this driver, see:
http://patchwork.ozlabs.org/patch/107052/
bye,
Heiko
Signature · 2 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Paulraj
PATCH v4 1/1 ARMV7: OMAP: I2C driver: Write more than 1 byte at a time in i2c_write
Quoted 6 lines
This patch is now checkpatch and makeall clean, can you Ack/Nack this patch, so I can pick it up, if you give your ack? (Or do you want to apply it, so I can Ack it)
Quoted 7 lines
There is also a cosmetic (checkpatch cleanup) patch for this driver, see:
http://patchwork.ozlabs.org/patch/107052/
bye,
Heiko
OK I'll apply it
Regards,
Sandeep
PATCH v4 1/1 ARMV7: OMAP: I2C driver: Write more than 1 byte at a time in i2c_write
Hello Sandeep,
Quoted 7 lines · Sandeep
Quoted 7 lines
This patch is now checkpatch and makeall clean, can you Ack/Nack this patch, so I can pick it up, if you give your ack? (Or do you want to apply it, so I can Ack it)
There is also a cosmetic (checkpatch cleanup) patch for this driver, see:
Quoted 6 lines
Quoted 4 lines
http://patchwork.ozlabs.org/patch/107052/
bye,
HeikoOK I'll apply it
Ok, so I give you my:
for the
http://patchwork.ozlabs.org/patch/107711/
http://patchwork.ozlabs.org/patch/107052/
patches, Thanks!
bye,
Heiko
Signature · 2 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
PATCH v2 6/7 ARMV7: OMAP: I2C driver: Write more than 1 byte at a time in i2c_write
In reply to Michael JonesDear Michael Jones,
Quoted 4 lines · In message <[email protected]> you wrote:
Question about cosmetics: the README says "In sources originating from U-Boot a style corresponding to "Lindent -pcs" (adding spaces before parameters to function calls) is actually used." Currently this is not
This was the old (aka "my own") style. But I got overruled. I'm going to post a patch to fix the README.
Quoted 3 lines
uniform in this file, because checkpatch.pl doesn't like the spaces between function names and '(' (and neither do I). Are there supposed to be such spaces in U-Boot code? Or can we uniformly remove them in this file?
Please remove them.
Best regards,
Wolfgang Denk
Signature · 4 lines
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 "A little knowledge is a dangerous thing." - Doug Gwyn
PATCH 7/7 OMAP3: mvblx: Initial support for mvBlueLYNX-X
In reply to Michael JonesAdd support for the MATRIX VISION mvBlueLYNX-X, an OMAP3-based intelligent camera.
--- MAINTAINERS | 4 + MAKEALL | 1 + board/matrix_vision/mvblx/Makefile | 53 +++++ board/matrix_vision/mvblx/config.mk | 33 +++ board/matrix_vision/mvblx/fpga.c | 222 ++++++++++++++++++ board/matrix_vision/mvblx/fpga.h | 32 +++ board/matrix_vision/mvblx/mvblx.c | 171 ++++++++++++++ board/matrix_vision/mvblx/mvblx.h | 362 +++++++++++++++++++++++++++++ board/matrix_vision/mvblx/sys_eeprom.c | 395 ++++++++++++++++++++++++++++++++ boards.cfg | 1 + doc/README.omap3 | 5 + include/configs/omap3_mvblx.h | 312 +++++++++++++++++++++++++ 12 files changed, 1591 insertions(+), 0 deletions(-) create mode 100644 board/matrix_vision/mvblx/Makefile create mode 100644 board/matrix_vision/mvblx/config.mk create mode 100644 board/matrix_vision/mvblx/fpga.c create mode 100644 board/matrix_vision/mvblx/fpga.h create mode 100644 board/matrix_vision/mvblx/mvblx.c create mode 100644 board/matrix_vision/mvblx/mvblx.h create mode 100644 board/matrix_vision/mvblx/sys_eeprom.c create mode 100644 include/configs/omap3_mvblx.h
MAINTAINERS +4 -0
@@ -678,6 +678,10 @@ Gary Jennejohn <[email protected]> smdk2400 ARM920T +Michael Jones <[email protected]> + + omap3_mvblx ARM ARMV7 (OMAP3xx SoC) + Matthias Kaehlcke <[email protected]> edb9301 ARM920T (EP9301) edb9302 ARM920T (EP9302)
MAKEALL +1 -0
@@ -434,6 +434,7 @@ LIST_ARMV7=" \ omap3_sdp3430 \ omap3_zoom1 \ omap3_zoom2 \ + omap3_mvblx \ omap4_panda \ omap4_sdp4430 \ s5p_goni \
board/matrix_vision/mvblx/Makefile new file +53 -0
53 lines not on this page · raw message
board/matrix_vision/mvblx/config.mk new file +33 -0
@@ -0,0 +1,33 @@ +# +# (C) Copyright 2006 +# Texas Instruments, <www.ti.com> +# +# Beagle Board uses OMAP3 (ARM-CortexA8) cpu +# see http://www.ti.com/ for more information on Texas Instruments +# +# See file CREDITS for list of people who contributed to this +# project. +# +# 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 +# +# Physical Address: +# 8000'0000 (bank0) +# A000/0000 (bank1) +# Linux-Kernel is expected to be at 8000'8000, entry 8000'8000 +# (mem base + reserved) + +# For use with external or internal boots. +CONFIG_SYS_TEXT_BASE = 0x80008000
board/matrix_vision/mvblx/fpga.c new file +222 -0
222 lines not on this page · raw message
board/matrix_vision/mvblx/fpga.h new file +32 -0
@@ -0,0 +1,32 @@ +/* +* (C) Copyright 2002 +* Rich Ireland, Enterasys Networks, rireland at enterasys.com. +* Keith Outwater, [email protected]. +* +* See file CREDITS for list of people who contributed to this +* project. +* +* 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 +* +*/ + +extern int mvblx_init_fpga (void ); + +extern int fpga_status_fn (int cookie); +extern int fpga_config_fn (int assert,int flush,int cookie); +extern int fpga_done_fn (int cookie); +extern int fpga_wr_fn (void *buf,size_t len,int flush,int cookie); +extern int fpga_null_fn (int cookie);
board/matrix_vision/mvblx/mvblx.c new file +171 -0
171 lines not on this page · raw message
board/matrix_vision/mvblx/mvblx.h new file +362 -0
362 lines not on this page · raw message
board/matrix_vision/mvblx/sys_eeprom.c new file +395 -0
395 lines not on this page · raw message
boards.cfg +1 -0
@@ -151,6 +151,7 @@ am3517_evm arm armv7 am3517evm logicpd dig297 arm armv7 dig297 comelit omap3 omap3_zoom1 arm armv7 zoom1 logicpd omap3 omap3_zoom2 arm armv7 zoom2 logicpd omap3 +omap3_mvblx arm armv7 mvblx matrix_vision omap3 omap3_beagle arm armv7 beagle ti omap3 omap3_evm arm armv7 evm ti omap3 omap3_sdp3430 arm armv7 sdp3430 ti omap3
doc/README.omap3 +5 -0
@@ -68,6 +68,11 @@ make make cm_t35_config make +* BlueLYNX-X: + +make omap3_mvblx +make + Custom commands ===============
include/configs/omap3_mvblx.h new file +312 -0
312 lines not on this page · raw message
Signature · 6 lines
1.7.5.4 MATRIX VISION GmbH, Talstrasse 16, DE-71570 Oppenweiler Registergericht: Amtsgericht Stuttgart, HRB 271090 Geschaeftsfuehrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner, Erhard Meier
PATCH v2 7/7 OMAP3: mvblx: Initial support for mvBlueLYNX-X
Add support for the MATRIX VISION mvBlueLYNX-X, an OMAP3-based intelligent camera.
---
Changes for v2:
- None. Resubmitting to include custodian in cc:
MAINTAINERS | 4 + MAKEALL | 1 + board/matrix_vision/mvblx/Makefile | 53 +++++ board/matrix_vision/mvblx/config.mk | 33 +++ board/matrix_vision/mvblx/fpga.c | 222 ++++++++++++++++++ board/matrix_vision/mvblx/fpga.h | 32 +++ board/matrix_vision/mvblx/mvblx.c | 171 ++++++++++++++ board/matrix_vision/mvblx/mvblx.h | 362 +++++++++++++++++++++++++++++ board/matrix_vision/mvblx/sys_eeprom.c | 395 ++++++++++++++++++++++++++++++++ boards.cfg | 1 + doc/README.omap3 | 5 + include/configs/omap3_mvblx.h | 312 +++++++++++++++++++++++++ 12 files changed, 1591 insertions(+), 0 deletions(-) create mode 100644 board/matrix_vision/mvblx/Makefile create mode 100644 board/matrix_vision/mvblx/config.mk create mode 100644 board/matrix_vision/mvblx/fpga.c create mode 100644 board/matrix_vision/mvblx/fpga.h create mode 100644 board/matrix_vision/mvblx/mvblx.c create mode 100644 board/matrix_vision/mvblx/mvblx.h create mode 100644 board/matrix_vision/mvblx/sys_eeprom.c create mode 100644 include/configs/omap3_mvblx.h
MAINTAINERS +4 -0
@@ -678,6 +678,10 @@ Gary Jennejohn <[email protected]> smdk2400 ARM920T +Michael Jones <[email protected]> + + omap3_mvblx ARM ARMV7 (OMAP3xx SoC) + Matthias Kaehlcke <[email protected]> edb9301 ARM920T (EP9301) edb9302 ARM920T (EP9302)
MAKEALL +1 -0
@@ -434,6 +434,7 @@ LIST_ARMV7=" \ omap3_sdp3430 \ omap3_zoom1 \ omap3_zoom2 \ + omap3_mvblx \ omap4_panda \ omap4_sdp4430 \ s5p_goni \
board/matrix_vision/mvblx/Makefile new file +53 -0
53 lines not on this page · raw message
board/matrix_vision/mvblx/config.mk new file +33 -0
@@ -0,0 +1,33 @@ +# +# (C) Copyright 2006 +# Texas Instruments, <www.ti.com> +# +# Beagle Board uses OMAP3 (ARM-CortexA8) cpu +# see http://www.ti.com/ for more information on Texas Instruments +# +# See file CREDITS for list of people who contributed to this +# project. +# +# 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 +# +# Physical Address: +# 8000'0000 (bank0) +# A000/0000 (bank1) +# Linux-Kernel is expected to be at 8000'8000, entry 8000'8000 +# (mem base + reserved) + +# For use with external or internal boots. +CONFIG_SYS_TEXT_BASE = 0x80008000
board/matrix_vision/mvblx/fpga.c new file +222 -0
222 lines not on this page · raw message
board/matrix_vision/mvblx/fpga.h new file +32 -0
@@ -0,0 +1,32 @@ +/* +* (C) Copyright 2002 +* Rich Ireland, Enterasys Networks, rireland at enterasys.com. +* Keith Outwater, [email protected]. +* +* See file CREDITS for list of people who contributed to this +* project. +* +* 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 +* +*/ + +extern int mvblx_init_fpga (void ); + +extern int fpga_status_fn (int cookie); +extern int fpga_config_fn (int assert,int flush,int cookie); +extern int fpga_done_fn (int cookie); +extern int fpga_wr_fn (void *buf,size_t len,int flush,int cookie); +extern int fpga_null_fn (int cookie);
board/matrix_vision/mvblx/mvblx.c new file +171 -0
171 lines not on this page · raw message
board/matrix_vision/mvblx/mvblx.h new file +362 -0
362 lines not on this page · raw message
board/matrix_vision/mvblx/sys_eeprom.c new file +395 -0
395 lines not on this page · raw message
boards.cfg +1 -0
@@ -151,6 +151,7 @@ am3517_evm arm armv7 am3517evm logicpd dig297 arm armv7 dig297 comelit omap3 omap3_zoom1 arm armv7 zoom1 logicpd omap3 omap3_zoom2 arm armv7 zoom2 logicpd omap3 +omap3_mvblx arm armv7 mvblx matrix_vision omap3 omap3_beagle arm armv7 beagle ti omap3 omap3_evm arm armv7 evm ti omap3 omap3_sdp3430 arm armv7 sdp3430 ti omap3
doc/README.omap3 +5 -0
@@ -68,6 +68,11 @@ make make cm_t35_config make +* BlueLYNX-X: + +make omap3_mvblx +make + Custom commands ===============
include/configs/omap3_mvblx.h new file +312 -0
312 lines not on this page · raw message
Signature · 6 lines
1.7.5.4 MATRIX VISION GmbH, Talstrasse 16, DE-71570 Oppenweiler Registergericht: Amtsgericht Stuttgart, HRB 271090 Geschaeftsfuehrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner, Erhard Meier
PATCH v2 7/7 OMAP3: mvblx: Initial support for mvBlueLYNX-X
Hi Michael,
Quoted 7 lines · Michael Jones
Add support for the MATRIX VISION mvBlueLYNX-X, an OMAP3-based intelligent camera.
Signed-off-by Michael Jones <[email protected]>---
Changes for v2:
- None. Resubmitting to include custodian in cc:
[...]
Quoted 4 lines
new file mode 100644
index 0000000..1b8a005board/matrix_vision/mvblx/mvblx.c new file +0
-0
[...]
board/matrix_vision/mvblx/mvblx.c line 63
Quoted 10 lines
board/matrix_vision/mvblx/mvblx.c new file +10
-0+ +/* +* Routine: board_init +* Description: Early hardware init. +*/ +int board_init (void ) +{ +gpmc_init ();/* in SRAM or SDRAM, finish GPMC */ +/* board id for Linux */ + gd->bd->bi_arch_number =MACH_TYPE_MVBLX ;
This should be done in the board config file.
Please, see the CONFIG_MACH_TYPE in the U-Boot documentation (README file).
Signature · 2 lines
Regards, Igor.
PATCH v3 1/1 OMAP3: mvblx: Initial support for mvBlueLYNX-X
In reply to Michael JonesAdd support for the MATRIX VISION mvBlueLYNX-X, an OMAP3-based intelligent camera.
---
Changes for v3:
- Use CONFIG_MACH_TYPE to set gd->bd->bi_arch_number
Changes for v2:
- None. Resubmitting to include custodian in cc:
MAINTAINERS | 4 + MAKEALL | 1 + board/matrix_vision/mvblx/Makefile | 53 +++++ board/matrix_vision/mvblx/config.mk | 33 +++ board/matrix_vision/mvblx/fpga.c | 222 ++++++++++++++++++ board/matrix_vision/mvblx/fpga.h | 32 +++ board/matrix_vision/mvblx/mvblx.c | 169 ++++++++++++++ board/matrix_vision/mvblx/mvblx.h | 362 +++++++++++++++++++++++++++++ board/matrix_vision/mvblx/sys_eeprom.c | 395 ++++++++++++++++++++++++++++++++ boards.cfg | 1 + doc/README.omap3 | 5 + include/configs/omap3_mvblx.h | 313 +++++++++++++++++++++++++ 12 files changed, 1590 insertions(+), 0 deletions(-) create mode 100644 board/matrix_vision/mvblx/Makefile create mode 100644 board/matrix_vision/mvblx/config.mk create mode 100644 board/matrix_vision/mvblx/fpga.c create mode 100644 board/matrix_vision/mvblx/fpga.h create mode 100644 board/matrix_vision/mvblx/mvblx.c create mode 100644 board/matrix_vision/mvblx/mvblx.h create mode 100644 board/matrix_vision/mvblx/sys_eeprom.c create mode 100644 include/configs/omap3_mvblx.h
MAINTAINERS +4 -0
@@ -685,6 +685,10 @@ Gary Jennejohn <[email protected]> smdk2400 ARM920T +Michael Jones <[email protected]> + + omap3_mvblx ARM ARMV7 (OMAP3xx SoC) + Matthias Kaehlcke <[email protected]> edb9301 ARM920T (EP9301) edb9302 ARM920T (EP9302)
MAKEALL +1 -0
@@ -433,6 +433,7 @@ LIST_ARMV7=" \ omap3_sdp3430 \ omap3_zoom1 \ omap3_zoom2 \ + omap3_mvblx \ omap4_panda \ omap4_sdp4430 \ s5p_goni \
board/matrix_vision/mvblx/Makefile new file +53 -0
53 lines not on this page · raw message
board/matrix_vision/mvblx/config.mk new file +33 -0
@@ -0,0 +1,33 @@ +# +# (C) Copyright 2006 +# Texas Instruments, <www.ti.com> +# +# Beagle Board uses OMAP3 (ARM-CortexA8) cpu +# see http://www.ti.com/ for more information on Texas Instruments +# +# See file CREDITS for list of people who contributed to this +# project. +# +# 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 +# +# Physical Address: +# 8000'0000 (bank0) +# A000/0000 (bank1) +# Linux-Kernel is expected to be at 8000'8000, entry 8000'8000 +# (mem base + reserved) + +# For use with external or internal boots. +CONFIG_SYS_TEXT_BASE = 0x80008000
board/matrix_vision/mvblx/fpga.c new file +222 -0
222 lines not on this page · raw message
board/matrix_vision/mvblx/fpga.h new file +32 -0
@@ -0,0 +1,32 @@ +/* +* (C) Copyright 2002 +* Rich Ireland, Enterasys Networks, rireland at enterasys.com. +* Keith Outwater, [email protected]. +* +* See file CREDITS for list of people who contributed to this +* project. +* +* 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 +* +*/ + +extern int mvblx_init_fpga (void ); + +extern int fpga_status_fn (int cookie); +extern int fpga_config_fn (int assert,int flush,int cookie); +extern int fpga_done_fn (int cookie); +extern int fpga_wr_fn (void *buf,size_t len,int flush,int cookie); +extern int fpga_null_fn (int cookie);
board/matrix_vision/mvblx/mvblx.c new file +169 -0
169 lines not on this page · raw message
board/matrix_vision/mvblx/mvblx.h new file +362 -0
362 lines not on this page · raw message
board/matrix_vision/mvblx/sys_eeprom.c new file +395 -0
395 lines not on this page · raw message
boards.cfg +1 -0
@@ -157,6 +157,7 @@ am3517_evm arm armv7 am3517evm logicpd dig297 arm armv7 dig297 comelit omap3 omap3_zoom1 arm armv7 zoom1 logicpd omap3 omap3_zoom2 arm armv7 zoom2 logicpd omap3 +omap3_mvblx arm armv7 mvblx matrix_vision omap3 omap3_beagle arm armv7 beagle ti omap3 omap3_evm arm armv7 evm ti omap3 omap3_sdp3430 arm armv7 sdp3430 ti omap3
doc/README.omap3 +5 -0
@@ -68,6 +68,11 @@ make make cm_t35_config make +* BlueLYNX-X: + +make omap3_mvblx +make + Custom commands ===============
include/configs/omap3_mvblx.h new file +313 -0
313 lines not on this page · raw message
Signature · 6 lines
1.7.6 MATRIX VISION GmbH, Talstrasse 16, DE-71570 Oppenweiler Registergericht: Amtsgericht Stuttgart, HRB 271090 Geschaeftsfuehrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner, Erhard Meier
PATCH v3 1/1 OMAP3: mvblx: Initial support for mvBlueLYNX-X
Dear Michael Jones,
Quoted 24 lines · In message <[email protected]>…
Add support for the MATRIX VISION mvBlueLYNX-X, an OMAP3-based intelligent camera.
Signed-off-by Michael Jones <[email protected]>---
Changes for v3:
- UseCONFIG_MACH_TYPEto setgd->bd->bi_arch_numberChanges for v2:
- None. Resubmitting to include custodian in cc:MAINTAINERS | 4 + MAKEALL | 1 + board/matrix_vision/mvblx/Makefile | 53 +++++ board/matrix_vision/mvblx/config.mk | 33 +++ board/matrix_vision/mvblx/fpga.c | 222 ++++++++++++++++++ board/matrix_vision/mvblx/fpga.h | 32 +++ board/matrix_vision/mvblx/mvblx.c | 169 ++++++++++++++ board/matrix_vision/mvblx/mvblx.h | 362 +++++++++++++++++++++++++++++ board/matrix_vision/mvblx/sys_eeprom.c | 395 ++++++++++++++++++++++++++++++++ boards.cfg | 1 + doc/README.omap3 | 5 + include/configs/omap3_mvblx.h | 313 +++++++++++++++++++++++++ 12 files changed, 1590 insertions(+), 0 deletions(-)
Quoted 8 lines
create mode 100644 board/matrix_vision/mvblx/Makefile create mode 100644 board/matrix_vision/mvblx/config.mk create mode 100644 board/matrix_vision/mvblx/fpga.c create mode 100644 board/matrix_vision/mvblx/fpga.h create mode 100644 board/matrix_vision/mvblx/mvblx.c create mode 100644 board/matrix_vision/mvblx/mvblx.h create mode 100644 board/matrix_vision/mvblx/sys_eeprom.c create mode 100644 include/configs/omap3_mvblx.h
Checkpatch says:
total: 0 errors, 49 warnings, 1614 lines checked
Please clean up and resubmit. Thanks.
Best regards,
Wolfgang Denk
Signature · 6 lines
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 On the subject of C program indentation: "In My Egotistical Opinion, most people's C programs should be indented six feet downward and covered with dirt." - Blair P. Houghton
PATCH v4 1/1 OMAP3: mvblx: Initial support for mvBlueLYNX-X
In reply to Michael JonesAdd support for the MATRIX VISION mvBlueLYNX-X, an OMAP3-based intelligent camera.
---
I haven't had any real feedback on this submission yet, and I don't know if there is still any hope of getting it in to v2011.09. The previous version didn't build on top of the latest u-boot-arm branch anymore, so I'm rebasing it in the hopes that this will ease the review process.
v3 introduced a change which causes the board not to run on the current arm master branch until this patch is applied:
http://patchwork.ozlabs.org/patch/107021/
But this is a runtime problem.
Changes for v4:
- rebased on top of u-boot-arm master (f0628a67)
Changes for v3:
- Use CONFIG_MACH_TYPE to set gd->bd->bi_arch_number
Changes for v2:
- None. Resubmitting to include custodian in cc:
MAINTAINERS | 4 + board/matrix_vision/mvblx/Makefile | 53 +++++ board/matrix_vision/mvblx/config.mk | 33 +++ board/matrix_vision/mvblx/fpga.c | 222 ++++++++++++++++++ board/matrix_vision/mvblx/fpga.h | 32 +++ board/matrix_vision/mvblx/mvblx.c | 169 ++++++++++++++ board/matrix_vision/mvblx/mvblx.h | 362 +++++++++++++++++++++++++++++ board/matrix_vision/mvblx/sys_eeprom.c | 395 ++++++++++++++++++++++++++++++++ boards.cfg | 1 + doc/README.omap3 | 5 + include/configs/omap3_mvblx.h | 313 +++++++++++++++++++++++++ 11 files changed, 1589 insertions(+), 0 deletions(-) create mode 100644 board/matrix_vision/mvblx/Makefile create mode 100644 board/matrix_vision/mvblx/config.mk create mode 100644 board/matrix_vision/mvblx/fpga.c create mode 100644 board/matrix_vision/mvblx/fpga.h create mode 100644 board/matrix_vision/mvblx/mvblx.c create mode 100644 board/matrix_vision/mvblx/mvblx.h create mode 100644 board/matrix_vision/mvblx/sys_eeprom.c create mode 100644 include/configs/omap3_mvblx.h
MAINTAINERS +4 -0
@@ -690,6 +690,10 @@ Gary Jennejohn <[email protected]> smdk2400 ARM920T +Michael Jones <[email protected]> + + omap3_mvblx ARM ARMV7 (OMAP3xx SoC) + Matthias Kaehlcke <[email protected]> edb9301 ARM920T (EP9301) edb9302 ARM920T (EP9302)
board/matrix_vision/mvblx/Makefile new file +53 -0
53 lines not on this page · raw message
board/matrix_vision/mvblx/config.mk new file +33 -0
@@ -0,0 +1,33 @@ +# +# (C) Copyright 2006 +# Texas Instruments, <www.ti.com> +# +# Beagle Board uses OMAP3 (ARM-CortexA8) cpu +# see http://www.ti.com/ for more information on Texas Instruments +# +# See file CREDITS for list of people who contributed to this +# project. +# +# 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 +# +# Physical Address: +# 8000'0000 (bank0) +# A000/0000 (bank1) +# Linux-Kernel is expected to be at 8000'8000, entry 8000'8000 +# (mem base + reserved) + +# For use with external or internal boots. +CONFIG_SYS_TEXT_BASE = 0x80008000
board/matrix_vision/mvblx/fpga.c new file +222 -0
222 lines not on this page · raw message
board/matrix_vision/mvblx/fpga.h new file +32 -0
@@ -0,0 +1,32 @@ +/* +* (C) Copyright 2002 +* Rich Ireland, Enterasys Networks, rireland at enterasys.com. +* Keith Outwater, [email protected]. +* +* See file CREDITS for list of people who contributed to this +* project. +* +* 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 +* +*/ + +extern int mvblx_init_fpga (void ); + +extern int fpga_status_fn (int cookie); +extern int fpga_config_fn (int assert,int flush,int cookie); +extern int fpga_done_fn (int cookie); +extern int fpga_wr_fn (const void *buf,size_t len,int flush,int cookie); +extern int fpga_null_fn (int cookie);
board/matrix_vision/mvblx/mvblx.c new file +169 -0
169 lines not on this page · raw message
board/matrix_vision/mvblx/mvblx.h new file +362 -0
362 lines not on this page · raw message
board/matrix_vision/mvblx/sys_eeprom.c new file +395 -0
395 lines not on this page · raw message
boards.cfg +1 -0
@@ -190,6 +190,7 @@ am3517_evm arm armv7 am3517evm logicpd dig297 arm armv7 dig297 comelit omap3 omap3_zoom1 arm armv7 zoom1 logicpd omap3 omap3_zoom2 arm armv7 zoom2 logicpd omap3 +omap3_mvblx arm armv7 mvblx matrix_vision omap3 omap3_beagle arm armv7 beagle ti omap3 omap3_evm arm armv7 evm ti omap3 omap3_sdp3430 arm armv7 sdp3430 ti omap3
doc/README.omap3 +5 -0
@@ -68,6 +68,11 @@ make make cm_t35_config make +* BlueLYNX-X: + +make omap3_mvblx +make + Custom commands ===============
include/configs/omap3_mvblx.h new file +313 -0
313 lines not on this page · raw message
Signature · 6 lines
1.7.6 MATRIX VISION GmbH, Talstrasse 16, DE-71570 Oppenweiler Registergericht: Amtsgericht Stuttgart, HRB 271090 Geschaeftsfuehrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner, Erhard Meier
PATCH v4 1/1 OMAP3: mvblx: Initial support for mvBlueLYNX-X
Dear Michael Jones,
Quoted 38 lines · In message <[email protected]>…
Add support for the MATRIX VISION mvBlueLYNX-X, an OMAP3-based intelligent camera.
Signed-off-by Michael Jones <[email protected]>---
I haven't had any real feedback on this submission yet, and I don't know if there is still any hope of getting it in to v2011.09. The previous version didn't build on top of the latest u-boot-arm branch anymore, so I'm rebasing it in the hopes that this will ease the review process.
v3 introduced a change which causes the board not to run on the current arm master branch until this patch is applied:
http://patchwork.ozlabs.org/patch/107021/
But this is a runtime problem.Changes for v4:
- rebased on top of u-boot-arm master (f0628a67)Changes for v3:
- UseCONFIG_MACH_TYPEto setgd->bd->bi_arch_numberChanges for v2:
- None. Resubmitting to include custodian in cc:MAINTAINERS | 4 + board/matrix_vision/mvblx/Makefile | 53 +++++ board/matrix_vision/mvblx/config.mk | 33 +++ board/matrix_vision/mvblx/fpga.c | 222 ++++++++++++++++++ board/matrix_vision/mvblx/fpga.h | 32 +++ board/matrix_vision/mvblx/mvblx.c | 169 ++++++++++++++ board/matrix_vision/mvblx/mvblx.h | 362 +++++++++++++++++++++++++++++ board/matrix_vision/mvblx/sys_eeprom.c | 395 ++++++++++++++++++++++++++++++++ boards.cfg | 1 + doc/README.omap3 | 5 + include/configs/omap3_mvblx.h | 313 +++++++++++++++++++++++++ 11 files changed, 1589 insertions(+), 0 deletions(-)
Quoted 8 lines
create mode 100644 board/matrix_vision/mvblx/Makefile create mode 100644 board/matrix_vision/mvblx/config.mk create mode 100644 board/matrix_vision/mvblx/fpga.c create mode 100644 board/matrix_vision/mvblx/fpga.h create mode 100644 board/matrix_vision/mvblx/mvblx.c create mode 100644 board/matrix_vision/mvblx/mvblx.h create mode 100644 board/matrix_vision/mvblx/sys_eeprom.c create mode 100644 include/configs/omap3_mvblx.h
Checkpatch says:
total: 0 errors, 49 warnings, 1607 lines checked
Please clean up and resubmit. Thanks.
Best regards,
Wolfgang Denk
Signature · 6 lines
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 If you believe that feeling bad or worrying long enough will change a past or future event, then you are residing on another planet with a different reality system.
PATCH v4 1/1 OMAP3: mvblx: Initial support for mvBlueLYNX-X
Hi Wolfgang,
Quoted 53 lines · Wolfgang Denk
Dear Michael Jones,
Quoted 38 lines · In message<[email protected]>…
Add support for the MATRIX VISION mvBlueLYNX-X, an OMAP3-based intelligent camera.
Signed-off-by Michael Jones<[email protected]>---
I haven't had any real feedback on this submission yet, and I don't know if there is still any hope of getting it in to v2011.09. The previous version didn't build on top of the latest u-boot-arm branch anymore, so I'm rebasing it in the hopes that this will ease the review process.
v3 introduced a change which causes the board not to run on the current arm master branch until this patch is applied:
http://patchwork.ozlabs.org/patch/107021/
But this is a runtime problem.Changes for v4:
- rebased on top of u-boot-arm master (f0628a67)Changes for v3:
- UseCONFIG_MACH_TYPEto setgd->bd->bi_arch_numberChanges for v2:
- None. Resubmitting to include custodian in cc:MAINTAINERS | 4 + board/matrix_vision/mvblx/Makefile | 53 +++++ board/matrix_vision/mvblx/config.mk | 33 +++ board/matrix_vision/mvblx/fpga.c | 222 ++++++++++++++++++ board/matrix_vision/mvblx/fpga.h | 32 +++ board/matrix_vision/mvblx/mvblx.c | 169 ++++++++++++++ board/matrix_vision/mvblx/mvblx.h | 362 +++++++++++++++++++++++++++++ board/matrix_vision/mvblx/sys_eeprom.c | 395 ++++++++++++++++++++++++++++++++ boards.cfg | 1 + doc/README.omap3 | 5 + include/configs/omap3_mvblx.h | 313 +++++++++++++++++++++++++ 11 files changed, 1589 insertions(+), 0 deletions(-)Quoted 8 lines
create mode 100644 board/matrix_vision/mvblx/Makefile create mode 100644
board/matrix_vision/mvblx/config.mkcreate mode 100644board/matrix_vision/mvblx/fpga.ccreate mode 100644board/matrix_vision/mvblx/fpga.hcreate mode 100644board/matrix_vision/mvblx/mvblx.ccreate mode 100644board/matrix_vision/mvblx/mvblx.hcreate mode 100644board/matrix_vision/mvblx/sys_eeprom.ccreate mode 100644include/configs/omap3_mvblx.hCheckpatch says:
Quoted 8 lines
total: 0 errors, 49 warnings, 1607 lines checked
Please clean up and resubmit. Thanks.
Best regards,
Wolfgang Denk
I've already submitted v5 [1], which was mainly to get rid of exactly those warnings. There remain 4 warnings, but they look Linux-specific.
But while we're on the topic- Most of those old warnings were because my board/matrix_vision/mvblx/mvblx.h was based on board/ti/beagle/beagle.h, which would've itself had lots of checkpatch warnings from long lines. Sandeep advised me that this was a poor argument for submitting a patch with warnings, so I submitted v5. Now I've researched this again and found the patch which introduced the warnings for beagle.h and the discussion [2] around it. If it was decided back then to indent the lines with tabs although it caused checkpatch warnings, isn't it reasonable for mvblx.h to be formatted in the same way? I don't care how it's formatted, but I find the inconsistency ugly.
If you agree that the checkpatch warnings from mvblx.h are preferable to being inconsistent with the formatting of beagle.h, I will submit v6 with mvblx.h changed back to be formatted like the current beagle.h.
-Michael
[1]http://patchwork.ozlabs.org/patch/117879/ [2]http://http://lists.denx.de/pipermail/u-boot/2009-September/061619.html
MATRIX VISION GmbH, Talstrasse 16, DE-71570 Oppenweiler
Registergericht: Amtsgericht Stuttgart, HRB 271090
Geschaeftsfuehrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner, Erhard Meier
PATCH v4 1/1 OMAP3: mvblx: Initial support for mvBlueLYNX-X
Dear Michael Jones,
Quoted 11 lines · In message <[email protected]> you wrote:
But while we're on the topic- Most of those old warnings were because my
board/matrix_vision/mvblx/mvblx.hwas based onboard/ti/beagle/beagle.h, which would've itself had lots of checkpatch warnings from long lines. Sandeep advised me that this was a poor argument for submitting a patch with warnings, so I submitted v5. Now I've researched this again and found the patch which introduced the warnings forbeagle.hand the discussion [2] around it. If it was decided back then to indent the lines with tabs although it caused checkpatch warnings, isn't it reasonable formvblx.hto be formatted in the same way? I don't care how it's formatted, but I find the inconsistency ugly.
There are a few cases where longer lines actually provide better readbility than wrapping the code - these are things like tables of MUX initializations, and the like.
But "normal" code or header files has a strict 80 char line length limit.
Best regards,
Wolfgang Denk
Signature · 4 lines
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 Star Trek Lives!
PATCH v5 1/1 OMAP3: mvblx: Initial support for mvBlueLYNX-X
In reply to Michael JonesAdd support for the MATRIX VISION mvBlueLYNX-X, an OMAP3-based intelligent camera.
---
This has been rebased on top of u-boot master (4f7549d2dc0)
Changes for v2:
- None. Resubmitting to include custodian in cc:
Changes for v3:
- Use CONFIG_MACH_TYPE to set gd->bd->bi_arch_number
Changes for v4:
- rebased on top of u-boot-arm master (f0628a67)
Changes for v5:
- Use generic gpio API
- change formatting to get rid of checkpatch warnings about long lines, especially in mvblx.h
MAINTAINERS | 4 + board/matrix_vision/mvblx/Makefile | 53 +++++ board/matrix_vision/mvblx/config.mk | 33 +++ board/matrix_vision/mvblx/fpga.c | 219 ++++++++++++++++++ board/matrix_vision/mvblx/fpga.h | 32 +++ board/matrix_vision/mvblx/mvblx.c | 169 ++++++++++++++ board/matrix_vision/mvblx/mvblx.h | 362 +++++++++++++++++++++++++++++ board/matrix_vision/mvblx/sys_eeprom.c | 395 ++++++++++++++++++++++++++++++++ boards.cfg | 1 + doc/README.omap3 | 5 + include/configs/omap3_mvblx.h | 313 +++++++++++++++++++++++++ 11 files changed, 1586 insertions(+), 0 deletions(-) create mode 100644 board/matrix_vision/mvblx/Makefile create mode 100644 board/matrix_vision/mvblx/config.mk create mode 100644 board/matrix_vision/mvblx/fpga.c create mode 100644 board/matrix_vision/mvblx/fpga.h create mode 100644 board/matrix_vision/mvblx/mvblx.c create mode 100644 board/matrix_vision/mvblx/mvblx.h create mode 100644 board/matrix_vision/mvblx/sys_eeprom.c create mode 100644 include/configs/omap3_mvblx.h
MAINTAINERS +4 -0
@@ -662,6 +662,10 @@ Grazvydas Ignotas <[email protected]> omap3_pandora ARM ARMV7 (OMAP3xx SoC) +Michael Jones <[email protected]> + + omap3_mvblx ARM ARMV7 (OMAP3xx SoC) + Matthias Kaehlcke <[email protected]> edb9301 ARM920T (EP9301) edb9302 ARM920T (EP9302)
board/matrix_vision/mvblx/Makefile new file +53 -0
53 lines not on this page · raw message
board/matrix_vision/mvblx/config.mk new file +33 -0
@@ -0,0 +1,33 @@ +# +# (C) Copyright 2006 +# Texas Instruments, <www.ti.com> +# +# Beagle Board uses OMAP3 (ARM-CortexA8) cpu +# see http://www.ti.com/ for more information on Texas Instruments +# +# See file CREDITS for list of people who contributed to this +# project. +# +# 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 +# +# Physical Address: +# 8000'0000 (bank0) +# A000/0000 (bank1) +# Linux-Kernel is expected to be at 8000'8000, entry 8000'8000 +# (mem base + reserved) + +# For use with external or internal boots. +CONFIG_SYS_TEXT_BASE = 0x80008000
board/matrix_vision/mvblx/fpga.c new file +219 -0
219 lines not on this page · raw message
board/matrix_vision/mvblx/fpga.h new file +32 -0
@@ -0,0 +1,32 @@ +/* +* (C) Copyright 2002 +* Rich Ireland, Enterasys Networks, rireland at enterasys.com. +* Keith Outwater, [email protected]. +* +* See file CREDITS for list of people who contributed to this +* project. +* +* 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 +* +*/ + +extern int mvblx_init_fpga (void ); + +extern int fpga_status_fn (int cookie); +extern int fpga_config_fn (int assert,int flush,int cookie); +extern int fpga_done_fn (int cookie); +extern int fpga_wr_fn (const void *buf,size_t len,int flush,int cookie); +extern int fpga_null_fn (int cookie);
board/matrix_vision/mvblx/mvblx.c new file +169 -0
169 lines not on this page · raw message
board/matrix_vision/mvblx/mvblx.h new file +362 -0
362 lines not on this page · raw message
board/matrix_vision/mvblx/sys_eeprom.c new file +395 -0
395 lines not on this page · raw message
boards.cfg +1 -0
@@ -175,6 +175,7 @@ am3517_evm arm armv7 am3517evm logicpd dig297 arm armv7 dig297 comelit omap3 omap3_zoom1 arm armv7 zoom1 logicpd omap3 omap3_zoom2 arm armv7 zoom2 logicpd omap3 +omap3_mvblx arm armv7 mvblx matrix_vision omap3 omap3_beagle arm armv7 beagle ti omap3 omap3_evm arm armv7 evm ti omap3 omap3_sdp3430 arm armv7 sdp3430 ti omap3
doc/README.omap3 +5 -0
@@ -68,6 +68,11 @@ make make cm_t35_config make +* BlueLYNX-X: + +make omap3_mvblx_config +make + Custom commands ===============
include/configs/omap3_mvblx.h new file +313 -0
313 lines not on this page · raw message
Signature · 6 lines
1.7.4.1 MATRIX VISION GmbH, Talstrasse 16, DE-71570 Oppenweiler Registergericht: Amtsgericht Stuttgart, HRB 271090 Geschaeftsfuehrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner, Erhard Meier
PATCH v6 1/1 OMAP3: mvblx: Initial support for mvBlueLYNX-X
Add support for the MATRIX VISION mvBlueLYNX-X, an OMAP3-based intelligent camera.
---
Changes for v2:
- None. Resubmitting to include custodian in cc:
Changes for v3:
- Use CONFIG_MACH_TYPE to set gd->bd->bi_arch_number
Changes for v4:
- rebased on top of u-boot-arm master (f0628a67)
Changes for v5:
- Use generic gpio API
- change formatting to get rid of checkpatch warnings about long lines, especially in mvblx.h
Changes for v6:
- re-introduce tab indentation in mux init (mvblx.h) to be consistent with result of discussion for BeagleBoard's mux init, although this creates checkpatch warnings.
checkpatch gives 49 warnings:
- 45 of them are lines over 80 characters in the mux init header. This file used board/ti/beagle/beagle.h as a model, which had the same warnings introduced in commit fc9165fdb3b ("Clean up whitespace in mux configs") after a discussion on the ML [1]
- The other 4 are the following, all of which look Linux-specific and can be ignored:
WARNING: Use #include <linux/gpio.h> instead of <asm/gpio.h>
WARNING: Use #include <linux/io.h> instead of <asm/io.h>
WARNING: consider using kstrto* in preference to simple_strtoul
WARNING: consider using kstrto* in preference to simple_strtoul
[1]http://lists.denx.de/pipermail/u-boot/2009-September/061619.html
MAINTAINERS | 4 + board/matrix_vision/mvblx/Makefile | 53 +++++ board/matrix_vision/mvblx/config.mk | 33 +++ board/matrix_vision/mvblx/fpga.c | 219 ++++++++++++++++++ board/matrix_vision/mvblx/fpga.h | 32 +++ board/matrix_vision/mvblx/mvblx.c | 169 ++++++++++++++ board/matrix_vision/mvblx/mvblx.h | 362 +++++++++++++++++++++++++++++ board/matrix_vision/mvblx/sys_eeprom.c | 395 ++++++++++++++++++++++++++++++++ boards.cfg | 1 + doc/README.omap3 | 5 + include/configs/omap3_mvblx.h | 313 +++++++++++++++++++++++++ 11 files changed, 1586 insertions(+), 0 deletions(-) create mode 100644 board/matrix_vision/mvblx/Makefile create mode 100644 board/matrix_vision/mvblx/config.mk create mode 100644 board/matrix_vision/mvblx/fpga.c create mode 100644 board/matrix_vision/mvblx/fpga.h create mode 100644 board/matrix_vision/mvblx/mvblx.c create mode 100644 board/matrix_vision/mvblx/mvblx.h create mode 100644 board/matrix_vision/mvblx/sys_eeprom.c create mode 100644 include/configs/omap3_mvblx.h
MAINTAINERS +4 -0
@@ -662,6 +662,10 @@ Grazvydas Ignotas <[email protected]> omap3_pandora ARM ARMV7 (OMAP3xx SoC) +Michael Jones <[email protected]> + + omap3_mvblx ARM ARMV7 (OMAP3xx SoC) + Matthias Kaehlcke <[email protected]> edb9301 ARM920T (EP9301) edb9302 ARM920T (EP9302)
board/matrix_vision/mvblx/Makefile new file +53 -0
53 lines not on this page · raw message
board/matrix_vision/mvblx/config.mk new file +33 -0
@@ -0,0 +1,33 @@ +# +# (C) Copyright 2006 +# Texas Instruments, <www.ti.com> +# +# Beagle Board uses OMAP3 (ARM-CortexA8) cpu +# see http://www.ti.com/ for more information on Texas Instruments +# +# See file CREDITS for list of people who contributed to this +# project. +# +# 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 +# +# Physical Address: +# 8000'0000 (bank0) +# A000/0000 (bank1) +# Linux-Kernel is expected to be at 8000'8000, entry 8000'8000 +# (mem base + reserved) + +# For use with external or internal boots. +CONFIG_SYS_TEXT_BASE = 0x80008000
board/matrix_vision/mvblx/fpga.c new file +219 -0
219 lines not on this page · raw message
board/matrix_vision/mvblx/fpga.h new file +32 -0
@@ -0,0 +1,32 @@ +/* +* (C) Copyright 2002 +* Rich Ireland, Enterasys Networks, rireland at enterasys.com. +* Keith Outwater, [email protected]. +* +* See file CREDITS for list of people who contributed to this +* project. +* +* 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 +* +*/ + +extern int mvblx_init_fpga (void ); + +extern int fpga_status_fn (int cookie); +extern int fpga_config_fn (int assert,int flush,int cookie); +extern int fpga_done_fn (int cookie); +extern int fpga_wr_fn (const void *buf,size_t len,int flush,int cookie); +extern int fpga_null_fn (int cookie);
board/matrix_vision/mvblx/mvblx.c new file +169 -0
169 lines not on this page · raw message
board/matrix_vision/mvblx/mvblx.h new file +362 -0
362 lines not on this page · raw message
board/matrix_vision/mvblx/sys_eeprom.c new file +395 -0
395 lines not on this page · raw message
boards.cfg +1 -0
@@ -179,6 +179,7 @@ am3517_evm arm armv7 am3517evm logicpd dig297 arm armv7 dig297 comelit omap3 omap3_zoom1 arm armv7 zoom1 logicpd omap3 omap3_zoom2 arm armv7 zoom2 logicpd omap3 +omap3_mvblx arm armv7 mvblx matrix_vision omap3 omap3_beagle arm armv7 beagle ti omap3 omap3_evm arm armv7 evm ti omap3 omap3_sdp3430 arm armv7 sdp3430 ti omap3
doc/README.omap3 +5 -0
@@ -68,6 +68,11 @@ make make cm_t35_config make +* BlueLYNX-X: + +make omap3_mvblx_config +make + Custom commands ===============
include/configs/omap3_mvblx.h new file +313 -0
313 lines not on this page · raw message
Signature · 6 lines
1.7.4.1 MATRIX VISION GmbH, Talstrasse 16, DE-71570 Oppenweiler Registergericht: Amtsgericht Stuttgart, HRB 271090 Geschaeftsfuehrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner, Erhard Meier
PATCH v5 1/1 OMAP3: mvblx: Initial support for mvBlueLYNX-X
In reply to Michael JonesQuoted 4 lines · Michael Jones
Add support for the MATRIX VISION mvBlueLYNX-X, an OMAP3-based intelligent camera.
Signed-off-by Michael Jones <[email protected]>
Configuring for omap3_mvblx board...
mv_common.c:32:14: warning: 'entries_to_keep' defined but not used
text data bss dec hex filename
225583 4696 215012 445291 6cb6b ./u-boot
Please fix the warning, thanks.
Signature · 1 line
Tom
PATCH v5 1/1 OMAP3: mvblx: Initial support for mvBlueLYNX-X
Hi Tom,
Quoted 5 lines · Tom Rini
Quoted 3 lines · Michael Jones
Add support for the MATRIX VISION mvBlueLYNX-X, an OMAP3-based intelligent camera.
Quoted 9 lines
Quoted 1 line
Signed-off-by Michael Jones<[email protected]>Configuring for
omap3_mvblxboard...
mv_common.c:32:14: warning: 'entries_to_keep' defined but not used
text data bss dec hex filename
225583 4696 215012 445291 6cb6b ./u-bootPlease fix the warning, thanks.
Sorry I overlooked that. I think this fix belongs in its own patch, which I will submit soon.
You replied to v5 of this patch, please note that the latest is v6:
http://patchwork.ozlabs.org/patch/118751/
-Michael
MATRIX VISION GmbH, Talstrasse 16, DE-71570 Oppenweiler
Registergericht: Amtsgericht Stuttgart, HRB 271090
Geschaeftsfuehrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner, Erhard Meier
PATCH 1/1 mv_common.c: get rid of 'defined but not used' warning
In reply to Tom RiniWhen CONFIG_ENV_IS_NOWHERE, got following warning:
mv_common.c:32:14: warning: 'entries_to_keep' defined but not used. Get rid of this warning.
--- board/matrix_vision/common/mv_common.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
board/matrix_vision/common/mv_common.c +1 -1
@@ -29,6 +29,7 @@DECLARE_GLOBAL_DATA_PTR ; +#ifndef CONFIG_ENV_IS_NOWHERE static char * entries_to_keep[] = {"serial#" ,"ethaddr" ,"eth1addr" ,"model_info" ,"sensor_cnt" , "fpgadatasize", "ddr_size", "use_dhcp", "use_static_ipaddr",
@@ -38,7 +39,6 @@ static char* entries_to_keep[] = {#define MV_MAX_ENV_ENTRY_LENGTH 64#define MV_KEEP_ENTRIES ARRAY_SIZE(entries_to_keep) -#ifndef CONFIG_ENV_IS_NOWHERE void mv_reset_environment (void ) {int i;
Signature · 1 line
1.7.4.1
PATCH 1/1 mv_common.c: get rid of 'defined but not used' warning
Am 20.10.2011 13:37, schrieb Michael Jones:
Quoted 5 lines
When
CONFIG_ENV_IS_NOWHERE, got following warning:
mv_common.c:32:14: warning: 'entries_to_keep' defined but not used. Get rid of this warning.Signed-off-by Michael Jones<[email protected]>
Quoted 24 lines
--- board/matrix_vision/common/mv_common.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)board/matrix_vision/common/mv_common.c +1
-1@@ -29,6 +29,7 @@DECLARE_GLOBAL_DATA_PTR ; +#ifndef CONFIG_ENV_IS_NOWHERE static char * entries_to_keep[] = {"serial#" ,"ethaddr" ,"eth1addr" ,"model_info" ,"sensor_cnt" , "fpgadatasize", "ddr_size", "use_dhcp", "use_static_ipaddr",@@ -38,7 +39,6 @@ static char* entries_to_keep[] = {#define MV_MAX_ENV_ENTRY_LENGTH 64#define MV_KEEP_ENTRIES ARRAY_SIZE(entries_to_keep) -#ifndef CONFIG_ENV_IS_NOWHERE void mv_reset_environment (void ) {int i;
PATCH 1/1 mv_common.c: get rid of 'defined but not used' warning
In reply to Michael JonesQuoted 8 lines · On Thu, 20 Oct 2011 13:37:18 +0200 Michael Jones…
When
CONFIG_ENV_IS_NOWHERE, got following warning:
mv_common.c:32:14: warning: 'entries_to_keep' defined but not used. Get rid of this warning.Signed-off-by Michael Jones <[email protected]>--- board/matrix_vision/common/mv_common.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
Applied to u-boot-staging/agust at denx.de. Thanks!
Anatolij