Re: [U-Boot] Broken OMAP3 EVM and SMDKC100

2009-12-24 Thread Premi, Sanjeev
 -Original Message-
 From: u-boot-boun...@lists.denx.de 
 [mailto:u-boot-boun...@lists.denx.de] On Behalf Of Dirk Behme
 Sent: Thursday, December 24, 2009 11:48 AM
 To: u-boot@lists.denx.de
 Subject: [U-Boot] Broken OMAP3 EVM and SMDKC100
 
 
 Doing ./MAKEALL ARM_CORTEX_A8 with recent mainline head, 
 omap3_evm and 
 smdkc100 fail with
 
 env_onenand.c: In function 'env_relocate_spec':
 env_onenand.c:70: error: 'CONFIG_ENV_ADDR_FLEX' undeclared (first use 
 in this function)
 env_onenand.c:70: error: (Each undeclared identifier is 
 reported only once
 env_onenand.c:70: error: for each function it appears in.)
 env_onenand.c: In function 'saveenv':
 env_onenand.c:106: error: 'CONFIG_ENV_ADDR_FLEX' undeclared 
 (first use 
 in this function)
 env_onenand.c:107: error: 'CONFIG_ENV_SIZE_FLEX' undeclared 
 (first use 
 in this function)

This should already have been fixed by my patch.
See: http://www.mail-archive.com/u-boot@lists.denx.de/msg26698.html

 
 Just fyi, in case somebody has time to look into this.
 
 Ah, and omap3_evm additionally has
 
 omap3.c: In function 'musb_platform_init': 
 
 omap3.c:126: warning: label 'end' defined but not used

Didn't notice it yesterday. Will look into it now.

Best regards,
Sanjeev

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


[U-Boot] U-Boot on PXA320

2009-12-24 Thread Dennis Semakin


 Пересылаемое сообщение 
24.12.09, 14:26, Dennis Semakin insan...@yandex.ru:

Hello everybody.
I have a question about u-boot net subsystem on Toradex Colibri PXA320.
Let's see on lib_arm/board.c file
Here is code where network subsystem initializes (At least I think so)
..
#if defined(CONFIG_CMD_NET)
#if defined(CONFIG_NET_MULTI)
puts (Net:   );
#endif
eth_initialize(gd-bd); 
#if defined(CONFIG_RESET_PHY_R)
debug (Reset Ethernet PHY\n);
reset_phy();
#endif
#endif
/* main_loop() can return to retry autoboot, if so just run it again. */
for (;;) {
main_loop ();
}
..
I'm interested of eth_initialize(gd-bd) function.
If I compile without CONFIG_NET_MULTI option the implementation of this 
function is
(in net/eth.c file)
..
#elif defined(CONFIG_CMD_NET)  !defined(CONFIG_NET_MULTI)

#warning Ethernet driver is deprecated.  Please update to use CONFIG_NET_MULTI

extern int at91rm9200_miiphy_initialize(bd_t *bis);
extern int mcf52x2_miiphy_initialize(bd_t *bis);
extern int ns7520_miiphy_initialize(bd_t *bis);

int eth_initialize(bd_t *bis)
{
#if defined(CONFIG_MII) || defined(CONFIG_CMD_MII)
miiphy_init();
#endif

#if defined(CONFIG_AT91RM9200)
at91rm9200_miiphy_initialize(bis);
#endif
#if defined(CONFIG_MCF52x2)
mcf52x2_miiphy_initialize(bis);
#endif
#if defined(CONFIG_DRIVER_NS7520_ETHERNET)
ns7520_miiphy_initialize(bis);
#endif
return 0;
}
#endif
Then as result, my network subsystem is hang when I run someone net 
command(e.g. ping)
And if I compile with CONFIG_NET_MULTI option the implementation of this 
function is
..
int eth_initialize(bd_t *bis)
{
unsigned char env_enetaddr[6];
int eth_number = 0;

eth_devices = NULL;
eth_current = NULL;
show_boot_progress (64);
#if defined(CONFIG_MII) || defined(CONFIG_CMD_MII)
miiphy_init();
#endif
/* Try board-specific initialization first.  If it fails or isn't
 * present, try the cpu-specific initialization */
if (board_eth_init(bis)  0)
cpu_eth_init(bis);

#if defined(CONFIG_DB64360) || defined(CONFIG_CPCI750)
mv6436x_eth_initialize(bis);
#endif
#if defined(CONFIG_DB64460) || defined(CONFIG_P3Mx)
mv6446x_eth_initialize(bis);
#endif
if (!eth_devices) {
puts (No ethernet found.\n);
show_boot_progress (-64);
} else {
..
And then I get message No ethernet found...

Questions: where is net subsystem initialization code for Colibri PXA320 board 
in u-boot?
Where and how the structure eth_device is fill for that board? Or it don't need?
Thanks
Best regard
Dennis Semakin
 Завершение пересылаемого сообщения 
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] Problem with transparent PCI-PCI bridge on Canyonlands

2009-12-24 Thread jav...@inwind.it
Hello,

I've encountered the same problem and found a solution.
In 
drivers/pci/pci_indirect.c, add the following code block at line 79:

#elif 
defined(CONFIG_460EX)
#define INDIRECT_PCI_OP(rw, size, type, op, mask)\

static int   \
indirect_##rw##_config_##size(struct pci_controller *hose,  
 \
  pci_dev_t dev, int offset, type val)   \
{\
u32 b, d,f; 
 \
b = PCI_BUS(dev); d = PCI_DEV(dev); f = PCI_FUNC(dev);   \
b = b - 
hose-first_busno;   \
dev = PCI_BDF(b, d, f);  \
if (PCI_BUS(dev)  
0)\
out_le32(hose-cfg_addr, dev 
| (offset  0xfc) | 0x0001); \

else \
out_le32
(hose-cfg_addr, dev | (offset  0xfc) | 0x); \
cfg_##rw(val, hose-
cfg_data + (offset  mask), type, op);  \
return 0;\
}
#else

Hope 
this helps

Ciao

Max Tretene, ACube Systems Srl
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] ARM: Fix building without CONFIG_CMD_NET

2009-12-24 Thread Premi, Sanjeev
 

 -Original Message-
 From: u-boot-boun...@lists.denx.de 
 [mailto:u-boot-boun...@lists.denx.de] On Behalf Of Premi, Sanjeev
 Sent: Thursday, December 24, 2009 6:43 PM
 To: Marcel Ziswiler; u-boot@lists.denx.de
 Cc: s...@denx.de
 Subject: Re: [U-Boot] [PATCH] ARM: Fix building without CONFIG_CMD_NET
 
  
  -Original Message-
  From: u-boot-boun...@lists.denx.de 
  [mailto:u-boot-boun...@lists.denx.de] On Behalf Of Marcel Ziswiler
  Sent: Thursday, December 24, 2009 7:39 AM
  To: u-boot@lists.denx.de
  Cc: s...@denx.de
  Subject: [U-Boot] [PATCH] ARM: Fix building without CONFIG_CMD_NET
  
  Delta and Zylonite both do not define CONFIG_CMD_NET by 
  default and therefore
  failed building:
  
  lib_arm/libarm.a(board.o): In function `start_armboot':
  /home/sumo/Noser/Linux/u-boot.git/lib_arm/board.c:360: 
  undefined reference to `getenv_IPaddr'
  make: *** [u-boot] Error 1
  
  Saw that this got already fixed for ppc. Duno why nobody 
  considered ARM as well!
  
  Signed-off-by: Marcel Ziswiler marcel.ziswi...@noser.com
  ---
   lib_arm/board.c |2 ++
   1 files changed, 2 insertions(+), 0 deletions(-)
  
  diff --git a/lib_arm/board.c b/lib_arm/board.c
  index e148739..453d660 100644
  --- a/lib_arm/board.c
  +++ b/lib_arm/board.c
  @@ -356,8 +356,10 @@ void start_armboot (void)
  serial_initialize();
   #endif
   
  +#ifdef CONFIG_CMD_NET
  /* IP Address */
  gd-bd-bi_ip_addr = getenv_IPaddr (ipaddr);
  +#endif
   
  stdio_init ();  /* get the devices list going. */
   
 
 I had already sent a patch earlier with the same fix.
 Noticed it on beagle.
 
 See: http://www.mail-archive.com/u-boot@lists.denx.de/msg26870.html
  [PATCH] omap3: beagle: fix compile error 

Sorry, pasted incorrect url. Here is the right one:
 http://www.mail-archive.com/u-boot@lists.denx.de/msg26845.html

~sanjeev
 
 Best regards,
 Sanjeev
 
  -- 
  1.6.0.4
  
  
  ___
  U-Boot mailing list
  U-Boot@lists.denx.de
  http://lists.denx.de/mailman/listinfo/u-boot
  
 ___
 U-Boot mailing list
 U-Boot@lists.denx.de
 http://lists.denx.de/mailman/listinfo/u-boot
 
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Problem with transparent PCI-PCI bridge on Canyonlands

2009-12-24 Thread Felix Radensky
Hi, Max

jav...@inwind.it wrote:
 Hello,

 I've encountered the same problem and found a solution.
 In 
 drivers/pci/pci_indirect.c, add the following code block at line 79:

 #elif 
 defined(CONFIG_460EX)
 #define INDIRECT_PCI_OP(rw, size, type, op, mask)  \

 static int \
 indirect_##rw##_config_##size(struct pci_controller *hose,
\
 pci_dev_t dev, int offset, type val)   \
 {  \
   u32 b, d,f; 
\
   b = PCI_BUS(dev); d = PCI_DEV(dev); f = PCI_FUNC(dev);   \
   b = b - 
 hose-first_busno; \
   dev = PCI_BDF(b, d, f);  \
   if (PCI_BUS(dev)  
 0)\
   out_le32(hose-cfg_addr, dev 
 | (offset  0xfc) | 0x0001); \
   
 else \
   out_le32
 (hose-cfg_addr, dev | (offset  0xfc) | 0x); \
   cfg_##rw(val, hose-
   
 cfg_data + (offset  mask), type, op);\
 
   return 0;\
 }
 #else

 Hope 
 this helps

 Ciao

 Max Tretene, ACube Systems Srl
   
Thanks for help. Your fix indeed helps to avoid infinite loop I had.
u-boot still hangs for me, now at different place:

U-Boot 2009.11 (Dec 24 2009 - 16:12:11)

CPU:   AMCC PowerPC 460EX Rev. A at 600 MHz (PLB=200 OPB=100 EBC=100)
   Security/Kasumi support
   Bootstrap Option H - Boot ROM Location I2C (Addr 0x52)
   Internal PCI arbiter enabled
   32 kB I-Cache 32 kB D-Cache
Board: Canyonlands - AMCC PPC460EX Evaluation Board, 2*PCIe, Rev. 14
I2C:   ready
DRAM:  512 MB (ECC not enabled, 400 MHz, CL3)
FLASH: 64 MB
NAND:  256 MiB
PCI:   Bus Dev VenId DevId Class Int
PCI Autoconfig: Bus Memory region: [0x8000-0x8fff],
Physical Memory [8000-8fffx]
PCI Autoconfig: Bus I/O region: [0x0-0x],
Physical Memory: [d800-d800]
PCI Scan: Found Bus 0, Device 6, Function 0
PCI Autoconfig: Found P2P bridge, device 6

The hang is at

pci_hose_read_config_byte(hose, dev, PCI_HEADER_TYPE, header_type);

invoked from pci_hose_scan_bus().

Any ideas ?

Thanks a lot.

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


Re: [U-Boot] U-Boot on PXA320

2009-12-24 Thread Ben Warren
Hello Dennis,

Sending the e-mail once is enough.

Dennis Semakin wrote:
 Hello everybody.
 I have a question about u-boot net subsystem on Toradex Colibri PXA320.
 Let's see on lib_arm/board.c file
 Here is code where network subsystem initializes (At least I think so)
 ..
 #if defined(CONFIG_CMD_NET)
 #if defined(CONFIG_NET_MULTI)
 puts (Net:   );
 #endif
 eth_initialize(gd-bd); 
 #if defined(CONFIG_RESET_PHY_R)
 debug (Reset Ethernet PHY\n);
 reset_phy();
 #endif
 #endif
 /* main_loop() can return to retry autoboot, if so just run it again. 
 */
 for (;;) {
 main_loop ();
 }
 ..
 I'm interested of eth_initialize(gd-bd) function.
 If I compile without CONFIG_NET_MULTI option the implementation of this 
 function is
 (in net/eth.c file)
 ..
 #elif defined(CONFIG_CMD_NET)  !defined(CONFIG_NET_MULTI)

 #warning Ethernet driver is deprecated.  Please update to use CONFIG_NET_MULTI

 extern int at91rm9200_miiphy_initialize(bd_t *bis);
 extern int mcf52x2_miiphy_initialize(bd_t *bis);
 extern int ns7520_miiphy_initialize(bd_t *bis);

 int eth_initialize(bd_t *bis)
 {
 #if defined(CONFIG_MII) || defined(CONFIG_CMD_MII)
 miiphy_init();
 #endif

 #if defined(CONFIG_AT91RM9200)
 at91rm9200_miiphy_initialize(bis);
 #endif
 #if defined(CONFIG_MCF52x2)
 mcf52x2_miiphy_initialize(bis);
 #endif
 #if defined(CONFIG_DRIVER_NS7520_ETHERNET)
 ns7520_miiphy_initialize(bis);
 #endif
 return 0;
 }
 #endif
 Then as result, my network subsystem is hang when I run someone net 
 command(e.g. ping)
 And if I compile with CONFIG_NET_MULTI option the implementation of this 
 function is
 ..
 int eth_initialize(bd_t *bis)
 {
 unsigned char env_enetaddr[6];
 int eth_number = 0;

 eth_devices = NULL;
 eth_current = NULL;
 show_boot_progress (64);
 #if defined(CONFIG_MII) || defined(CONFIG_CMD_MII)
 miiphy_init();
 #endif
 /* Try board-specific initialization first.  If it fails or isn't
  * present, try the cpu-specific initialization */
 if (board_eth_init(bis)  0)
 cpu_eth_init(bis);

 #if defined(CONFIG_DB64360) || defined(CONFIG_CPCI750)
 mv6436x_eth_initialize(bis);
 #endif
 #if defined(CONFIG_DB64460) || defined(CONFIG_P3Mx)
 mv6446x_eth_initialize(bis);
 #endif
 if (!eth_devices) {
 puts (No ethernet found.\n);
 show_boot_progress (-64);
 } else {
 ..
 And then I get message No ethernet found...

 Questions: where is net subsystem initialization code for Colibri PXA320 
 board in u-boot?
   
Maybe I'm not looking in the right place, but I can't find this board in 
the source tree.  The closest I can find is a machine type definition 
for MACH_TYPE_COLIBRI, but no boards have CONFIG_MACH_COLIBRI set.  
Without the source code, there's only so much help we can give you.
 Where and how the structure eth_device is fill for that board? Or it don't 
 need?
   
I have no idea what Ethernet controller is on this board, but judging 
from your debug trace, whatever it is, it uses the old API (non 
CONFIG_NET_MULTI), and either the driver or your board is broken or not 
configured properly.

A bit of background:  there are two network device drivers: the old one, 
which only supports one interface per board; and the new one 
(CONFIG_NET_MULTI), which supports one or more interfaces.  Over time, 
we're converting all drivers to use the new API, but this takes effort 
and obviously hardware that is out-of-tree won't be updated.  As the 
#warning tells you, the old API is going away soon.
 Thanks
 Best regard
 Dennis Semakin
 ___
 U-Boot mailing list
 U-Boot@lists.denx.de
 http://lists.denx.de/mailman/listinfo/u-boot
   

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