at91: Extended soft_i2c driver for AT91SAM9263 SoC
PATCH 1/1 at91: Extended soft_i2c driver for AT91SAM9263 SoC
While hard_i2c support is not available
(see http://lists.denx.de/pipermail/u-boot/2009-March/049751.html),
this patch enables soft_i2c on AT91SAM9263 SoC.
--- drivers/i2c/soft_i2c.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
drivers/i2c/soft_i2c.c +5 -0
@@ -34,6 +34,11 @@#include <asm/io.h> #include <asm/arch/hardware.h> #endif +#ifdef CONFIG_AT91SAM9263 /* only valid for AT91SAM9263 */ +#include <asm/arch/at91_pmc.h> +#include <asm/arch/gpio.h> +#include <asm/arch/io.h> +#endif #ifdef CONFIG_IXP425 /* only valid for IXP425 */ #include <asm/arch/ixp425.h> #endif
Signature · 1 line
1.6.1
PATCH 1/1 at91: Add support for MEESC board of esd gmbh
This patch is a rebase against branch arm/next and adds support for MEESC board of esd gmbh.
The MEESC is based on an Atmel AT91SAM9263 SoC.
--- MAINTAINERS | 4 + MAKEALL | 1 + Makefile | 3 + board/esd/meesc/Makefile | 54 ++++++++++ board/esd/meesc/config.mk | 1 + board/esd/meesc/meesc.c | 239 +++++++++++++++++++++++++++++++++++++++++++++ include/configs/meesc.h | 191 ++++++++++++++++++++++++++++++++++++ 7 files changed, 493 insertions(+), 0 deletions(-) create mode 100644 board/esd/meesc/Makefile create mode 100644 board/esd/meesc/config.mk create mode 100644 board/esd/meesc/meesc.c create mode 100644 include/configs/meesc.h
MAINTAINERS +4 -0
@@ -529,6 +529,10 @@ Peter Figuli <[email protected]> wepep250 xscale +Daniel Gorsulowski <[email protected]> + + meesc ARM926EJS (AT91SAM9263 SoC) + Marius Gr?ger <[email protected]> impa7 ARM720T (EP7211)
MAKEALL +1 -0
@@ -583,6 +583,7 @@ LIST_at91=" \ cmc_pu2 \ csb637 \ kb9202 \ + meesc \ mp2usb \ m501sk \ pm9263 \
Makefile +3 -0
@@ -2760,6 +2760,9 @@ at91sam9rlek_config : unconfig fi; @$(MKCONFIG) -a at91sam9rlek arm arm926ejs at91sam9rlek atmel at91 +meesc_config : unconfig + @$(MKCONFIG) $(@:_config=) arm arm926ejs meesc esd at91 + pm9263_config : unconfig @$(MKCONFIG) $(@:_config=) arm arm926ejs pm9263 ronetix at91
board/esd/meesc/Makefile new file +54 -0
54 lines not on this page · raw message
board/esd/meesc/config.mk new file +1 -0
@@ -0,0 +1 @@ +TEXT_BASE = 0x21f00000
board/esd/meesc/meesc.c new file +239 -0
239 lines not on this page · raw message
include/configs/meesc.h new file +191 -0
191 lines not on this page · raw message
Signature · 1 line
1.6.1
PATCH 1/1 at91: Add support for MEESC board of esd gmbh
Quoted 11 lines
board/esd/meesc/meesc.c new file +11
-0+ +static void meesc_ethercat_hw_init (void ) +{ +/* Configure SMC EBI1_CS0 for EtherCAT */ +at91_sys_write (AT91_SMC1_SETUP (0 ), +AT91_SMC_NWESETUP_ (0 ) |AT91_SMC_NCS_WRSETUP_ (0 ) | +AT91_SMC_NRDSETUP_ (0 ) |AT91_SMC_NCS_RDSETUP_ (0 )); +at91_sys_write (AT91_SMC1_PULSE (0 ), +AT91_SMC_NWEPULSE_ (4 ) |AT91_SMC_NCS_WRPULSE_ (9 ) | +AT91_SMC_NRDPULSE_ (4 ) |AT91_SMC_NCS_RDPULSE_ (9 )); + at91_sys_write(AT91_SMC1_CYCLE(0),
board/esd/meesc/meesc.c line 133
Quoted 10 lines
board/esd/meesc/meesc.c new file +10
-0+ AT91_SMC_NWECYCLE_(10) | AT91_SMC_NRDCYCLE_(5)); +/* Configure behavior at external wait signal, byte-select mode, 16 bit +data bus width, none data float wait states and TDF optimization */ +at91_sys_write (AT91_SMC1_MODE (0 ), +AT91_SMC_READMODE |AT91_SMC_EXNWMODE_READY | +AT91_SMC_BAT_SELECT |AT91_SMC_DBW_16 |AT91_SMC_TDF_ (0 ) | +AT91_SMC_TDFMODE ); + +/* Configure RDY/BSY */ +at91_set_B_periph (AT91_PIN_PE20 ,0 );/* EBI1_NWAIT */
do you really need this
you do not seems to use it anywhere?
board/esd/meesc/meesc.c line 136
Quoted 3 lines
board/esd/meesc/meesc.c new file +3
-0+} + +#ifdef CONFIG_HAS_DATAFLASH
please keep the file organisation as the other at91sam9
Quoted 60 lines
board/esd/meesc/meesc.c new file +60
-0+AT91S_DATAFLASH_INFO dataflash_info[CONFIG_SYS_MAX_DATAFLASH_BANKS ]; + +struct dataflash_addr cs[CONFIG_SYS_MAX_DATAFLASH_BANKS ] = { + {CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0 ,0 },/* Logical adress, CS */ +}; + +/* define the area offsets */ +dataflash_protect_t area_list[NB_DATAFLASH_AREA ] = { + {0x00000000 ,0x000041FF ,FLAG_PROTECT_SET ,0 ,"Bootstrap" }, + {0x00004200 ,0x000083FF ,FLAG_PROTECT_CLEAR ,0 ,"Environment" }, + {0x00008400 ,0x00041FFF ,FLAG_PROTECT_SET ,0 ,"U-Boot" }, +}; +#endif /* CONFIG_HAS_DATAFLASH */ + +int dram_init (void ) +{ + gd->bd->bi_dram[0 ].start =PHYS_SDRAM ; + gd->bd->bi_dram[0 ].size =get_ram_size ((long *)PHYS_SDRAM , (1 <<27 )); +return 0 ; +} + +int board_eth_init (bd_t *bis) +{ +int rc =0 ; +#ifdef CONFIG_MACB + rc =macb_eth_initialize (0 , (void *)AT91SAM9263_BASE_EMAC ,0x00 ); +#endif +return rc; +} + +int checkboard (void ) +{ +char str[32 ]; +char buf[32 ]; + +puts ("Board: esd CAN-EtherCAT Gateway" ); +if (getenv_r ("serial#" , str,sizeof (str)) >0 ) { +puts (", serial# " ); +puts (str); + } +printf ("\nHardware-revision: 1.%d\n" ,get_hw_rev ()); +printf ("Crystal frequency:\t%8s MHz\n" , +strmhz (buf,get_main_clk_rate ())); +printf ("CPU clock:\t\t%8s MHz\n" , +strmhz (buf,get_cpu_clk_rate ())); +#ifdef CONFIG_SHOW_VERBOSE_CLOCKINFO +printf ("Master clock:\t\t%8s MHz\n" , +strmhz (buf,get_mck_clk_rate ())); +printf ("PLL A clock:\t\t%8s MHz\n" , +strmhz (buf,get_plla_clk_rate ())); +printf ("PLL B Reg.:\t\t0x%08X\n" , +at91_sys_read (AT91_CKGR_PLLBR )); +printf ("PLL B clock:\t\t%8s MHz\n" , +strmhz (buf,get_pllb_clk_rate ())); +#endif +printf ("Mach-type: %lu\n" , gd->bd->bi_arch_number); +return 0 ; +} + +int board_init (void )
board/esd/meesc/meesc.c line 206
Quoted 10 lines
board/esd/meesc/meesc.c new file +10
-0+{ +/* Enable Ctrlc */ +console_init_f (); + +/* Peripheral Clock Enable Register */ +at91_sys_write (AT91_PMC_PCER ,1 <<AT91SAM9263_ID_PIOA | +1 <<AT91SAM9263_ID_PIOB | +1 <<AT91SAM9263_ID_PIOCDE ); + +#ifdef MACH_TYPE_MEESC /* while asm-arm/mach-types.h is not up to date */
you need to send a sync request
board/esd/meesc/meesc.c line 211
Quoted 5 lines
board/esd/meesc/meesc.c new file +5
-0+/* arch number of MEESC-Board */ + gd->bd->bi_arch_number =MACH_TYPE_MEESC ; +#else +/* arch number of AT91SAM9263EK-Board */ + gd->bd->bi_arch_number =MACH_TYPE_AT91SAM9263EK ;
please remove
Quoted 5 lines
board/esd/meesc/meesc.c new file +5
-0+#endif +/* adress of boot parameters */ + gd->bd->bi_boot_params =PHYS_SDRAM +0x100 ; + +at91_serial_hw_init ();
board/esd/meesc/meesc.c line 226
Quoted 10 lines
board/esd/meesc/meesc.c new file +10
-0+#ifdef CONFIG_CMD_NAND +meesc_nand_hw_init (); +#endif +meesc_ethercat_hw_init (); +#ifdef CONFIG_HAS_DATAFLASH +at91_spi0_hw_init (1 <<0 ); +#endif +#ifdef CONFIG_MACB +meesc_macb_hw_init (); +#endif
Best Regards,
J.
PATCH 1/1 at91: Add support for MEESC board of esd gmbh
Quoted 15 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 15 lines
board/esd/meesc/meesc.c new file +15
-0+ +static void meesc_ethercat_hw_init (void ) +{ +/* Configure SMC EBI1_CS0 for EtherCAT */ +at91_sys_write (AT91_SMC1_SETUP (0 ), +AT91_SMC_NWESETUP_ (0 ) |AT91_SMC_NCS_WRSETUP_ (0 ) | +AT91_SMC_NRDSETUP_ (0 ) |AT91_SMC_NCS_RDSETUP_ (0 )); +at91_sys_write (AT91_SMC1_PULSE (0 ), +AT91_SMC_NWEPULSE_ (4 ) |AT91_SMC_NCS_WRPULSE_ (9 ) | +AT91_SMC_NRDPULSE_ (4 ) |AT91_SMC_NCS_RDPULSE_ (9 )); +at91_sys_write (AT91_SMC1_CYCLE (0 ), +AT91_SMC_NWECYCLE_ (10 ) |AT91_SMC_NRDCYCLE_ (5 )); +/* Configure behavior at external wait signal, byte-select mode, 16 bit +data bus width, none data float wait states and TDF optimization */ + at91_sys_write(AT91_SMC1_MODE(0),
Quoted 8 lines
board/esd/meesc/meesc.c line 133
Quoted 6 lines
board/esd/meesc/meesc.c new file +6
-0+AT91_SMC_READMODE |AT91_SMC_EXNWMODE_READY | +AT91_SMC_BAT_SELECT |AT91_SMC_DBW_16 |AT91_SMC_TDF_ (0 ) | + AT91_SMC_TDFMODE); + +/* Configure RDY/BSY */ +at91_set_B_periph (AT91_PIN_PE20 ,0 );/* EBI1_NWAIT */ do you really need this
you do not seems to use it anywhere?
Yes, I really need this for debugging the ET1100 and for accessing its process memory by md/mw/mm.
Quoted 4 lines
board/esd/meesc/meesc.c line 136
Quoted 3 lines
board/esd/meesc/meesc.c new file +3
-0+} + +#ifdef CONFIG_HAS_DATAFLASH please keep the file organisation as the other at91sam9
Ok.
Quoted 63 lines
Quoted 63 lines
board/esd/meesc/meesc.c new file +63
-0+AT91S_DATAFLASH_INFO dataflash_info[CONFIG_SYS_MAX_DATAFLASH_BANKS ]; + +struct dataflash_addr cs[CONFIG_SYS_MAX_DATAFLASH_BANKS ] = { + {CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0 ,0 },/* Logical adress, CS */ +}; + +/* define the area offsets */ +dataflash_protect_t area_list[NB_DATAFLASH_AREA ] = { + {0x00000000 ,0x000041FF ,FLAG_PROTECT_SET ,0 ,"Bootstrap" }, + {0x00004200 ,0x000083FF ,FLAG_PROTECT_CLEAR ,0 ,"Environment" }, + {0x00008400 ,0x00041FFF ,FLAG_PROTECT_SET ,0 ,"U-Boot" }, +}; +#endif /* CONFIG_HAS_DATAFLASH */ + +int dram_init (void ) +{ + gd->bd->bi_dram[0 ].start =PHYS_SDRAM ; + gd->bd->bi_dram[0 ].size =get_ram_size ((long *)PHYS_SDRAM , (1 <<27 )); +return 0 ; +} + +int board_eth_init (bd_t *bis) +{ +int rc =0 ; +#ifdef CONFIG_MACB + rc =macb_eth_initialize (0 , (void *)AT91SAM9263_BASE_EMAC ,0x00 ); +#endif +return rc; +} + +int checkboard (void ) +{ +char str[32 ]; +char buf[32 ]; + +puts ("Board: esd CAN-EtherCAT Gateway" ); +if (getenv_r ("serial#" , str,sizeof (str)) >0 ) { +puts (", serial# " ); +puts (str); + } +printf ("\nHardware-revision: 1.%d\n" ,get_hw_rev ()); +printf ("Crystal frequency:\t%8s MHz\n" , +strmhz (buf,get_main_clk_rate ())); +printf ("CPU clock:\t\t%8s MHz\n" , +strmhz (buf,get_cpu_clk_rate ())); +#ifdef CONFIG_SHOW_VERBOSE_CLOCKINFO +printf ("Master clock:\t\t%8s MHz\n" , +strmhz (buf,get_mck_clk_rate ())); +printf ("PLL A clock:\t\t%8s MHz\n" , +strmhz (buf,get_plla_clk_rate ())); +printf ("PLL B Reg.:\t\t0x%08X\n" , +at91_sys_read (AT91_CKGR_PLLBR )); +printf ("PLL B clock:\t\t%8s MHz\n" , +strmhz (buf,get_pllb_clk_rate ())); +#endif +printf ("Mach-type: %lu\n" , gd->bd->bi_arch_number); +return 0 ; +} + +int board_init (void ) +{ +/* Enable Ctrlc */ +console_init_f ();
Quoted 8 lines
board/esd/meesc/meesc.c line 206
Quoted 7 lines
board/esd/meesc/meesc.c new file +7
-0+ +/* Peripheral Clock Enable Register */ +at91_sys_write (AT91_PMC_PCER ,1 <<AT91SAM9263_ID_PIOA | +1 <<AT91SAM9263_ID_PIOB | +1 <<AT91SAM9263_ID_PIOCDE ); + +#ifdef MACH_TYPE_MEESC /* while asm-arm/mach-types.h is not up to date */ you need to send a sync request
As I recognized, you sync against latest kernel source? The problem is, the mach-types in kernel source is not up to date:
# Last update: Mon Mar 23 20:09:01 2009
There has been several sync requests since my commit on Tue, 7 Apr 2009 11:19:31 GMT (see http://www.arm.linux.org.uk/developer/machines/list.php?id=2165), but my board is not included in kernel source yet. So, imho a sync request makes no sense. Unless you sync against http://www.arm.linux.org.uk/developer/machines/download.php
Is this sufficient for a sync request, or should i send a request in a separate mail?
Quoted 6 lines
board/esd/meesc/meesc.c line 211
Quoted 5 lines
board/esd/meesc/meesc.c new file +5
-0+/* arch number of MEESC-Board */ + gd->bd->bi_arch_number =MACH_TYPE_MEESC ; +#else +/* arch number of AT91SAM9263EK-Board */ + gd->bd->bi_arch_number =MACH_TYPE_AT91SAM9263EK ;please remove
I'll remove this by a separate patch, if asm-arm/mach-types.h is up to date, ok?
Quoted 9 lines
Quoted 9 lines
board/esd/meesc/meesc.c new file +9
-0+#endif +/* adress of boot parameters */ + gd->bd->bi_boot_params =PHYS_SDRAM +0x100 ; + +at91_serial_hw_init (); +#ifdef CONFIG_CMD_NAND +meesc_nand_hw_init (); +#endif +meesc_ethercat_hw_init ();
Quoted 9 lines
board/esd/meesc/meesc.c line 226
Quoted 6 lines
board/esd/meesc/meesc.c new file +6
-0+#ifdef CONFIG_HAS_DATAFLASH +at91_spi0_hw_init (1 <<0 ); +#endif +#ifdef CONFIG_MACB +meesc_macb_hw_init (); +#endif Best Regards,
J.
I'll send a cleared up patch for this board soon.
Best regards,
Daniel Gorsulowski
PATCH 1/1 at91: Add support for MEESC board of esd gmbh
Quoted 24 lines · Daniel Gorsulowski
Quoted 15 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 15 lines
board/esd/meesc/meesc.c new file +15
-0+ +static void meesc_ethercat_hw_init (void ) +{ +/* Configure SMC EBI1_CS0 for EtherCAT */ +at91_sys_write (AT91_SMC1_SETUP (0 ), +AT91_SMC_NWESETUP_ (0 ) |AT91_SMC_NCS_WRSETUP_ (0 ) | +AT91_SMC_NRDSETUP_ (0 ) |AT91_SMC_NCS_RDSETUP_ (0 )); +at91_sys_write (AT91_SMC1_PULSE (0 ), +AT91_SMC_NWEPULSE_ (4 ) |AT91_SMC_NCS_WRPULSE_ (9 ) | +AT91_SMC_NRDPULSE_ (4 ) |AT91_SMC_NCS_RDPULSE_ (9 )); +at91_sys_write (AT91_SMC1_CYCLE (0 ), +AT91_SMC_NWECYCLE_ (10 ) |AT91_SMC_NRDCYCLE_ (5 )); +/* Configure behavior at external wait signal, byte-select mode, 16 bit +data bus width, none data float wait states and TDF optimization */ + at91_sys_write(AT91_SMC1_MODE(0),Quoted 8 lines
board/esd/meesc/meesc.c line 133
Quoted 6 lines
board/esd/meesc/meesc.c new file +6
-0+AT91_SMC_READMODE |AT91_SMC_EXNWMODE_READY | +AT91_SMC_BAT_SELECT |AT91_SMC_DBW_16 |AT91_SMC_TDF_ (0 ) | + AT91_SMC_TDFMODE); + +/* Configure RDY/BSY */ +at91_set_B_periph (AT91_PIN_PE20 ,0 );/* EBI1_NWAIT */ do you really need this
you do not seems to use it anywhere?
Quoted 2 lines
Yes, I really need this for debugging the ET1100 and for accessing its process memory by md/mw/mm.
ok maybe a note in a README will be nice
Quoted 5 lines
Quoted 5 lines
board/esd/meesc/meesc.c line 206
Quoted 4 lines
board/esd/meesc/meesc.c new file +4
-0+} + +#ifdef CONFIG_HAS_DATAFLASH +#ifdef MACH_TYPE_MEESC /* while asm-arm/mach-types.h is not up to date */ you need to send a sync request
Quoted 7 lines
As I recognized, you sync against latest kernel source? The problem is, the mach-types in kernel source is not up to date:
# Last update: Mon Mar 23 20:09:01 2009There has been several sync requests since my commit on Tue, 7 Apr 2009 11:19:31 GMT (see http://www.arm.linux.org.uk/developer/machines/list.php?id=2165), but my board is not included in kernel source yet. So, imho a sync request makes no sense. Unless you sync against http://www.arm.linux.org.uk/developer/machines/download.php
Yes If need I'll sync against the last DB
Just add a note in the --- section of your patch to remind me that your board need it I'll do it just before applied it
Best Regards,
J.
PATCH 1/1 at91: Add support for MEESC board of esd gmbh
Dear Jean-Christophe PLAGNIOL-VILLARD,
Quoted 8 lines · In message <[email protected]> you wrote:
Quoted 7 lines
Quoted 5 lines
Review
Quoted 3 lines
(quoted diff) +2
-0+ /* Configure RDY/BSY */ + at91_set_B_periph(AT91_PIN_PE20, 0); /* EBI1_NWAIT */do you really need this
you do not seems to use it anywhere?Yes, I really need this for debugging the ET1100 and for accessing its process memory by md/mw/mm.
ok maybe a note in a README will be nice
Or rather a comment in the source code, which is where a developer will look for such information (who reads READMES?)
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 Genitiv ins Wasser, weil's Dativ ist!
PATCH 1/1 at91: Add support for MEESC board of esd gmbh
In reply to Jean-Christophe PLAGNIOL-VILLARDQuoted 16 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 15 lines · Daniel Gorsulowski
Quoted 14 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 14 lines
board/esd/meesc/meesc.c new file +14
-0+ +static void meesc_ethercat_hw_init (void ) +{ +/* Configure SMC EBI1_CS0 for EtherCAT */ +at91_sys_write (AT91_SMC1_SETUP (0 ), +AT91_SMC_NWESETUP_ (0 ) |AT91_SMC_NCS_WRSETUP_ (0 ) | +AT91_SMC_NRDSETUP_ (0 ) |AT91_SMC_NCS_RDSETUP_ (0 )); +at91_sys_write (AT91_SMC1_PULSE (0 ), +AT91_SMC_NWEPULSE_ (4 ) |AT91_SMC_NCS_WRPULSE_ (9 ) | +AT91_SMC_NRDPULSE_ (4 ) |AT91_SMC_NCS_RDPULSE_ (9 )); +at91_sys_write (AT91_SMC1_CYCLE (0 ), +AT91_SMC_NWECYCLE_ (10 ) |AT91_SMC_NRDCYCLE_ (5 )); +/* Configure behavior at external wait signal, byte-select mode, 16 bit +data bus width, none data float wait states and TDF optimization */
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
board/esd/meesc/meesc.c line 133
Quoted 7 lines
board/esd/meesc/meesc.c new file +7
-0+at91_sys_write (AT91_SMC1_MODE (0 ), +AT91_SMC_READMODE |AT91_SMC_EXNWMODE_READY | +AT91_SMC_BAT_SELECT |AT91_SMC_DBW_16 |AT91_SMC_TDF_ (0 ) | +AT91_SMC_TDFMODE ); + +/* Configure RDY/BSY */ +at91_set_B_periph (AT91_PIN_PE20 ,0 );/* EBI1_NWAIT */ do you really need this
Yes.
Quoted 1 line
Quoted 1 line
Quoted 1 line
you do not seems to use it anywhere?
Right, at least not in U-Boot. All hardware specific initialisation is done in this board specific code. So our OS can access the peripheral without knowing anything about a "SMC", "EBI1" and so on. On some of our boards we use a couple of different OS - not only Linux - especially in this case on MEESC. And it's a lot of work to add low level hardware setup in every OS' BSP. That's why U-Boot's board specific code is a good place for this.
Quoted 3 lines
Quoted 2 lines
Yes, I really need this for debugging the ET1100 and for accessing its process memory by md/mw/mm.
ok maybe a note in a README will be nice
What kind of README do you think of? The comments are totally clear and of course the best place for this kind of documentation. There is no need to add this stuff to any other board.
I think there are other things that need to be discussed. Let's say a hyper generic way to control LEDs :-)
Matthias
PATCH 1/1 at91: Add support for MEESC board of esd gmbh
Quoted 33 lines · Matthias Fuchs
Quoted 16 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 15 lines · Daniel Gorsulowski
Quoted 14 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 14 lines
board/esd/meesc/meesc.c new file +14
-0+ +static void meesc_ethercat_hw_init (void ) +{ +/* Configure SMC EBI1_CS0 for EtherCAT */ +at91_sys_write (AT91_SMC1_SETUP (0 ), +AT91_SMC_NWESETUP_ (0 ) |AT91_SMC_NCS_WRSETUP_ (0 ) | +AT91_SMC_NRDSETUP_ (0 ) |AT91_SMC_NCS_RDSETUP_ (0 )); +at91_sys_write (AT91_SMC1_PULSE (0 ), +AT91_SMC_NWEPULSE_ (4 ) |AT91_SMC_NCS_WRPULSE_ (9 ) | +AT91_SMC_NRDPULSE_ (4 ) |AT91_SMC_NCS_RDPULSE_ (9 )); +at91_sys_write (AT91_SMC1_CYCLE (0 ), +AT91_SMC_NWECYCLE_ (10 ) |AT91_SMC_NRDCYCLE_ (5 )); +/* Configure behavior at external wait signal, byte-select mode, 16 bit +data bus width, none data float wait states and TDF optimization */ Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
board/esd/meesc/meesc.c line 133
Quoted 7 lines
board/esd/meesc/meesc.c new file +7
-0+at91_sys_write (AT91_SMC1_MODE (0 ), +AT91_SMC_READMODE |AT91_SMC_EXNWMODE_READY | +AT91_SMC_BAT_SELECT |AT91_SMC_DBW_16 |AT91_SMC_TDF_ (0 ) | +AT91_SMC_TDFMODE ); + +/* Configure RDY/BSY */ +at91_set_B_periph (AT91_PIN_PE20 ,0 );/* EBI1_NWAIT */ do you really need this
Yes.
Quoted 1 line
Quoted 1 line
Quoted 1 line
you do not seems to use it anywhere?
Right, at least not in U-Boot. All hardware specific initialisation is done in this board specific code. So our OS can access the peripheral without knowing anything about a "SMC", "EBI1" and so on. On some of our boards we use a couple of different OS - not only Linux - especially in this case on MEESC. And it's a lot of work to add low level hardware setup in every OS' BSP. That's why U-Boot's board specific code is a good place for this.
Quoted 6 lines
Quoted 3 lines
Quoted 2 lines
Yes, I really need this for debugging the ET1100 and for accessing its process memory by md/mw/mm.
ok maybe a note in a README will be nice
What kind of README do you think of? The comments are totally clear and of course the best place for this kind of documentation. There is no need to add this stuff to any other board.
README.meesc where you could explain how to test it etc...
Quoted 3 lines
I think there are other things that need to be discussed. Let's say a hyper generic way to control LEDs :-)
yes but it will be a separate thread
I'll prefer to have your boards ready first and the led after evenif your board want to use it with an incremental patch as the merge window will arrive soon
Best Regards,
J.
PATCH 1/1 at91: Add support for MEESC board of esd gmbh
Dear Jean-Christophe PLAGNIOL-VILLARD,
Quoted 6 lines · In message <[email protected]> you wrote:
Quoted 5 lines
Quoted 2 lines
ok maybe a note in a README will be nice
What kind of README do you think of? The comments are totally clear and of course the best place for this kind of documentation. There is no need to add this stuff to any other board.
README.meesc where you could explain how to test it etc...
It makes no sense to flood the doc/ directory with tons of board specific README files that only explain such implementation details. This information belongs into the source code, nowhere else.
Matthias, please add it as a comment.
Jean-Christophe, please accept it as comment, without the need for yet another README file.
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 "The POP3 server service depends on the SMTP server service, which failed to start because of the following error: The operation comple- ted successfully." -- Windows NT Server v3.51
PATCH 1/1 at91: Extended soft_i2c driver for AT91SAM9263 SoC
In reply to Daniel GorsulowskiQuoted 6 lines · Daniel Gorsulowski
While
hard_i2csupport is not available
(see http://lists.denx.de/pipermail/u-boot/2009-March/049751.html),
this patch enablessoft_i2con AT91SAM9263 SoC.Signed-off-by Daniel Gorsulowski <[email protected]>---
where do you use it?
Best Regards,
J.
PATCH 1/1 at91: Extended soft_i2c driver for AT91SAM9263 SoC
Dear Jean-Christophe,
Quoted 11 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 6 lines · Daniel Gorsulowski
While
hard_i2csupport is not available
(see http://lists.denx.de/pipermail/u-boot/2009-March/049751.html),
this patch enablessoft_i2con AT91SAM9263 SoC.Signed-off-by Daniel Gorsulowski <[email protected]>---
where do you use it?
Best Regards,
J.
I'll use I2C on an other AT91SAM9263 based board, called "OTC570". The patch is not ready yet (first working on MEESC implementation), but it will come soon.
Best regards,
Daniel Gorsulowski
PATCH 1/1 at91: Extended soft_i2c driver for AT91SAM9263 SoC
In reply to Daniel GorsulowskiDear Heiko,
Quoted 16 lines · In message <[email protected]> Daniel…
While
hard_i2csupport is not available
(see http://lists.denx.de/pipermail/u-boot/2009-March/049751.html),
this patch enablessoft_i2con AT91SAM9263 SoC.Signed-off-by Daniel Gorsulowski <[email protected]>--- drivers/i2c/soft_i2c.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)drivers/i2c/soft_i2c.c +0
-0@@ -34,6 +34,11 @@#include <asm/io.h>
drivers/i2c/soft_i2c.c line 44
Quoted 10 lines
drivers/i2c/soft_i2c.c +5
-0#include <asm/arch/hardware.h> #endif +#ifdef CONFIG_AT91SAM9263 /* only valid for AT91SAM9263 */ +#include <asm/arch/at91_pmc.h> +#include <asm/arch/gpio.h> +#include <asm/arch/io.h> +#endif #ifdef CONFIG_IXP425 /* only valid for IXP425 */ #include <asm/arch/ixp425.h> #endif
Is there a specific reason this was not applied yet?
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 would be illogical to kill without reason -- Spock, "Journey to Babel", stardate 3842.4
PATCH 1/1 at91: Extended soft_i2c driver for AT91SAM9263 SoC
Hello Wolfgang,
Quoted 21 lines · Wolfgang Denk
Quoted 20 lines · In message <[email protected]> Daniel…
While
hard_i2csupport is not available
(see http://lists.denx.de/pipermail/u-boot/2009-March/049751.html),
this patch enablessoft_i2con AT91SAM9263 SoC.Signed-off-by Daniel Gorsulowski <[email protected]>--- drivers/i2c/soft_i2c.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)drivers/i2c/soft_i2c.c +3
-0@@ -34,6 +34,11 @@#include <asm/io.h> #include <asm/arch/hardware.h> #endif +#ifdef CONFIG_AT91SAM9263 /* only valid for AT91SAM9263 */ +#include <asm/arch/at91_pmc.h> +#include <asm/arch/gpio.h>
Quoted 8 lines
drivers/i2c/soft_i2c.c line 44
Quoted 6 lines
drivers/i2c/soft_i2c.c +2
-0+#include <asm/arch/io.h> +#endif #ifdef CONFIG_IXP425 /* only valid for IXP425 */ #include <asm/arch/ixp425.h> #endif Is there a specific reason this was not applied yet?
No, just seems I missed it :-(
I apply it ASAP to i2c-next.
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 1/1 at91: Extended soft_i2c driver for AT91SAM9263 SoC
In reply to Wolfgang DenkHello Wolfgang,
Quoted 21 lines · Wolfgang Denk
Quoted 20 lines · In message <[email protected]> Daniel…
While
hard_i2csupport is not available
(see http://lists.denx.de/pipermail/u-boot/2009-March/049751.html),
this patch enablessoft_i2con AT91SAM9263 SoC.Signed-off-by Daniel Gorsulowski <[email protected]>--- drivers/i2c/soft_i2c.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)drivers/i2c/soft_i2c.c +3
-0@@ -34,6 +34,11 @@#include <asm/io.h> #include <asm/arch/hardware.h> #endif +#ifdef CONFIG_AT91SAM9263 /* only valid for AT91SAM9263 */ +#include <asm/arch/at91_pmc.h> +#include <asm/arch/gpio.h>
Quoted 8 lines
drivers/i2c/soft_i2c.c line 44
Quoted 6 lines
drivers/i2c/soft_i2c.c +2
-0+#include <asm/arch/io.h> +#endif #ifdef CONFIG_IXP425 /* only valid for IXP425 */ #include <asm/arch/ixp425.h> #endif Is there a specific reason this was not applied yet?
Applied to u-boot-i2c next
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