[U-Boot] Pull request: u-boot-usb

2009-12-20 Thread Remy Bohmer
The following changes since commit
bb3bcfa2426cc6a0aecec7270e3ee67ca843a125:
  Wolfgang Denk (1):
Merge branch 'next' of ../next

are available in the git repository at:

  git://git.denx.de/u-boot-usb.git master

Ajay Kumar Gupta (1):
  omap3evm: musb: add USB config

Mahavir Jain (1):
  usb: write command for RAW partition.

Tom Rix (9):
  USB Consolidate descriptor definitions
  USB add macros for debugging usb device setup.
  TWL4030 Add usb PHY support
  OMAP3 Add usb device support
  OMAP3 zoom1 Add usbtty configuration
  OMAP3 beagle Add usbtty configuration
  USBTTY make some function declarations easier to use.
  OMAP3 zoom2 Use usbtty if the debug board is not connected.
  OMAP3 USB Initialize twl4030 only if required

 Makefile   |1 +
 board/logicpd/zoom2/zoom2_serial.c |   12 +-
 common/cmd_usb.c   |   44 ++-
 common/usb.c   |   35 +-
 common/usb_kbd.c   |   22 +-
 common/usb_storage.c   |  115 -
 cpu/ppc4xx/usbdev.c|4 +-
 drivers/serial/usbtty.h|2 +
 drivers/usb/host/ehci-hcd.c|2 +-
 drivers/usb/musb/Makefile  |2 +
 drivers/usb/musb/musb_core.c   |8 +-
 drivers/usb/musb/musb_core.h   |   40 ++
 drivers/usb/musb/musb_debug.h  |  205 
 drivers/usb/musb/musb_hcd.c|2 +-
 drivers/usb/musb/musb_udc.c|  963 
 drivers/usb/musb/omap3.c   |  134 +
 drivers/usb/musb/omap3.h   |   48 ++
 drivers/usb/phy/Makefile   |   44 ++
 drivers/usb/phy/twl4030.c  |  189 +++
 include/configs/omap3_beagle.h |   16 +
 include/configs/omap3_evm.h|   39 ++
 include/configs/omap3_zoom1.h  |   16 +
 include/configs/omap3_zoom2.h  |   17 +
 include/serial.h   |   18 +
 include/twl4030.h  |  143 +-
 include/usb.h  |   73 +---
 include/usb/musb_udc.h |   54 ++
 include/usbdescriptors.h   |   26 +
 include/usbdevice.h|  103 
 29 files changed, 2245 insertions(+), 132 deletions(-)
 create mode 100644 drivers/usb/musb/musb_debug.h
 create mode 100644 drivers/usb/musb/musb_udc.c
 create mode 100644 drivers/usb/musb/omap3.c
 create mode 100644 drivers/usb/musb/omap3.h
 create mode 100644 drivers/usb/phy/Makefile
 create mode 100644 drivers/usb/phy/twl4030.c
 create mode 100644 include/usb/musb_udc.h
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] Crash nand init UPMA - NAND flash MPC832x

2009-12-20 Thread nanda
Our development needs NAND to be implemented from u-boot level. And our booting 
from FLASH depends of NOR flash using the GPCM.

We are facing in the initialization of the nand_init, a crash in the dummy 
write during the UPM program based on the UPM mode of freescale MPC8323 in the 
code below:

void UPMA_prog()
{
int i=0;
// OP set to write to RAM array command
*(int *)(MAMR) = 0x1000;
// Write word to RAM arrays
for (i=0;i___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Crash nand init UPMA - NAND flash MPC832x

2009-12-20 Thread Wolfgang Denk
Dear nanda,

In message 20091220172434.48360.qm...@f5mail-237-207.rediffmail.com you wrote:
 
 Our development needs NAND to be implemented from u-boot level. And our 
 booting from FLASH depends of NOR flash using the GPCM.
 
 We are facing in the initialization of the nand_init, a crash in the dummy 
 write during the UPM program based on the UPM mode of freescale MPC8323 in 
 the code below:
 
 void UPMA_prog()
 {
 int i=0;
 // OP set to write to RAM array command
 *(int *)(MAMR) = 0x1000;
 // Write word to RAM arrays
 for (i=0;i

There is no such code in mainline U-Boot. I recommend you look for
existing (and working) code examples when porting U-Boot to your
hardware. Note that you should use I/O accessor functions instead of
plain register writes.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Digital computers are themselves more complex than most things people
build: They have very large numbers of states. This makes conceiving,
describing, and testing them hard. Software systems  have  orders-of-
magnitude more states than computers do.   - Fred Brooks, Jr.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] Remove board specific code from ENC28J60 network driver?

2009-12-20 Thread Dirk Behme

For TI OMAP3 Beagle based Zippy expansion board from TinCanTools [1] 
I'm currently looking into reusing spi based ENC28J60 network driver

drivers/net/enc28j60.c

It seems to me that it uses LPC2292 specific macros

IO1CLR, IO1SET and IO1DIR

These macros are defined in

asm-arm/arch-lpc2292/lpc2292_registers.h

 From enc28j60.c:

...
#define enc_enable() PUT32(IO1CLR, ENC_SPI_SLAVE_CS)
#define enc_disable() PUT32(IO1SET, ENC_SPI_SLAVE_CS)
...

...
/* configure GPIO */
(*((volatile unsigned long *) IO1DIR)) |= ENC_SPI_SLAVE_CS;
(*((volatile unsigned long *) IO1DIR)) |= ENC_RESET;

/* CS and RESET active low */
PUT32 (IO1SET, ENC_SPI_SLAVE_CS);
PUT32 (IO1SET, ENC_RESET);
...

Anybody with an idea how to move this code to some (LPC2292?) board 
specific files to make enc28j60.c more generic to be able to reuse it 
on other boards?

Best regards

Dirk

[1] 
http://www.tincantools.com/product.php?productid=16147cat=0page=1featured
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Remove board specific code from ENC28J60 network driver?

2009-12-20 Thread Ben Warren
Dirk,

On Sun, Dec 20, 2009 at 11:30 AM, Dirk Behme dirk.be...@googlemail.comwrote:


 For TI OMAP3 Beagle based Zippy expansion board from TinCanTools [1]
 I'm currently looking into reusing spi based ENC28J60 network driver

 drivers/net/enc28j60.c

 It seems to me that it uses LPC2292 specific macros

 IO1CLR, IO1SET and IO1DIR

 These macros are defined in

 asm-arm/arch-lpc2292/lpc2292_registers.h

  From enc28j60.c:

 ...
 #define enc_enable() PUT32(IO1CLR, ENC_SPI_SLAVE_CS)
 #define enc_disable() PUT32(IO1SET, ENC_SPI_SLAVE_CS)
 ...

 ...
 /* configure GPIO */
 (*((volatile unsigned long *) IO1DIR)) |= ENC_SPI_SLAVE_CS;
 (*((volatile unsigned long *) IO1DIR)) |= ENC_RESET;

 /* CS and RESET active low */
 PUT32 (IO1SET, ENC_SPI_SLAVE_CS);
 PUT32 (IO1SET, ENC_RESET);
 ...

 Anybody with an idea how to move this code to some (LPC2292?) board
 specific files to make enc28j60.c more generic to be able to reuse it
 on other boards?

 From my brief glimpse I would think these should be changed to use the SPI
framework.  Then board code is only concerned with configuring SPI properly.


 Best regards

 Dirk

 regards,
Ben
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Remove board specific code from ENC28J60 network driver?

2009-12-20 Thread Mike Frysinger
On Sunday 20 December 2009 14:30:35 Dirk Behme wrote:
 For TI OMAP3 Beagle based Zippy expansion board from TinCanTools [1]
 I'm currently looking into reusing spi based ENC28J60 network driver
 
 drivers/net/enc28j60.c
 
 It seems to me that it uses LPC2292 specific macros
 
 IO1CLR, IO1SET and IO1DIR
 
 These macros are defined in
 
 asm-arm/arch-lpc2292/lpc2292_registers.h

this is why we didnt bother trying to get this part working on Blackfin boards 
under u-boot.  it works fine for us under Linux, but the u-boot driver is a 
joke.

  From enc28j60.c:
 
 ...
 #define enc_enable() PUT32(IO1CLR, ENC_SPI_SLAVE_CS)
 #define enc_disable() PUT32(IO1SET, ENC_SPI_SLAVE_CS)
 ...
 
 ...
 /* configure GPIO */
 (*((volatile unsigned long *) IO1DIR)) |= ENC_SPI_SLAVE_CS;
 (*((volatile unsigned long *) IO1DIR)) |= ENC_RESET;
 
 /* CS and RESET active low */
 PUT32 (IO1SET, ENC_SPI_SLAVE_CS);
 PUT32 (IO1SET, ENC_RESET);
 ...
 
 Anybody with an idea how to move this code to some (LPC2292?) board
 specific files to make enc28j60.c more generic to be able to reuse it
 on other boards?

unless the maintainers of the LPC2292 board are willing to help, i'd say just 
avoid the issue:
 - rename/move this driver to indicate it is specific to LPC2292
 - create a new driver based on the old one using the common SPI framework

once it starts using the common SPI framework, i should be able to easily help 
with testing on Blackfin boards.  we have a little addon card that lets us 
hook it up to a bunch of different boards.
-mike


signature.asc
Description: This is a digitally signed message part.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH][RESEND]: Fix for U-Boot build failure with CONFIG_SYS_NO_FLASH defined for qemu-mips.

2009-12-20 Thread Shinya Kuribayashi
Himanshu Chauhan wrote:
 May be I really want that CONFIG_SYS_NO_FLASH defined then build should at 
 least not break. Isn't it?

Correct, it should build even with CONFIG_SYS_NO_FLASH.

 diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
 index efd6aec..5bd3af0 100644
 --- a/common/cmd_bootm.c
 +++ b/common/cmd_bootm.c
 @@ -76,7 +76,7 @@ extern void bz_internal_error(int);
   static int image_info (unsigned long addr);
   #endif

 -#if defined(CONFIG_CMD_IMLS)
 +#if !defined(CONFIG_SYS_NO_FLASH)  defined(CONFIG_CMD_IMLS)
   #includeflash.h
   extern flash_info_t flash_info[]; /* info for FLASH chips */
   static int do_imls (cmd_tbl_t *cmdtp, int flag, int argc, char
 *argv[]);
 @@ -1153,7 +1153,7 @@ U_BOOT_CMD(
   /***/
   /* imls - list all images found in flash */
   /***/
 -#if defined(CONFIG_CMD_IMLS)
 +#if !defined(CONFIG_SYS_NO_FLASH)  defined(CONFIG_CMD_IMLS)
   int do_imls (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
   {
   flash_info_t *info;
 Disabling IMLS command in configs/qemu_mips.h?
 This should have been disabled anyways if this patch was applied:
 http://www.mail-archive.com/u-boot@lists.denx.de/msg07407.html

The patch is applied.

|diff --git a/include/configs/qemu-mips.h b/include/configs/qemu-mips.h
|index cbacdf9..49a1a1c 100644
|--- a/include/configs/qemu-mips.h
|+++ b/include/configs/qemu-mips.h
|:q
|@@ -142,6 +142,7 @@
| #define CONFIG_SYS_INIT_SP_OFFSET 0x40
|
| /* We boot from this flash, selected with dip switch */
|+#define CONFIG_SYS_NO_FLASH
| #define CONFIG_SYS_FLASH_BASE 0xbfc0
| #define CONFIG_SYS_MAX_FLASH_BANKS1
| #define CONFIG_SYS_MAX_FLASH_SECT 128

FWIW, how about putting CONFIG_SYS_NO_FLASH prior to config_cmd_
default.h?

 diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c
 index 24eb33f..06c7271 100644
 --- a/drivers/mtd/cfi_flash.c
 +++ b/drivers/mtd/cfi_flash.c
 @@ -41,6 +41,7 @@
   #includeenvironment.h
   #includemtd/cfi_flash.h

 +#ifndef CONFIG_SYS_NO_FLASH
   /*
* This file implements a Common Flash Interface (CFI) driver for
* U-Boot.
 @@ -2020,3 +2021,5 @@ unsigned long flash_init (void)

   return (size);
   }
 +
 +#endif
 Removing CONFIG_CFI_DRIVER from configs/qemu_mips.h?
 If CONFIG_SYS_NO_FLASH is defined should it be compiled?

No.  In U-Boot, in general, drivers should be predefined through
configs/boardname.h.  If we don't use CFI driver, just disable
it in top-level board config file.  This is to avoid #ifdef mess,
and prevent the drivers from being clobbered.

-- 
Shinya Kuribayashi
NEC Electronics
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] UBoot porting to cortex-m3 based SoC

2009-12-20 Thread Shawn Jin
Before starting the project I'd like to have some advices from the community
about the feasibility of porting U-Boot/ucLinux to a cortex-m3 based SoC
with limited resources (up to 512K flash, up to 64K SRAM). I limit my
questions to U-Boot only and will post similar ones to ucLinux mailing-list.
But it will be certainly appreciated if you can also share your experience
and thoughts on ucLinux.

1. How much is supported in terms of Cortex-M3 in U-Boot?

2. Is it possible to port u-boot (including ucLinux) to a SoC with such
limited resources? What's the minimum footprint of U-Boot across all the
processors/architectures it supports?

3. What's the best toolchain to compile U-Boot for Cortex-M3?

Thanks a lot,
-Shawn.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Crash nand init UPMA - NAND flash MPC832x

2009-12-20 Thread KoteswarK

Hi
What are those I/O accessor functions? API present in
./drivers/mtd/nand/fsl_upm.c file??? I am also getting crash while doing
dummy write to NAND_BASE. Code is follows
void UPMA_prog()
{
int i=0;
/* OP set to write to RAM array command*/
*(int *)(MAMR) = 0x1000;
/* Write word to RAM arrays*/
for (i=0;i32;i++)
{
*(int *)(MDR) = UPMATable[i];

udelay (100);
/* *(int *)(MAMR) = 0x1000;
 *
 * *(int *)(MAMR) = 0x1000+i;*/

/*dummy write*/
*(char *)(CFG_NAND_BASE) = 0xff;
}
.
}
Rgds
Koteswar

wd wrote:
 
 Dear nanda,
 
 In message 20091220172434.48360.qm...@f5mail-237-207.rediffmail.com you
 wrote:
 
 Our development needs NAND to be implemented from u-boot level. And our
 booting from FLASH depends of NOR flash using the GPCM.
 
 We are facing in the initialization of the nand_init, a crash in the
 dummy write during the UPM program based on the UPM mode of freescale
 MPC8323 in the code below:
 
 void UPMA_prog()
 {
 int i=0;
 // OP set to write to RAM array command
 *(int *)(MAMR) = 0x1000;
 // Write word to RAM arrays
 for (i=0;i
 
 There is no such code in mainline U-Boot. I recommend you look for
 existing (and working) code examples when porting U-Boot to your
 hardware. Note that you should use I/O accessor functions instead of
 plain register writes.
 
 Best regards,
 
 Wolfgang Denk
 
 -- 
 DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
 HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
 Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
 Digital computers are themselves more complex than most things people
 build: They have very large numbers of states. This makes conceiving,
 describing, and testing them hard. Software systems  have  orders-of-
 magnitude more states than computers do.   - Fred Brooks, Jr.
 ___
 U-Boot mailing list
 U-Boot@lists.denx.de
 http://lists.denx.de/mailman/listinfo/u-boot
 
 

-- 
View this message in context: 
http://old.nabble.com/-U-Boot--Crash-nand-init--UPMA---NAND-flash-MPC832x-tp26865466p26870202.html
Sent from the Uboot - Users mailing list archive at Nabble.com.

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Crash nand init UPMA - NAND flash MPC832x

2009-12-20 Thread Ben Warren
Koteswar,

A few things:

First of all, please don't top post.

On Sun, Dec 20, 2009 at 9:55 PM, KoteswarK koti.ke...@gmail.com wrote:


 Hi
 What are those I/O accessor functions? API present in

Look in include/asm-ppc/io.h.  You'll find lots of wonderful accessor
functions.  They're always preferable to the alternative.

 ./drivers/mtd/nand/fsl_upm.c file??? I am also getting crash while doing
 dummy write to NAND_BASE. Code is follows
 void UPMA_prog()
 {
int i=0;
/* OP set to write to RAM array command*/
*(int *)(MAMR) = 0x1000;
/* Write word to RAM arrays*/
for (i=0;i32;i++)
{
*(int *)(MDR) = UPMATable[i];

udelay (100);
/* *(int *)(MAMR) = 0x1000;
 *
 * *(int *)(MAMR) = 0x1000+i;*/

/*dummy write*/
*(char *)(CFG_NAND_BASE) = 0xff;
}
 .
 }

Why don't you use the upmconfig() function that's in cpu/mpc83xx/cpu.c?  It
doesn't use I/O accessors either, but I give it better odds of working than
your code.

 Rgds
 Koteswar


regards,
Ben
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot