[U-Boot] [PATCH v3] Support for the OpenRD base board

2009-09-14 Thread Simon Kagstrom
Support for the OpenRD base board

The implementation is borrowed from the sheevaplug board and the Marvell
1.1.4 code and likely to be a bit incomplete.

Signed-off-by: Simon Kagstrom 
---
The configuration does not include UBIFS support, which still needs
the remaining patches for the bitops cleanup and fixes:

  http://lists.denx.de/pipermail/u-boot/2009-August/059285.html

to build. Until those are applied, it's turned off here.


I get run-time problems when building for armv5te for OpenRD base
(apparently the same problem occurs for other Kirkwood boards). This
patch fixes that:

  http://lists.denx.de/pipermail/u-boot/2009-September/059896.html


ChangeLog:

v2: kwbimage.cfg, which is needed to produce an image to install on the
  NAND flash, has been added
v3: Updated after Prafullas review:
  * Correct typo in comment section :-)
  * Update copyright references
  * Correct bit meaning in kwbimage.cfg according to new specification
  * Add empty line after MPP configuration
  * Use short name for board identity string in config 
  * Use CONFIG_SHEEVA_88SV131 instead of Feroceon
  * Add CONFIG_KIRKWOOD_PCIE_INIT to config
  * Use config_cmd_default.h and remove options which are not needed anymore
  * Move config address to 0x6 (384KB). I'd like it at this address since
adding UBI/UBIFS support to U-boot makes the binary a bit more than 300KB
and would thus overlap a config address at 0x4.
  Not updated in v3:
  * The default MTD options are kept (useful for UBIFS)
  * eth init is not done, this needs to be done in a generic way

 MAINTAINERS |4 +
 MAKEALL |1 +
 Makefile|3 +
 board/Marvell/openrd_base/Makefile  |   56 
 board/Marvell/openrd_base/config.mk |   33 +
 board/Marvell/openrd_base/kwbimage.cfg  |  168 +
 board/Marvell/openrd_base/openrd_base.c |  160 +++
 board/Marvell/openrd_base/openrd_base.h |   46 +++
 include/configs/openrd_base.h   |  209 +++
 9 files changed, 680 insertions(+), 0 deletions(-)
 create mode 100644 board/Marvell/openrd_base/Makefile
 create mode 100644 board/Marvell/openrd_base/config.mk
 create mode 100644 board/Marvell/openrd_base/kwbimage.cfg
 create mode 100644 board/Marvell/openrd_base/openrd_base.c
 create mode 100644 board/Marvell/openrd_base/openrd_base.h
 create mode 100644 include/configs/openrd_base.h

diff --git a/MAINTAINERS b/MAINTAINERS
index e9db278..99cdc12 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -588,6 +588,10 @@ Gary Jennejohn 
 Konstantin Kletschke 
scb9328 ARM920T
 
+Simon Kagstrom 
+
+   openrd_base ARM926EJS (Kirkwood SoC)
+
 Nishant Kamat 
 
omap1610h2  ARM926EJS
diff --git a/MAKEALL b/MAKEALL
index f0ed8ea..9e6eee2 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -533,6 +533,7 @@ LIST_ARM9=" \
omap1610inn \
omap5912osk \
omap730p2   \
+   openrd_base \
rd6281a \
sbc2410x\
scb9328 \
diff --git a/Makefile b/Makefile
index 9764cea..6cef82a 100644
--- a/Makefile
+++ b/Makefile
@@ -3022,6 +3022,9 @@ omap1610h2_cs_autoboot_config:unconfig
 omap5912osk_config :   unconfig
@$(MKCONFIG) $(@:_config=) arm arm926ejs omap5912osk ti omap
 
+openrd_base_config: unconfig
+   @$(MKCONFIG) $(@:_config=) arm arm926ejs $(@:_config=) Marvell kirkwood
+
 xtract_omap730p2 = $(subst _cs0boot,,$(subst _cs3boot,, $(subst _config,,$1)))
 
 omap730p2_config \
diff --git a/board/Marvell/openrd_base/Makefile 
b/board/Marvell/openrd_base/Makefile
new file mode 100644
index 000..3ef0b9b
--- /dev/null
+++ b/board/Marvell/openrd_base/Makefile
@@ -0,0 +1,56 @@
+#
+# (C) Copyright 2009
+# Net Insight 
+# Written-by: Simon Kagstrom 
+#
+# Based on sheevaplug:
+# (C) Copyright 2009
+# Marvell Semiconductor 
+# Written-by: Prafulla Wadaskar 
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston,
+# MA 02110-1301 USA
+#
+
+include $(TOPDIR)/config.mk
+
+LIB= $(obj)lib$(BOARD).a
+
+COBJS  := openrd_base.o
+
+SRCS   := $(SOBJS:.o=.S) $(COBJ

Re: [U-Boot] [PATCH] Enable usb ehci support for p2020ds board

2009-09-14 Thread Felix Radensky
Hi,

Zang Roy-R61911 wrote:
>  
>
>   
>> -Original Message-
>> From: Felix Radensky [mailto:fe...@embedded-sol.com] 
>> Sent: Sunday, September 13, 2009 17:19 PM
>> To: Zang Roy-R61911
>> Cc: U-Boot-Denx; Kumar Gala
>> Subject: Re: [U-Boot] [PATCH] Enable usb ehci support for 
>> p2020ds board
>>
>> Hi, Roy
>>
>> Does this mean that USB mass storage devices are actually
>> usable on P2020DS ? 
>> 
> Yes, it works.
>
>   
>> Similar patch for MPC8536DS was
>> added during 2008.08 merge window, but USB mass storage
>> devices are not recognized by u-boot.
>> 
> Why? I do not try on 8536DS, but I think it should work. The same ip and
> the same code :-).
>
>   
>> Since I don't see any FSL
>> ehici driver changes, I suspect situation may be similar on
>> P2020DS.
>> 
> P2020DS and 8536DS should use the same driver. it works. 
> user ext2 command  to opertate usb interface.
>
> My log here on P2020:
>
> U-Boot 2009.08-00126-g0fc8f56-dirty (Sep 09 2009 - 18:00:43)
>
> CPU0:  P2020E, Version: 1.0, (0x80ea0010)
> Core:  E500, Version: 4.0, (0x80211040)
> Clock Configuration:
>CPU0:1199.988 MHz, CPU1:1199.988 MHz,
>CCB:599.994 MHz,
>DDR:333.330 MHz (666.660 MT/s data rate) (Asynchronous),
> LBC:37.500 MHz
> L1:D-cache 32 kB enabled
>I-cache 32 kB enabled
> Board: P2020DS Sys ID: 0x16, Sys Ver: 0x02, FPGA Ver: 0x03, vBank: 0
> I2C:   ready
> DRAM:  InitializingDDR:  1 GB
> FLASH: 128 MB
> L2:512 KB enabled
> NAND:  No NAND device found!!!
> No NAND device found!!!
> No NAND device found!!!
> 2048 MiB
> *** Warning - bad CRC, using default environment
>
> EEPROM: NXID v0
>
> PCIE2 connected to ULI as Root Complex (base addr ffe09000)
>Scanning PCI bus 01
> 02  11  8086  100f  0200  00
> 02  1c  10b9  5237  0c03  00
> 02  1c  10b9  5237  0c03  00
> 02  1c  10b9  5237  0c03  00
> 02  1c  10b9  5239  0c03  00
> 02  1e  10b9  1575  0601  00
> 02  1e  10b9  7101  0680  00
> 02  1f  10b9  5229  0101  00
> 02  1f  10b9  5288  0101  00
> 01  00  10b9  5249  0604  00
> PCIE2 on bus 00 - 02
>
> PCIE3 connected to Slot 1 as Root Complex (base addr ffe08000)
> PCIE3 on bus 03 - 03
>
> PCIE1 connected to Slot 2 as Root Complex (base addr ffe0a000)
> PCIE1 on bus 04 - 04
> Video: No radeon video card found!
> In:serial
> Out:   serial
> Err:   serial
> SCSI:  AHCI 0001. 32 slots 4 ports 3 Gbps 0xf impl IDE mode
> flags: ncq ilck pm led clo pmp pio slum part
> scanning bus for devices...
> Net:   e1000: 00:07:e9:14:4d:e3
> eTSEC1, eTSEC2, eTSEC3, e1000#0
> Warning: e1000#0 MAC addresses don't match:
> Address in SROM is 00:07:e9:14:4d:e3
> Address in environment is  00:e0:0c:02:03:fd
>
> Hit any key to stop autoboot:  0
> =>
> => help usb
> usb - USB sub-system
>
> Usage:
> usb reset - reset (rescan) USB controller
> usb stop [f]  - stop USB [f]=force stop
> usb tree  - show USB device tree
> usb info [dev] - show available USB devices
> usb storage  - show details of USB storage devices
> usb dev [dev] - show or set current USB storage device
> usb part [dev] - print partition table of one or all USB storage devices
> usb read addr blk# cnt - read `cnt' blocks starting at block `blk#'
> to memory address `addr'
> => usb start
> (Re)start USB...
> USB:   Register 10011 NbrPorts 1
> USB EHCI 1.00
> scanning bus for devices... 2 USB Device(s) found
>scanning bus for storage devices... 1 Storage Device(s) found
> => usb info
> 1: Hub,  USB Revision 2.0
>  - u-boot EHCI Host Controller
>  - Class: Hub
>  - PacketSize: 64  Configurations: 1
>  - Vendor: 0x  Product 0x Version 1.0
>Configuration: 1
>- Interfaces: 1 Self Powered 0mA
>  Interface: 0
>  - Alternate Setting 0, Endpoints: 1
>  - Class Hub
>  - Endpoint 1 In Interrupt MaxPacket 2048 Interval 0ms
>
> 2: Mass Storage,  USB Revision 2.0
>  - SanDisk U3 Cruzer Micro 0774700CB28059E2
>  - Class: (from Interface) Mass Storage
>  - PacketSize: 64  Configurations: 1
>  - Vendor: 0x0781  Product 0x5406 Version 2.0
>Configuration: 1
>- Interfaces: 1 Bus Powered 200mA
>  Interface: 0
>  - Alternate Setting 0, Endpoints: 2
>  - Class Mass Storage, Transp. SCSI, Bulk only
>  - Endpoint 1 In Bulk MaxPacket 512
>  - Endpoint 2 Out Bulk MaxPacket 512
>
> => usb dev 0
>
> USB device 0:
> Device 0: Vendor: SanDisk  Rev: 7.01 Prod: Cruzer
> Type: Removable Hard Disk
> Capacity: 1907.9 MB = 1.8 GB (3907583 x 512)
> ... is now current device
> => ext2ls usb 0:1
>4096 .
>4096 ..
>  2196128 vmlinuz
> => help ext2load
> ext2load - load binary file from a Ext2 filesystem
>
> Usage:
> ext2load   [addr] [filename] [bytes]
> - load binary file 'filename' from 'dev' on 'interface'
>   to address 'addr' from ext2 filesystem
> => ext2load usb 0:1 100 vmlinuz
> Loading fil

Re: [U-Boot] [PATCH] Enable usb ehci support for p2020ds board

2009-09-14 Thread Zang Roy-R61911
 

> -Original Message-
> From: Felix Radensky [mailto:fe...@embedded-sol.com] 
> Sent: Monday, September 14, 2009 15:50 PM
> To: Zang Roy-R61911
> Cc: U-Boot-Denx; Kumar Gala; Zhang Junjie-B18070
> Subject: Re: [U-Boot] [PATCH] Enable usb ehci support for 
> p2020ds board
> 
> Hi,
> 
> Zang Roy-R61911 wrote:
> >  
> >
> >   
> >> -Original Message-
> >> From: Felix Radensky [mailto:fe...@embedded-sol.com] 
> >> Sent: Sunday, September 13, 2009 17:19 PM
> >> To: Zang Roy-R61911
> >> Cc: U-Boot-Denx; Kumar Gala
> >> Subject: Re: [U-Boot] [PATCH] Enable usb ehci support for 
> >> p2020ds board
> >>
> >> Hi, Roy
> >>
> >> Does this mean that USB mass storage devices are actually
> >> usable on P2020DS ? 
> >> 
> > Yes, it works.
> >
> >   
> >> Similar patch for MPC8536DS was
> >> added during 2008.08 merge window, but USB mass storage
> >> devices are not recognized by u-boot.
> >> 
> > Why? I do not try on 8536DS, but I think it should work. 
> The same ip and
> > the same code :-).
> >
> >   
> >> Since I don't see any FSL
> >> ehici driver changes, I suspect situation may be similar on
> >> P2020DS.
> >> 
> > P2020DS and 8536DS should use the same driver. it works. 
> > user ext2 command  to opertate usb interface.
> >
> > My log here on P2020:
> >
> > U-Boot 2009.08-00126-g0fc8f56-dirty (Sep 09 2009 - 18:00:43)
> >
> > CPU0:  P2020E, Version: 1.0, (0x80ea0010)
> > Core:  E500, Version: 4.0, (0x80211040)
> > Clock Configuration:
> >CPU0:1199.988 MHz, CPU1:1199.988 MHz,
> >CCB:599.994 MHz,
> >DDR:333.330 MHz (666.660 MT/s data rate) (Asynchronous),
> > LBC:37.500 MHz
> > L1:D-cache 32 kB enabled
> >I-cache 32 kB enabled
> > Board: P2020DS Sys ID: 0x16, Sys Ver: 0x02, FPGA Ver: 0x03, vBank: 0
> > I2C:   ready
> > DRAM:  InitializingDDR:  1 GB
> > FLASH: 128 MB
> > L2:512 KB enabled
> > NAND:  No NAND device found!!!
> > No NAND device found!!!
> > No NAND device found!!!
> > 2048 MiB
> > *** Warning - bad CRC, using default environment
> >
> > EEPROM: NXID v0
> >
> > PCIE2 connected to ULI as Root Complex (base addr ffe09000)
> >Scanning PCI bus 01
> > 02  11  8086  100f  0200  00
> > 02  1c  10b9  5237  0c03  00
> > 02  1c  10b9  5237  0c03  00
> > 02  1c  10b9  5237  0c03  00
> > 02  1c  10b9  5239  0c03  00
> > 02  1e  10b9  1575  0601  00
> > 02  1e  10b9  7101  0680  00
> > 02  1f  10b9  5229  0101  00
> > 02  1f  10b9  5288  0101  00
> > 01  00  10b9  5249  0604  00
> > PCIE2 on bus 00 - 02
> >
> > PCIE3 connected to Slot 1 as Root Complex (base addr ffe08000)
> > PCIE3 on bus 03 - 03
> >
> > PCIE1 connected to Slot 2 as Root Complex (base addr ffe0a000)
> > PCIE1 on bus 04 - 04
> > Video: No radeon video card found!
> > In:serial
> > Out:   serial
> > Err:   serial
> > SCSI:  AHCI 0001. 32 slots 4 ports 3 Gbps 0xf impl IDE mode
> > flags: ncq ilck pm led clo pmp pio slum part
> > scanning bus for devices...
> > Net:   e1000: 00:07:e9:14:4d:e3
> > eTSEC1, eTSEC2, eTSEC3, e1000#0
> > Warning: e1000#0 MAC addresses don't match:
> > Address in SROM is 00:07:e9:14:4d:e3
> > Address in environment is  00:e0:0c:02:03:fd
> >
> > Hit any key to stop autoboot:  0
> > =>
> > => help usb
> > usb - USB sub-system
> >
> > Usage:
> > usb reset - reset (rescan) USB controller
> > usb stop [f]  - stop USB [f]=force stop
> > usb tree  - show USB device tree
> > usb info [dev] - show available USB devices
> > usb storage  - show details of USB storage devices
> > usb dev [dev] - show or set current USB storage device
> > usb part [dev] - print partition table of one or all USB 
> storage devices
> > usb read addr blk# cnt - read `cnt' blocks starting at block `blk#'
> > to memory address `addr'
> > => usb start
> > (Re)start USB...
> > USB:   Register 10011 NbrPorts 1
> > USB EHCI 1.00
> > scanning bus for devices... 2 USB Device(s) found
> >scanning bus for storage devices... 1 Storage Device(s) found
> > => usb info
> > 1: Hub,  USB Revision 2.0
> >  - u-boot EHCI Host Controller
> >  - Class: Hub
> >  - PacketSize: 64  Configurations: 1
> >  - Vendor: 0x  Product 0x Version 1.0
> >Configuration: 1
> >- Interfaces: 1 Self Powered 0mA
> >  Interface: 0
> >  - Alternate Setting 0, Endpoints: 1
> >  - Class Hub
> >  - Endpoint 1 In Interrupt MaxPacket 2048 Interval 0ms
> >
> > 2: Mass Storage,  USB Revision 2.0
> >  - SanDisk U3 Cruzer Micro 0774700CB28059E2
> >  - Class: (from Interface) Mass Storage
> >  - PacketSize: 64  Configurations: 1
> >  - Vendor: 0x0781  Product 0x5406 Version 2.0
> >Configuration: 1
> >- Interfaces: 1 Bus Powered 200mA
> >  Interface: 0
> >  - Alternate Setting 0, Endpoints: 2
> >  - Class Mass Storage, Transp. SCSI, Bulk only
> >  - Endpoint 1 In Bulk MaxPacket 512
> >  - Endpoint 2 Out Bulk MaxPacket 512
> >
> >

Re: [U-Boot] [PATCH] Enable usb ehci support for p2020ds board

2009-09-14 Thread Felix Radensky
Zang Roy-R61911 wrote:
>  
>
>   
>> -Original Message-
>> From: Felix Radensky [mailto:fe...@embedded-sol.com] 
>> Sent: Monday, September 14, 2009 15:50 PM
>> To: Zang Roy-R61911
>> Cc: U-Boot-Denx; Kumar Gala; Zhang Junjie-B18070
>> Subject: Re: [U-Boot] [PATCH] Enable usb ehci support for 
>> p2020ds board
>>
>> Hi,
>>
>> Zang Roy-R61911 wrote:
>> 
>>>  
>>>
>>>   
>>>   
 -Original Message-
 From: Felix Radensky [mailto:fe...@embedded-sol.com] 
 Sent: Sunday, September 13, 2009 17:19 PM
 To: Zang Roy-R61911
 Cc: U-Boot-Denx; Kumar Gala
 Subject: Re: [U-Boot] [PATCH] Enable usb ehci support for 
 p2020ds board

 Hi, Roy

 Does this mean that USB mass storage devices are actually
 usable on P2020DS ? 
 
 
>>> Yes, it works.
>>>
>>>   
>>>   
 Similar patch for MPC8536DS was
 added during 2008.08 merge window, but USB mass storage
 devices are not recognized by u-boot.
 
 
>>> Why? I do not try on 8536DS, but I think it should work. 
>>>   
>> The same ip and
>> 
>>> the same code :-).
>>>
>>>   
>>>   
 Since I don't see any FSL
 ehici driver changes, I suspect situation may be similar on
 P2020DS.
 
 
>>> P2020DS and 8536DS should use the same driver. it works. 
>>> user ext2 command  to opertate usb interface.
>>>
>>> My log here on P2020:
>>>
>>> U-Boot 2009.08-00126-g0fc8f56-dirty (Sep 09 2009 - 18:00:43)
>>>
>>> CPU0:  P2020E, Version: 1.0, (0x80ea0010)
>>> Core:  E500, Version: 4.0, (0x80211040)
>>> Clock Configuration:
>>>CPU0:1199.988 MHz, CPU1:1199.988 MHz,
>>>CCB:599.994 MHz,
>>>DDR:333.330 MHz (666.660 MT/s data rate) (Asynchronous),
>>> LBC:37.500 MHz
>>> L1:D-cache 32 kB enabled
>>>I-cache 32 kB enabled
>>> Board: P2020DS Sys ID: 0x16, Sys Ver: 0x02, FPGA Ver: 0x03, vBank: 0
>>> I2C:   ready
>>> DRAM:  InitializingDDR:  1 GB
>>> FLASH: 128 MB
>>> L2:512 KB enabled
>>> NAND:  No NAND device found!!!
>>> No NAND device found!!!
>>> No NAND device found!!!
>>> 2048 MiB
>>> *** Warning - bad CRC, using default environment
>>>
>>> EEPROM: NXID v0
>>>
>>> PCIE2 connected to ULI as Root Complex (base addr ffe09000)
>>>Scanning PCI bus 01
>>> 02  11  8086  100f  0200  00
>>> 02  1c  10b9  5237  0c03  00
>>> 02  1c  10b9  5237  0c03  00
>>> 02  1c  10b9  5237  0c03  00
>>> 02  1c  10b9  5239  0c03  00
>>> 02  1e  10b9  1575  0601  00
>>> 02  1e  10b9  7101  0680  00
>>> 02  1f  10b9  5229  0101  00
>>> 02  1f  10b9  5288  0101  00
>>> 01  00  10b9  5249  0604  00
>>> PCIE2 on bus 00 - 02
>>>
>>> PCIE3 connected to Slot 1 as Root Complex (base addr ffe08000)
>>> PCIE3 on bus 03 - 03
>>>
>>> PCIE1 connected to Slot 2 as Root Complex (base addr ffe0a000)
>>> PCIE1 on bus 04 - 04
>>> Video: No radeon video card found!
>>> In:serial
>>> Out:   serial
>>> Err:   serial
>>> SCSI:  AHCI 0001. 32 slots 4 ports 3 Gbps 0xf impl IDE mode
>>> flags: ncq ilck pm led clo pmp pio slum part
>>> scanning bus for devices...
>>> Net:   e1000: 00:07:e9:14:4d:e3
>>> eTSEC1, eTSEC2, eTSEC3, e1000#0
>>> Warning: e1000#0 MAC addresses don't match:
>>> Address in SROM is 00:07:e9:14:4d:e3
>>> Address in environment is  00:e0:0c:02:03:fd
>>>
>>> Hit any key to stop autoboot:  0
>>> =>
>>> => help usb
>>> usb - USB sub-system
>>>
>>> Usage:
>>> usb reset - reset (rescan) USB controller
>>> usb stop [f]  - stop USB [f]=force stop
>>> usb tree  - show USB device tree
>>> usb info [dev] - show available USB devices
>>> usb storage  - show details of USB storage devices
>>> usb dev [dev] - show or set current USB storage device
>>> usb part [dev] - print partition table of one or all USB 
>>>   
>> storage devices
>> 
>>> usb read addr blk# cnt - read `cnt' blocks starting at block `blk#'
>>> to memory address `addr'
>>> => usb start
>>> (Re)start USB...
>>> USB:   Register 10011 NbrPorts 1
>>> USB EHCI 1.00
>>> scanning bus for devices... 2 USB Device(s) found
>>>scanning bus for storage devices... 1 Storage Device(s) found
>>> => usb info
>>> 1: Hub,  USB Revision 2.0
>>>  - u-boot EHCI Host Controller
>>>  - Class: Hub
>>>  - PacketSize: 64  Configurations: 1
>>>  - Vendor: 0x  Product 0x Version 1.0
>>>Configuration: 1
>>>- Interfaces: 1 Self Powered 0mA
>>>  Interface: 0
>>>  - Alternate Setting 0, Endpoints: 1
>>>  - Class Hub
>>>  - Endpoint 1 In Interrupt MaxPacket 2048 Interval 0ms
>>>
>>> 2: Mass Storage,  USB Revision 2.0
>>>  - SanDisk U3 Cruzer Micro 0774700CB28059E2
>>>  - Class: (from Interface) Mass Storage
>>>  - PacketSize: 64  Configurations: 1
>>>  - Vendor: 0x0781  Product 0x5406 Version 2.0
>>>Configuration: 1
>>>- Interfaces: 1 Bus Powered 200mA
>>>  Interface: 0
>>>  - Alternate Setting 0, E

Re: [U-Boot] [PATCH] Enable usb ehci support for p2020ds board

2009-09-14 Thread Zang Roy-R61911
 

> -Original Message-
> From: Felix Radensky [mailto:fe...@embedded-sol.com] 
> Sent: Monday, September 14, 2009 16:16 PM
> To: Zang Roy-R61911
> Cc: U-Boot-Denx; Kumar Gala; Zhang Junjie-B18070
> Subject: Re: [U-Boot] [PATCH] Enable usb ehci support for 
> p2020ds board
> 
> Zang Roy-R61911 wrote:
> >  
> >
> >   
> >> -Original Message-
> >> From: Felix Radensky [mailto:fe...@embedded-sol.com] 
> >> Sent: Monday, September 14, 2009 15:50 PM
> >> To: Zang Roy-R61911
> >> Cc: U-Boot-Denx; Kumar Gala; Zhang Junjie-B18070
> >> Subject: Re: [U-Boot] [PATCH] Enable usb ehci support for 
> >> p2020ds board
> >>
> >> Hi,
> >>
> >> Zang Roy-R61911 wrote:
> >> 
> >>>  
> >>>
> >>>   
> >>>   
>  -Original Message-
>  From: Felix Radensky [mailto:fe...@embedded-sol.com] 
>  Sent: Sunday, September 13, 2009 17:19 PM
>  To: Zang Roy-R61911
>  Cc: U-Boot-Denx; Kumar Gala
>  Subject: Re: [U-Boot] [PATCH] Enable usb ehci support for 
>  p2020ds board
> 
>  Hi, Roy
> 
>  Does this mean that USB mass storage devices are actually
>  usable on P2020DS ? 
>  
>  
> >>> Yes, it works.
> >>>
> >>>   
> >>>   
>  Similar patch for MPC8536DS was
>  added during 2008.08 merge window, but USB mass storage
>  devices are not recognized by u-boot.
>  
>  
> >>> Why? I do not try on 8536DS, but I think it should work. 
> >>>   
> >> The same ip and
> >> 
> >>> the same code :-).
> >>>
> >>>   
> >>>   
>  Since I don't see any FSL
>  ehici driver changes, I suspect situation may be similar on
>  P2020DS.
>  
>  
> >>> P2020DS and 8536DS should use the same driver. it works. 
> >>> user ext2 command  to opertate usb interface.
> >>>
> >>> My log here on P2020:
> >>>
> >>> U-Boot 2009.08-00126-g0fc8f56-dirty (Sep 09 2009 - 18:00:43)
> >>>
> >>> CPU0:  P2020E, Version: 1.0, (0x80ea0010)
> >>> Core:  E500, Version: 4.0, (0x80211040)
> >>> Clock Configuration:
> >>>CPU0:1199.988 MHz, CPU1:1199.988 MHz,
> >>>CCB:599.994 MHz,
> >>>DDR:333.330 MHz (666.660 MT/s data rate) (Asynchronous),
> >>> LBC:37.500 MHz
> >>> L1:D-cache 32 kB enabled
> >>>I-cache 32 kB enabled
> >>> Board: P2020DS Sys ID: 0x16, Sys Ver: 0x02, FPGA Ver: 
> 0x03, vBank: 0
> >>> I2C:   ready
> >>> DRAM:  InitializingDDR:  1 GB
> >>> FLASH: 128 MB
> >>> L2:512 KB enabled
> >>> NAND:  No NAND device found!!!
> >>> No NAND device found!!!
> >>> No NAND device found!!!
> >>> 2048 MiB
> >>> *** Warning - bad CRC, using default environment
> >>>
> >>> EEPROM: NXID v0
> >>>
> >>> PCIE2 connected to ULI as Root Complex (base addr ffe09000)
> >>>Scanning PCI bus 01
> >>> 02  11  8086  100f  0200  00
> >>> 02  1c  10b9  5237  0c03  00
> >>> 02  1c  10b9  5237  0c03  00
> >>> 02  1c  10b9  5237  0c03  00
> >>> 02  1c  10b9  5239  0c03  00
> >>> 02  1e  10b9  1575  0601  00
> >>> 02  1e  10b9  7101  0680  00
> >>> 02  1f  10b9  5229  0101  00
> >>> 02  1f  10b9  5288  0101  00
> >>> 01  00  10b9  5249  0604  00
> >>> PCIE2 on bus 00 - 02
> >>>
> >>> PCIE3 connected to Slot 1 as Root Complex (base addr ffe08000)
> >>> PCIE3 on bus 03 - 03
> >>>
> >>> PCIE1 connected to Slot 2 as Root Complex (base addr ffe0a000)
> >>> PCIE1 on bus 04 - 04
> >>> Video: No radeon video card found!
> >>> In:serial
> >>> Out:   serial
> >>> Err:   serial
> >>> SCSI:  AHCI 0001. 32 slots 4 ports 3 Gbps 0xf impl IDE mode
> >>> flags: ncq ilck pm led clo pmp pio slum part
> >>> scanning bus for devices...
> >>> Net:   e1000: 00:07:e9:14:4d:e3
> >>> eTSEC1, eTSEC2, eTSEC3, e1000#0
> >>> Warning: e1000#0 MAC addresses don't match:
> >>> Address in SROM is 00:07:e9:14:4d:e3
> >>> Address in environment is  00:e0:0c:02:03:fd
> >>>
> >>> Hit any key to stop autoboot:  0
> >>> =>
> >>> => help usb
> >>> usb - USB sub-system
> >>>
> >>> Usage:
> >>> usb reset - reset (rescan) USB controller
> >>> usb stop [f]  - stop USB [f]=force stop
> >>> usb tree  - show USB device tree
> >>> usb info [dev] - show available USB devices
> >>> usb storage  - show details of USB storage devices
> >>> usb dev [dev] - show or set current USB storage device
> >>> usb part [dev] - print partition table of one or all USB 
> >>>   
> >> storage devices
> >> 
> >>> usb read addr blk# cnt - read `cnt' blocks starting at 
> block `blk#'
> >>> to memory address `addr'
> >>> => usb start
> >>> (Re)start USB...
> >>> USB:   Register 10011 NbrPorts 1
> >>> USB EHCI 1.00
> >>> scanning bus for devices... 2 USB Device(s) found
> >>>scanning bus for storage devices... 1 Storage 
> Device(s) found
> >>> => usb info
> >>> 1: Hub,  USB Revision 2.0
> >>>  - u-boot EHCI Host Controller
> >>>  - Class: Hub
> >>>  - PacketSize: 64  Configurations: 1
> >>>  - Vendor: 0x  

Re: [U-Boot] [PATCH, RFC] Make arm926ejs use -march=armv5t to avoid problems with EABI

2009-09-14 Thread Simon Kagstrom
On Fri, 4 Sep 2009 11:27:19 +0200
Simon Kagstrom  wrote:

> Make arm926ejs use -march=armv5t to avoid problems with EABI
> 
> Using -march=armv5t instead of armv5te allows Marvell Kirkwood-based
> boards to boot with the EABI changes introduced in commit
> f772acf8a584067033eff1e231fcd1fb3a00d3d9

Well, further testing (with ubifs) has shown that this doesn't actually
solve the problem - only making it disappear for some cases.

So don't apply this patch for now.

// Simon

> diff --git a/cpu/arm926ejs/config.mk b/cpu/arm926ejs/config.mk
> index 90eb3c0..94f1c17 100644
> --- a/cpu/arm926ejs/config.mk
> +++ b/cpu/arm926ejs/config.mk
> @@ -24,7 +24,7 @@
>  PLATFORM_RELFLAGS += -fno-strict-aliasing  -fno-common -ffixed-r8 \
>   -msoft-float
>  
> -PLATFORM_CPPFLAGS += -march=armv5te
> +PLATFORM_CPPFLAGS += -march=armv5t

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


Re: [U-Boot] Interrupts in uboot with ARM AT91SAM9 (V2)

2009-09-14 Thread Manuel Sahm
Hello,
 
I´ve already inserted the following code:
 
In at91sam9g20ek.c:
 
void thread_test(void)
{
 printf("RESET via INT\n");
}
 
in function :static void at91sam9g20ek_macb_hw_init (void)
{
...
 
at91_sys_write(AT91_RSTC_MR, AT91_RSTC_KEY | AT91_RSTC_URSTIEN);
// Reset Bit AT91_RSTC_URSTS
at91_sys_read(AT91_RSTC_SR); 
 
at91_sys_write(AT91_PMC_PCER, 1 << AT91_ID_SYS);
at91_sys_write(AT91_AIC_IDCR, 0x01 << AT91_ID_SYS);
at91_sys_write(AT91_AIC_SVR(AT91_ID_SYS), (unsigned int)thread_test);
at91_sys_write(AT91_AIC_SMR(AT91_ID_SYS), 5 | AT91_AIC_SRCTYPE_LOW);
at91_sys_write(AT91_AIC_ICCR, 0x01 << AT91_ID_SYS);
at91_sys_write(AT91_AIC_IECR, 0x01 << AT91_ID_SYS);
 
.
}
 

 if I trigger my interrupt - the system hangsnothing is printed on
screen and I cańt enter anything in the prompt ?
 
Anything else that I have to add ???
 
Thanks very much...
Manuel
 

>>> Jean-Christophe PLAGNIOL-VILLARD  05.09.2009
02:49 >>>
On 10:31 Thu 03 Sep , Manuel Sahm wrote:
> Hello,
>  
> I have to use interrupts in UBoot 1.3.4 - how could I enable them ?
>  
> I have an AT91SAM9G20 - in ist header file I enable CONFIG_USE_IRQ
und
> uncomment the lines#ifdefc CONFIG_USE_IRQ #error  #endif.
> I inserted the lines:
> #define CONFIG_STACKSIZE_IRQ (4*1024)
> #define CONFIG_STACKSIZE_FIQ (4*1024)
>  
> 
> In the file (/lib_amr/interrupts.c) I have to insert a function
called
> do_irq().
> I inserted:
>  
> void do_irq(struct pt_regs* pt_regs)
> {
>  printf("interrupt request\n");
>  show_regs(pt_regs);
>  bad_mode();
> }
>  
> When UBOOT starts all seems to be OK, but if I trigger my interrupt
-
> the system hangsnothing is printed on screen anmd I cańt enter
> anything in the prompt ?
>  
> Could you please help me ?
you need to clear the interrupt and add the at91 interrupt controller
to use it
 
Best Regards,
J.
___
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] [PATCH] ppc4xx: Consolidate get_OPB_freq()

2009-09-14 Thread Stefan Roese
All 4xx variants had their own, mostly identical get_OPB_freq()
function. Some variants even only had the OPB frequency calculated
in this routine and not supplied the sys_info.freqOPB variable
correctly (e.g. 405EZ). This resulted in incorrect OPB values passed
via the FDT to Linux.

This patch now removes all those copies and only uses one function
for all 4xx variants (except for IOP480 which doesn't have an OPB).

Signed-off-by: Stefan Roese 
---
 cpu/ppc4xx/speed.c |   90 +---
 1 files changed, 15 insertions(+), 75 deletions(-)

diff --git a/cpu/ppc4xx/speed.c b/cpu/ppc4xx/speed.c
index 9c4bc09..988ba97 100644
--- a/cpu/ppc4xx/speed.c
+++ b/cpu/ppc4xx/speed.c
@@ -165,30 +165,13 @@ void get_sys_info (PPC4xx_SYS_INFO * sysInfo)
}
}
 
+   sysInfo->freqOPB = sysInfo->freqPLB / sysInfo->pllOpbDiv;
sysInfo->freqEBC = sysInfo->freqPLB / sysInfo->pllExtBusDiv;
-
sysInfo->freqUART = sysInfo->freqProcessor;
 }
 
 
 /
- * get_OPB_freq
- * return OPB bus freq in Hz
- */
-ulong get_OPB_freq (void)
-{
-   ulong val = 0;
-
-   PPC4xx_SYS_INFO sys_info;
-
-   get_sys_info (&sys_info);
-   val = sys_info.freqPLB / sys_info.pllOpbDiv;
-
-   return val;
-}
-
-
-/
  * get_PCI_freq
  * return PCI bus freq in Hz
  */
@@ -752,14 +735,6 @@ unsigned long determine_pci_clock_per(void)
 }
 #endif
 
-ulong get_OPB_freq (void)
-{
-
-   sys_info_t sys_info;
-   get_sys_info (&sys_info);
-   return sys_info.freqOPB;
-}
-
 #elif defined(CONFIG_XILINX_405)
 extern void get_sys_info (sys_info_t * sysInfo);
 extern ulong get_PCI_freq (void);
@@ -875,23 +850,6 @@ void get_sys_info (PPC4xx_SYS_INFO * sysInfo)
 
 
 /
- * get_OPB_freq
- * return OPB bus freq in Hz
- */
-ulong get_OPB_freq (void)
-{
-   ulong val = 0;
-
-   PPC4xx_SYS_INFO sys_info;
-
-   get_sys_info (&sys_info);
-   val = sys_info.freqPLB / sys_info.pllOpbDiv;
-
-   return val;
-}
-
-
-/
  * get_PCI_freq
  * return PCI bus freq in Hz
  */
@@ -997,6 +955,9 @@ void get_sys_info (PPC4xx_SYS_INFO * sysInfo)
sysInfo->freqPLB = (CONFIG_SYS_CLK_FREQ * m) /
sysInfo->pllFwdDiv / sysInfo->pllPlbDiv;
 
+   sysInfo->freqOPB = (CONFIG_SYS_CLK_FREQ * sysInfo->pllFbkDiv) /
+   sysInfo->pllOpbDiv;
+
sysInfo->freqEBC = (CONFIG_SYS_CLK_FREQ * sysInfo->pllFbkDiv) /
sysInfo->pllExtBusDiv;
 
@@ -1006,22 +967,6 @@ void get_sys_info (PPC4xx_SYS_INFO * sysInfo)
sysInfo->freqUART = plloutb;
 }
 
-/
- * get_OPB_freq
- * return OPB bus freq in Hz
- */
-ulong get_OPB_freq (void)
-{
-   ulong val = 0;
-
-   PPC4xx_SYS_INFO sys_info;
-
-   get_sys_info (&sys_info);
-   val = (CONFIG_SYS_CLK_FREQ * sys_info.pllFbkDiv) / sys_info.pllOpbDiv;
-
-   return val;
-}
-
 #elif defined(CONFIG_405EX)
 
 /*
@@ -1168,22 +1113,6 @@ void get_sys_info (sys_info_t * sysInfo)
sysInfo->freqUART = sysInfo->freqPLB;
 }
 
-/
- * get_OPB_freq
- * return OPB bus freq in Hz
- */
-ulong get_OPB_freq (void)
-{
-   ulong val = 0;
-
-   PPC4xx_SYS_INFO sys_info;
-
-   get_sys_info (&sys_info);
-   val = sys_info.freqPLB / sys_info.pllOpbDiv;
-
-   return val;
-}
-
 #endif
 
 int get_clocks (void)
@@ -1235,3 +1164,14 @@ ulong get_bus_freq (ulong dummy)
 
return val;
 }
+
+#if !defined(CONFIG_IOP480)
+ulong get_OPB_freq (void)
+{
+   PPC4xx_SYS_INFO sys_info;
+
+   get_sys_info (&sys_info);
+
+   return sys_info.freqOPB;
+}
+#endif
-- 
1.6.4.3

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


Re: [U-Boot] [PATCH v2 1/2] mkconfig: split the board make target to multiple config targets

2009-09-14 Thread Michal Simek


Wolfgang Denk wrote:
> Dear Mingkai Hu,
> 
> In message <1252466603-25103-1-git-send-email-mingkai...@freescale.com> you 
> wrote:
>> To simplify the top level makefile it useful to be able to parse
>> the top level makefile target to multiple individual target, then
>> put them to the config.h, leave the board config file to handle
>> the different targets.
>>
>> Note that this method uses the '_'(underline) as the delimiter when
>> splits the board make target.
>>
>> Signed-off-by: Mingkai Hu 
>> ---
>>
>> According to the comments from Wolfgang and Scott, I modified
>> the patch and made some modification over v1:
>>
>>  - remove the sectence thats puts the splited variables to the
>>config.mk, we can use the CONFIG_MK_* in the board config file
>>to override the variable in the board config file.
>>
>>  - change CONFIG_OPT_* to CONFIG_MK_*
>>
>>  mkconfig |7 +++
>>  1 files changed, 7 insertions(+), 0 deletions(-)
> 
> Arghhh... It seems this patch has not been well tested. Obviously
> never ever ran a MAKEALL over all PPC boards. It causes tons of
> messages like that:
> 
> include/config.h:2:25: warning: missing whitespace after the macro name
> 
> This patch breaks building for a number of boards / configurations,
> especially:
> 
> xilinx-ppc405-generic_flash
> xilinx-ppc405-generic
> xilinx-ppc440-generic_flash
> xilinx-ppc440-generic
> VoVPN-GW_66MHz
> VoVPN-GW_100MHz
> EB+MCF-EV123
> EB+MCF-EV123_internal
> microblaze-generic

I can confirm problem on Microblaze.

Please revert that patches.

Thanks,
Michal


> favr-32-ezkit
> 
> 
> Shall I revert that patch?
> 
> Best regards,
> 
> Wolfgang Denk
> 

-- 
Michal Simek, Ing. (M.Eng)
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/
Microblaze U-BOOT custodian
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] Microblaze Pull Request

2009-09-14 Thread Michal Simek
Hi Wolfgang,

I decided to remove ll_temac driver from master branch.
He has a lot of work and I want to clean other u-boot stuff.

Ben: LL-temac driver in in net branch please add it to your net branch.

There are some important patches:
1. Removing Suzaku board
2. Remove old emac driver
3. Cleanup license for emaclite
+ some minor patches.

Thanks for pulling that changes,
Michal


The following changes since commit e7963772eb78a6aa1fa65063d64eab3a8626daac:
  Marcel Ziswiler (1):
muas3001: remove BRG clock node fixup to use common mpc8260 code.

are available in the git repository at:

  git://www.denx.de/git/u-boot-microblaze.git master

Michal Simek (6):
  microblaze: Add sbss, scommon and COMMON symbols for clearing
  microblaze: Short size of global data and fix malloc size
  net: Remove old Xilinx Emac driver
  microblaze: Remove AtmarkTechno Suzaku board
  microblaze: Enable hush parser
  net: emaclite: Cleanup license to be GPL compatible

 MAINTAINERS|4 -
 MAKEALL|1 -
 Makefile   |5 -
 board/AtmarkTechno/suzaku/Makefile |   44 ---
 board/AtmarkTechno/suzaku/config.mk|   29 --
 board/AtmarkTechno/suzaku/flash.c  |   46 ---
 board/AtmarkTechno/suzaku/suzaku.c |   32 --
 board/AtmarkTechno/suzaku/u-boot.lds   |   68 
 board/xilinx/microblaze-generic/u-boot.lds |3 +
 drivers/net/Makefile   |1 -
 drivers/net/xilinx_emac.c  |  464 
 drivers/net/xilinx_emaclite.c  |   39 ++--
 include/configs/microblaze-generic.h   |   17 +-
 include/configs/suzaku.h   |  110 ---
 14 files changed, 33 insertions(+), 830 deletions(-)
 delete mode 100644 board/AtmarkTechno/suzaku/Makefile
 delete mode 100644 board/AtmarkTechno/suzaku/config.mk
 delete mode 100644 board/AtmarkTechno/suzaku/flash.c
 delete mode 100644 board/AtmarkTechno/suzaku/suzaku.c
 delete mode 100644 board/AtmarkTechno/suzaku/u-boot.lds
 delete mode 100644 drivers/net/xilinx_emac.c
 delete mode 100644 include/configs/suzaku.h


-- 
Michal Simek, Ing. (M.Eng)
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/
Microblaze U-BOOT custodian
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCHv2 2/2] mucmc52, uc101: delete a...@3a00 node, if no CF card is detected

2009-09-14 Thread Detlev Zundel
Hi Heiko,

> U-Boot can detect, if a ide device is present or not.
> If not and this new config option is activated, u-boot
> removes the ata node from the DTS before booting Linux,
> so the Linux IDE driver didn;t crashs, when probing the
  does not crash

The same below in the actual README.


[...]

> diff --git a/README b/README

[...]

> + so the Linux IDE driver didn;t crashs, when probing the

Here.

Cheers
  Detlev

-- 
Who is General Failure and why is he reading my hard disk?
--
DENX Software Engineering GmbH,  MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: d...@denx.de
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] fsl_i2c: increase I2C timeout values and make them configurable

2009-09-14 Thread Detlev Zundel
Hi Timur,

> Joakim Tjernlund wrote:
>
>> This will generate the same divisor tables as AN2919, tables 6-9.
>> I do not take condition 2 into consideration as it not clear how to
>> deal with it and it does not seem to have an significant impact.
>> 
>> What do you think?
>
> I really don't have time to deal with it right now.  Sorry.

Wolfgang (I put him on CC) was the last to propose such an algorithm
IIRC.  So maybe he has an opinion?

Thanks
  Detlev

-- 
Some people seem to think that C is a real programming language, but they are
sadly mistaken.  It really is about writing almost-portable assembly language
[...]   -- Linus Torvalds 10404265599082718160nore...@blogger.com
--
DENX Software Engineering GmbH,  MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: d...@denx.de
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCHv3 1/2] mpc5200, mucmc52, uc101: config cleanup

2009-09-14 Thread Detlev Zundel
Hi Heiko,

> - as this boards are similiar, collect common config option
>   in manroland/common.h and manroland/mpc52xx-common.h
>   for mpc5200 specific common options for this manufacturer.
> - add OF support
> - update default environment
>
> Signed-off-by: Heiko Schocher 

Acked-by: Detlev Zundel 

Thanks
  Detlev

-- 
Some people seem to think that C is a real programming language, but they are
sadly mistaken.  It really is about writing almost-portable assembly language
[...]   -- Linus Torvalds 10404265599082718160nore...@blogger.com
--
DENX Software Engineering GmbH,  MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: d...@denx.de
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] fsl_i2c: increase I2C timeout values and make them configurable

2009-09-14 Thread Wolfgang Grandegger
Detlev Zundel wrote:
> Hi Timur,
> 
>> Joakim Tjernlund wrote:
>>
>>> This will generate the same divisor tables as AN2919, tables 6-9.
>>> I do not take condition 2 into consideration as it not clear how to
>>> deal with it and it does not seem to have an significant impact.
>>>
>>> What do you think?
>> I really don't have time to deal with it right now.  Sorry.
> 
> Wolfgang (I put him on CC) was the last to propose such an algorithm
> IIRC.  So maybe he has an opinion?

I did not follow the thread yet, sorry. I implemented AN2819 for Linux
(see http://lxr.linux.no/#linux+v2.6.31/drivers/i2c/busses/i2c-mpc.c)
some time ago using Timur's table approach. But there is no difference
between the table and the algorithm to calculate the value. The table is
actually derived from the same algorithm.

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


Re: [U-Boot] fsl_i2c: increase I2C timeout values and make them configurable

2009-09-14 Thread Timur Tabi
Wolfgang Grandegger wrote:

> I did not follow the thread yet, sorry. I implemented AN2819 for Linux
> (see http://lxr.linux.no/#linux+v2.6.31/drivers/i2c/busses/i2c-mpc.c)
> some time ago using Timur's table approach. But there is no difference
> between the table and the algorithm to calculate the value. The table is
> actually derived from the same algorithm.

The problem with the table is that it does not allow for flexibility in 
choosing dfsr.  When I implemented the table code, I did not think that this 
was a problem, but apparently it is.

-- 
Timur Tabi
Linux kernel developer at Freescale
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v4 2/2] mucmc52, uc101: delete a...@3a00 node, if no CF card is detected

2009-09-14 Thread Stefan Roese
Hi Heiko,

and another nitpicking comment below:

On Monday 14 September 2009 17:06:46 Heiko Schocher wrote:



> diff --git a/cpu/mpc5xxx/cpu.c b/cpu/mpc5xxx/cpu.c
> index f6258c7..a2fc323 100644
> --- a/cpu/mpc5xxx/cpu.c
> +++ b/cpu/mpc5xxx/cpu.c
> @@ -125,6 +125,9 @@ void ft_cpu_setup(void *blob, bd_t *bd)
>   uchar enetaddr[6];
>   char * eth_path = "/" OF_SOC "/ether...@3000";
>  #endif
> +#if defined(CONFIG_OF_IDE_FIXUP)
> + extern block_dev_desc_t ide_dev_desc[CONFIG_SYS_IDE_MAXDEVICE];
> +#endif
> 
>   do_fixup_by_path_u32(blob, cpu_path, "timebase-frequency", OF_TBCLK, 1);
>   do_fixup_by_path_u32(blob, cpu_path, "bus-frequency", bd->bi_busfreq, 
> 1);
> @@ -137,6 +140,21 @@ void ft_cpu_setup(void *blob, bd_t *bd)
>   do_fixup_by_path(blob, eth_path, "mac-address", enetaddr, 6, 0);
>   do_fixup_by_path(blob, eth_path, "local-mac-address", enetaddr, 6, 0);
>  #endif
> +#if defined(CONFIG_OF_IDE_FIXUP)
> + if (ide_dev_desc[0].type == DEV_TYPE_UNKNOWN) {
> + /* NO CF card detected -> delete ata node in DTS */
> + int nodeoffset = 0;
> + char nodename[] = "/soc5...@f000/a...@3a00";
> +
> + nodeoffset = fdt_path_offset (blob, nodename);

Please use consistent styles in one file, in this case func() without a space 
before the "(".

Thanks.

Cheers,
Stefan

--
DENX Software Engineering GmbH,  MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: off...@denx.de
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] OMAP3 Overo: Fix ethernet related warnings

2009-09-14 Thread Paulraj, Sandeep


> 
> Fix warning
> 
> 'setup_net_chip' declared 'static' but never defined
> 
> with CONFIG_OMAP3_OVERO_TOBI disabled and
> 
> implicit declaration of function 'smc911x_initialize'
> 
> with CONFIG_OMAP3_OVERO_TOBI enabled.
> 
> Signed-off-by: Dirk Behme 
> 

Pushed to u-boot-ti

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


Re: [U-Boot] [PATCH v4 2/2] mucmc52, uc101: delete a...@3a00 node, if no CF card is detected

2009-09-14 Thread Heiko Schocher
Hello Jerry,

Jerry Van Baren wrote:
> Heiko Schocher wrote:
>> U-Boot can detect, if a ide device is present or not.
>> If not and this new config option is activated, u-boot
>> removes the ata node from the DTS before booting Linux,
>> so the Linux IDE driver does not crash, when probing the
>> device. This is needed for buggy hardware (uc101) where
>> no pull down resistor is connected to the signal IDE5V_DD7.
> 
> Nitpicking your commit comment...
> 
> U-Boot can detect if an IDE device is present or not.
> If not, and this new config option is activated, U-Boot
> removes the ATA node from the DTS before booting Linux
> so the Linux IDE driver does not probe the device and
> crash. This is needed for buggy hardware (uc101) where
> no pull down resistor is connected to the signal IDE5V_DD7.

Fixed, thanks!

bye
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] configure ppc440spe as pci adapter

2009-09-14 Thread dbrazeau

Yes, I do mean PCIe.  Sorry should have mentioned that.

wd wrote:
> 
> Dear dbrazeau,
> 
> In message <25389144.p...@talk.nabble.com> you wrote:
>> 
>> I'm trying to get my ppc440spe (Katmai) board to initialize in PCI
>> adapter
>> mode.  I was hoping that someone could give me some pointers on what
>> changes
> 
> You are really talking about the PCI-X port on the Katmai board, are
> you? You don't by any chance mean PCIe?
> 
> 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
> Never underestimate the bandwidth of a station wagon full of tapes.
> -- Dr. Warren Jackson, Director, UTCS
> ___
> U-Boot mailing list
> U-Boot@lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
> 
> 

-- 
View this message in context: 
http://www.nabble.com/configure-ppc440spe-as-pci-adapter-tp25389144p25438442.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] fsl_i2c: increase I2C timeout values and make them configurable

2009-09-14 Thread Joakim Tjernlund
>
> Wolfgang Grandegger wrote:
>
> > I did not follow the thread yet, sorry. I implemented AN2819 for Linux
> > (see http://lxr.linux.no/#linux+v2.6.31/drivers/i2c/busses/i2c-mpc.c)
> > some time ago using Timur's table approach. But there is no difference
> > between the table and the algorithm to calculate the value. The table is
> > actually derived from the same algorithm.
>
> The problem with the table is that it does not allow for flexibility in
> choosing dfsr.  When I implemented the table code, I did not think that this
> was a problem, but apparently it is.

Yes, it is a problem for us as our board is out of spec. The rise time is way 
off
spec. By trial and error with the DFSR/FDR I managed to get a stable connection.
What is less funny though is that I need to program FDR/DFSR differently
in u-boot resp. kernel. to make it work.
I suspect it is due to kernel being IRQ driven and has longer pause
between chars, but it is a guess.

In any case, the revised AN2819 dictates a different algorithm but I feel
it is a bit incomplete w.r.t Condition 2:

• Condition 2: B × T ≥ tI2CRM + 3 × C × T.
Given a suitable value of DFSR, chosen to satisfy Condition 1, this inequality 
must also be met to guarantee
that the SCL frequency matches the SCL frequency calculated by the divider 
equation. It is important to
note that tI2CRM is the measured rise time of the SCL signal, which is defined 
as the time for the signal to
rise from 10% to 70% of VCC.

  NOTE
   Note that the rise time must not exceed 300 nanoseconds and 
that the above
   two conditions must both be satisfied to ensure that the 
actual SCL
   frequency values align with the calculated values. By 
meeting these
   conditions, the measured SCL frequency will match the 
calculated
   frequency to within 5 kHz. Ignoring either of these 
conditions may result in
   larger discrepancies between these frequency values.

How important is Condition 2 and what to do with rise times > 300 ns? The MAX 
rise time
for 100 KHz is 1000 ns so there is a gap here.

My testing suggests that this is not important. Bigger DFSR, in my case 0x6 or 
0x10, is key
to get a stable I2C bus.

Jocke
PS.
Wolfgang, I sent a test program to calculate the new DFSR/FDR values in the 
thread, you
might find it useful if you are going to try out the new AN2819

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


Re: [U-Boot] fsl_i2c: increase I2C timeout values and make them configurable

2009-09-14 Thread Wolfgang Grandegger
Timur Tabi wrote:
> Wolfgang Grandegger wrote:
> 
>> I did not follow the thread yet, sorry. I implemented AN2819 for Linux
>> (see http://lxr.linux.no/#linux+v2.6.31/drivers/i2c/busses/i2c-mpc.c)
>> some time ago using Timur's table approach. But there is no difference
>> between the table and the algorithm to calculate the value. The table is
>> actually derived from the same algorithm.
> 
> The problem with the table is that it does not allow for flexibility in 
> choosing dfsr.  When I implemented the table code, I did not think that this 
> was a problem, but apparently it is.

What would be the criteria to choose dfsr, especially for a defined bus
frequency.

Wolfgang.


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


[U-Boot] about 88E1145

2009-09-14 Thread Zhe Wang
Hi all,

   Now I encoutered one problem about 88E1145 in Uboot. The CPU can access
88e1145 internel register correctly through SMI (PHY ID is correct), but the
ethernet connection does not work. I guess it is caused by not initializing
88e1145 correctly. So could anybody help provide one correct 88e1145
register initialization list? Thanks!

BR,

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


Re: [U-Boot] [PATCH v4 2/2] mucmc52, uc101: delete a...@3a00 node, if no CF card is detected

2009-09-14 Thread Stefan Roese
On Monday 14 September 2009 17:55:01 Heiko Schocher wrote:
> >>> Incorrect multi-line parentheses:
> >>>
> >>>   if (nodeoffset >= 0) {
> >>>   fdt_del_node(blob, nodeoffset);
> >>>   } else {
> >>>   printf("%s: cannot find %s node err:%s\n",
> >>>   __func__, nodename, fdt_strerror(nodeoffset));
> >>>   }
> >>
> >> if (nodeoffset >= 0)
> >> fdt_del_node(blob, nodeoffset);
> >> else
> >> printf("%s: cannot find %s node err:%s\n",
> >> __func__, nodename,
> >>  fdt_strerror(nodeoffset));
> >>
> >> Should be right, or?
> >
> > No. IIRC, then when one of the statements is a multi-line statement, both
> > statements of the if/else struct should have the parentheses.
> 
> I see only one statement in the if and the else case ...

Yes, but it spans over multiple (2) lines. So it's a multi-line statement. At 
least that's how I understand the coding-style docs.

Cheers,
Stefan

--
DENX Software Engineering GmbH,  MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: off...@denx.de
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v4 2/2] mucmc52, uc101: delete a...@3a00 node, if no CF card is detected

2009-09-14 Thread Heiko Schocher
Hello Stefan,

Stefan Roese wrote:
> On Monday 14 September 2009 17:55:01 Heiko Schocher wrote:
> Incorrect multi-line parentheses:
>
>   if (nodeoffset >= 0) {
>   fdt_del_node(blob, nodeoffset);
>   } else {
>   printf("%s: cannot find %s node err:%s\n",
>   __func__, nodename, fdt_strerror(nodeoffset));
>   }
 if (nodeoffset >= 0)
 fdt_del_node(blob, nodeoffset);
 else
 printf("%s: cannot find %s node err:%s\n",
 __func__, nodename,
  fdt_strerror(nodeoffset));

 Should be right, or?
>>> No. IIRC, then when one of the statements is a multi-line statement, both
>>> statements of the if/else struct should have the parentheses.
>> I see only one statement in the if and the else case ...
> 
> Yes, but it spans over multiple (2) lines. So it's a multi-line statement. At 
> least that's how I understand the coding-style docs.

Ah, okay, fixed it.

tschuess
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v4 2/2] mucmc52, uc101: delete a...@3a00 node, if no CF card is detected

2009-09-14 Thread Heiko Schocher
U-Boot can detect, if a ide device is present or not.
If not and this new config option is activated, u-boot
removes the ata node from the DTS before booting Linux,
so the Linux IDE driver does not crash, when probing the
device. This is needed for buggy hardware (uc101) where
no pull down resistor is connected to the signal IDE5V_DD7.

Signed-off-by: Heiko Schocher 
---

changes since v1:
- added comment from Wolfgang Denk, to move this to a more
  common place, so others can also use it, and made it
  therefore per CONFIG_OF_IDE_FIXUP selectable.

changes since v2:
- add CONFIG_OF_IDE_FIXUP to mpc5200-common.h

changes since v3
- correct spelling in README and commit message, as
  Detlev suggested

 README |9 +
 cpu/mpc5xxx/cpu.c  |   18 ++
 include/configs/manroland/mpc5200-common.h |1 +
 3 files changed, 28 insertions(+), 0 deletions(-)

diff --git a/README b/README
index ff4ed8b..191a122 100644
--- a/README
+++ b/README
@@ -386,6 +386,15 @@ The following options need to be configured:
This define fills in the correct boot CPU in the boot
param header, the default value is zero if undefined.

+   CONFIG_OF_IDE_FIXUP
+
+   U-Boot can detect, if a ide device is present or not.
+   If not and this config option is activated, u-boot
+   removes the ata node from the DTS before booting Linux,
+   so the Linux IDE driver does not crash, when probing the
+   device. This is needed for buggy hardware (uc101) where
+   no pull down resistor is connected to the signal IDE5V_DD7.
+
 - vxWorks boot parameters:

bootvx constructs a valid bootline using the following
diff --git a/cpu/mpc5xxx/cpu.c b/cpu/mpc5xxx/cpu.c
index f6258c7..a2fc323 100644
--- a/cpu/mpc5xxx/cpu.c
+++ b/cpu/mpc5xxx/cpu.c
@@ -125,6 +125,9 @@ void ft_cpu_setup(void *blob, bd_t *bd)
uchar enetaddr[6];
char * eth_path = "/" OF_SOC "/ether...@3000";
 #endif
+#if defined(CONFIG_OF_IDE_FIXUP)
+   extern block_dev_desc_t ide_dev_desc[CONFIG_SYS_IDE_MAXDEVICE];
+#endif

do_fixup_by_path_u32(blob, cpu_path, "timebase-frequency", OF_TBCLK, 1);
do_fixup_by_path_u32(blob, cpu_path, "bus-frequency", bd->bi_busfreq, 
1);
@@ -137,6 +140,21 @@ void ft_cpu_setup(void *blob, bd_t *bd)
do_fixup_by_path(blob, eth_path, "mac-address", enetaddr, 6, 0);
do_fixup_by_path(blob, eth_path, "local-mac-address", enetaddr, 6, 0);
 #endif
+#if defined(CONFIG_OF_IDE_FIXUP)
+   if (ide_dev_desc[0].type == DEV_TYPE_UNKNOWN) {
+   /* NO CF card detected -> delete ata node in DTS */
+   int nodeoffset = 0;
+   char nodename[] = "/soc5...@f000/a...@3a00";
+
+   nodeoffset = fdt_path_offset (blob, nodename);
+   if (nodeoffset >= 0) {
+   fdt_del_node(blob, nodeoffset);
+   } else
+   printf("%s: cannot find %s node err:%s\n",
+   __func__, nodename, fdt_strerror(nodeoffset));
+   }
+
+#endif
 }
 #endif

diff --git a/include/configs/manroland/mpc5200-common.h 
b/include/configs/manroland/mpc5200-common.h
index 2f092b1..b29ef9b 100644
--- a/include/configs/manroland/mpc5200-common.h
+++ b/include/configs/manroland/mpc5200-common.h
@@ -225,5 +225,6 @@
 #define OF_SOC "soc5...@f000"
 #define OF_TBCLK   (bd->bi_busfreq / 4)
 #define OF_STDOUT_PATH "/soc5...@f000/ser...@2000"
+#define CONFIG_OF_IDE_FIXUP

 #endif /* __MANROLAND_MPC52XX__COMMON_H */
-- 
1.6.0.6

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v4 2/2] mucmc52, uc101: delete a...@3a00 node, if no CF card is detected

2009-09-14 Thread Stefan Roese
On Monday 14 September 2009 17:26:45 Heiko Schocher wrote:
> >> +++ b/cpu/mpc5xxx/cpu.c
> >> @@ -125,6 +125,9 @@ void ft_cpu_setup(void *blob, bd_t *bd)
> >>uchar enetaddr[6];
> >>char * eth_path = "/" OF_SOC "/ether...@3000";
> >>  #endif
> >> +#if defined(CONFIG_OF_IDE_FIXUP)
> >> +  extern block_dev_desc_t ide_dev_desc[CONFIG_SYS_IDE_MAXDEVICE];
> >> +#endif
> >
> > Why do you declare this global variable inside of the function? Perhaps
> > it would be better to move this declaration into some header.
> 
> include/ide.h would be the right place for it I think, or?

Yes, I think so too.

> >>do_fixup_by_path_u32(blob, cpu_path, "timebase-frequency", OF_TBCLK,
> >> 1); do_fixup_by_path_u32(blob, cpu_path, "bus-frequency",
> >> bd->bi_busfreq, 1); @@ -137,6 +140,21 @@ void ft_cpu_setup(void *blob,
> >> bd_t *bd)
> >>do_fixup_by_path(blob, eth_path, "mac-address", enetaddr, 6, 0);
> >>do_fixup_by_path(blob, eth_path, "local-mac-address", enetaddr, 6, 0);
> >>  #endif
> >> +#if defined(CONFIG_OF_IDE_FIXUP)
> >> +  if (ide_dev_desc[0].type == DEV_TYPE_UNKNOWN) {
> >> +  /* NO CF card detected -> delete ata node in DTS */
> >> +  int nodeoffset = 0;
> >> +  char nodename[] = "/soc5...@f000/a...@3a00";
> >> +
> >> +  nodeoffset = fdt_path_offset (blob, nodename);
> >> +  if (nodeoffset >= 0) {
> >> +  fdt_del_node(blob, nodeoffset);
> >> +  } else
> >> +  printf("%s: cannot find %s node err:%s\n",
> >> +  __func__, nodename, fdt_strerror(nodeoffset));
> >
> > Incorrect multi-line parentheses:
> >
> > if (nodeoffset >= 0) {
> > fdt_del_node(blob, nodeoffset);
> > } else {
> > printf("%s: cannot find %s node err:%s\n",
> > __func__, nodename, fdt_strerror(nodeoffset));
> > }
> 
> if (nodeoffset >= 0)
> fdt_del_node(blob, nodeoffset);
> else
> printf("%s: cannot find %s node err:%s\n",
> __func__, nodename,
>  fdt_strerror(nodeoffset));
> 
> Should be right, or?

No. IIRC, then when one of the statements is a multi-line statement, both 
statements of the if/else struct should have the parentheses.

Cheers,
Stefan

--
DENX Software Engineering GmbH,  MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: off...@denx.de
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v4 2/2] mucmc52, uc101: delete a...@3a00 node, if no CF card is detected

2009-09-14 Thread Heiko Schocher
Hello Stefan,

Stefan Roese wrote:
> Hi Heiko,
> 
> and another nitpicking comment below:
> 
> On Monday 14 September 2009 17:06:46 Heiko Schocher wrote:
> 
> 
> 
>> diff --git a/cpu/mpc5xxx/cpu.c b/cpu/mpc5xxx/cpu.c
>> index f6258c7..a2fc323 100644
>> --- a/cpu/mpc5xxx/cpu.c
>> +++ b/cpu/mpc5xxx/cpu.c
>> @@ -125,6 +125,9 @@ void ft_cpu_setup(void *blob, bd_t *bd)
>>  uchar enetaddr[6];
>>  char * eth_path = "/" OF_SOC "/ether...@3000";
>>  #endif
>> +#if defined(CONFIG_OF_IDE_FIXUP)
>> +extern block_dev_desc_t ide_dev_desc[CONFIG_SYS_IDE_MAXDEVICE];
>> +#endif
>>
>>  do_fixup_by_path_u32(blob, cpu_path, "timebase-frequency", OF_TBCLK, 1);
>>  do_fixup_by_path_u32(blob, cpu_path, "bus-frequency", bd->bi_busfreq, 
>> 1);
>> @@ -137,6 +140,21 @@ void ft_cpu_setup(void *blob, bd_t *bd)
>>  do_fixup_by_path(blob, eth_path, "mac-address", enetaddr, 6, 0);
>>  do_fixup_by_path(blob, eth_path, "local-mac-address", enetaddr, 6, 0);
>>  #endif
>> +#if defined(CONFIG_OF_IDE_FIXUP)
>> +if (ide_dev_desc[0].type == DEV_TYPE_UNKNOWN) {
>> +/* NO CF card detected -> delete ata node in DTS */
>> +int nodeoffset = 0;
>> +char nodename[] = "/soc5...@f000/a...@3a00";
>> +
>> +nodeoffset = fdt_path_offset (blob, nodename);
> 
> Please use consistent styles in one file, in this case func() without a space 
> before the "(".

Fixed, thanks.

bye
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] Your e-mail address has won:US$1,200,000.00

2009-09-14 Thread Euro-Millions International
新しいメールアドレスをお知らせします新しいメールアドレス: microsoftinternationalorgniz...@yahoo.co.jp

Your email address has been selected as one of the winners of US$1,200,000.00 
from the Euro Millions lotto draws held in Japan on 12/09/09  with Lucky 
#:416172029. reply for more details for your prize 
email:richardsadamsresultoff...@yahoo.co.jp with your official details,Thanks 
Ms.Yu Chin

- Euro-Millions International

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


Re: [U-Boot] [PATCH v4 2/2] mucmc52, uc101: delete a...@3a00 node, if no CF card is detected

2009-09-14 Thread Jerry Van Baren
Heiko Schocher wrote:
> U-Boot can detect, if a ide device is present or not.
> If not and this new config option is activated, u-boot
> removes the ata node from the DTS before booting Linux,
> so the Linux IDE driver does not crash, when probing the
> device. This is needed for buggy hardware (uc101) where
> no pull down resistor is connected to the signal IDE5V_DD7.

Nitpicking your commit comment...

U-Boot can detect if an IDE device is present or not.
If not, and this new config option is activated, U-Boot
removes the ATA node from the DTS before booting Linux
so the Linux IDE driver does not probe the device and
crash. This is needed for buggy hardware (uc101) where
no pull down resistor is connected to the signal IDE5V_DD7.

Thanks,
gvb

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


Re: [U-Boot] fsl_i2c: increase I2C timeout values and make them configurable

2009-09-14 Thread Joakim Tjernlund
>
> Timur Tabi wrote:
> > Wolfgang Grandegger wrote:
> >
> >> I did not follow the thread yet, sorry. I implemented AN2819 for Linux
> >> (see http://lxr.linux.no/#linux+v2.6.31/drivers/i2c/busses/i2c-mpc.c)
> >> some time ago using Timur's table approach. But there is no difference
> >> between the table and the algorithm to calculate the value. The table is
> >> actually derived from the same algorithm.
> >
> > The problem with the table is that it does not allow for flexibility in
> choosing dfsr.  When I implemented the table code, I did not think that this
> was a problem, but apparently it is.
>
> What would be the criteria to choose dfsr, especially for a defined bus
> frequency.

It is in the new AN2919:
   • Condition 1: C ≤ 50 ÷ T.
This means that the product of the decimal equivalent of the value in the DFSR 
and the source clock period
must not exceed 50 ns. Thus, given a specific source clock period, the value in 
the DFSR must not be so
high that it violates this condition.

I just compared the u-boot fsl-i2c.c driver with the kernel one and I think 
u-boot is buggy.
One cannot disable I2C directly after a read/write of last byte. There has to 
be some time
for the controller to generate STOP.
There are other differences too that I am not sure if they are significant or 
not.

  Jocke

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


Re: [U-Boot] [PATCH v4 2/2] mucmc52, uc101: delete a...@3a00 node, if no CF card is detected

2009-09-14 Thread Heiko Schocher
Hello Stefan,

Stefan Roese wrote:
> Hi Heiko,
> 
> sorry for the late review, but I just noticed some minor issues.

No problem, thanks for reviewing.

> On Monday 14 September 2009 17:06:46 Heiko Schocher wrote:
>> U-Boot can detect, if a ide device is present or not.
>> If not and this new config option is activated, u-boot
>> removes the ata node from the DTS before booting Linux,
>> so the Linux IDE driver does not crash, when probing the
>> device. This is needed for buggy hardware (uc101) where
>> no pull down resistor is connected to the signal IDE5V_DD7.
>>
>> Signed-off-by: Heiko Schocher 
>> ---
>>
>> changes since v1:
>> - added comment from Wolfgang Denk, to move this to a more
>>   common place, so others can also use it, and made it
>>   therefore per CONFIG_OF_IDE_FIXUP selectable.
>>
>> changes since v2:
>> - add CONFIG_OF_IDE_FIXUP to mpc5200-common.h
>>
>> changes since v3
>> - correct spelling in README and commit message, as
>>   Detlev suggested
>>
>>  README |9 +
>>  cpu/mpc5xxx/cpu.c  |   18 ++
>>  include/configs/manroland/mpc5200-common.h |1 +
>>  3 files changed, 28 insertions(+), 0 deletions(-)
>>
>> diff --git a/README b/README
>> index ff4ed8b..191a122 100644
>> --- a/README
>> +++ b/README
>> @@ -386,6 +386,15 @@ The following options need to be configured:
>>  This define fills in the correct boot CPU in the boot
>>  param header, the default value is zero if undefined.
>>
>> +CONFIG_OF_IDE_FIXUP
>> +
>> +U-Boot can detect, if a ide device is present or not.
>> +If not and this config option is activated, u-boot
>> +removes the ata node from the DTS before booting Linux,
>> +so the Linux IDE driver does not crash, when probing the
>> +device. This is needed for buggy hardware (uc101) where
>> +no pull down resistor is connected to the signal IDE5V_DD7.
>> +
>>  - vxWorks boot parameters:
>>
>>  bootvx constructs a valid bootline using the following
>> diff --git a/cpu/mpc5xxx/cpu.c b/cpu/mpc5xxx/cpu.c
>> index f6258c7..a2fc323 100644
>> --- a/cpu/mpc5xxx/cpu.c
>> +++ b/cpu/mpc5xxx/cpu.c
>> @@ -125,6 +125,9 @@ void ft_cpu_setup(void *blob, bd_t *bd)
>>  uchar enetaddr[6];
>>  char * eth_path = "/" OF_SOC "/ether...@3000";
>>  #endif
>> +#if defined(CONFIG_OF_IDE_FIXUP)
>> +extern block_dev_desc_t ide_dev_desc[CONFIG_SYS_IDE_MAXDEVICE];
>> +#endif
> 
> Why do you declare this global variable inside of the function? Perhaps it 
> would be better to move this declaration into some header.

include/ide.h would be the right place for it I think, or?

>>  do_fixup_by_path_u32(blob, cpu_path, "timebase-frequency", OF_TBCLK, 1);
>>  do_fixup_by_path_u32(blob, cpu_path, "bus-frequency", bd->bi_busfreq, 
>> 1);
>> @@ -137,6 +140,21 @@ void ft_cpu_setup(void *blob, bd_t *bd)
>>  do_fixup_by_path(blob, eth_path, "mac-address", enetaddr, 6, 0);
>>  do_fixup_by_path(blob, eth_path, "local-mac-address", enetaddr, 6, 0);
>>  #endif
>> +#if defined(CONFIG_OF_IDE_FIXUP)
>> +if (ide_dev_desc[0].type == DEV_TYPE_UNKNOWN) {
>> +/* NO CF card detected -> delete ata node in DTS */
>> +int nodeoffset = 0;
>> +char nodename[] = "/soc5...@f000/a...@3a00";
>> +
>> +nodeoffset = fdt_path_offset (blob, nodename);
>> +if (nodeoffset >= 0) {
>> +fdt_del_node(blob, nodeoffset);
>> +} else
>> +printf("%s: cannot find %s node err:%s\n",
>> +__func__, nodename, fdt_strerror(nodeoffset));
> 
> Incorrect multi-line parentheses:
> 
>   if (nodeoffset >= 0) {
>   fdt_del_node(blob, nodeoffset);
>   } else {
>   printf("%s: cannot find %s node err:%s\n",
>   __func__, nodename, fdt_strerror(nodeoffset));
>   }
> 

if (nodeoffset >= 0)
fdt_del_node(blob, nodeoffset);
else
printf("%s: cannot find %s node err:%s\n",
__func__, nodename, fdt_strerror(nodeoffset));

Should be right, or?

bye
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v4 2/2] mucmc52, uc101: delete a...@3a00 node, if no CF card is detected

2009-09-14 Thread Heiko Schocher
Hello Stefan,

Stefan Roese wrote:
> On Monday 14 September 2009 17:26:45 Heiko Schocher wrote:
[...]
do_fixup_by_path_u32(blob, cpu_path, "timebase-frequency", OF_TBCLK,
 1); do_fixup_by_path_u32(blob, cpu_path, "bus-frequency",
 bd->bi_busfreq, 1); @@ -137,6 +140,21 @@ void ft_cpu_setup(void *blob,
 bd_t *bd)
do_fixup_by_path(blob, eth_path, "mac-address", enetaddr, 6, 0);
do_fixup_by_path(blob, eth_path, "local-mac-address", enetaddr, 6, 0);
  #endif
 +#if defined(CONFIG_OF_IDE_FIXUP)
 +  if (ide_dev_desc[0].type == DEV_TYPE_UNKNOWN) {
 +  /* NO CF card detected -> delete ata node in DTS */
 +  int nodeoffset = 0;
 +  char nodename[] = "/soc5...@f000/a...@3a00";
 +
 +  nodeoffset = fdt_path_offset (blob, nodename);
 +  if (nodeoffset >= 0) {
 +  fdt_del_node(blob, nodeoffset);
 +  } else
 +  printf("%s: cannot find %s node err:%s\n",
 +  __func__, nodename, fdt_strerror(nodeoffset));
>>> Incorrect multi-line parentheses:
>>>
>>> if (nodeoffset >= 0) {
>>> fdt_del_node(blob, nodeoffset);
>>> } else {
>>> printf("%s: cannot find %s node err:%s\n",
>>> __func__, nodename, fdt_strerror(nodeoffset));
>>> }
>> if (nodeoffset >= 0)
>> fdt_del_node(blob, nodeoffset);
>> else
>> printf("%s: cannot find %s node err:%s\n",
>> __func__, nodename,
>>  fdt_strerror(nodeoffset));
>>
>> Should be right, or?
> 
> No. IIRC, then when one of the statements is a multi-line statement, both 
> statements of the if/else struct should have the parentheses.

I see only one statement in the if and the else case ...

bye
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCHv2 2/2] mucmc52, uc101: delete a...@3a00 node, if no CF card is detected

2009-09-14 Thread Heiko Schocher
Hello Detlev,

Detlev Zundel wrote:
>> U-Boot can detect, if a ide device is present or not.
>> If not and this new config option is activated, u-boot
>> removes the ata node from the DTS before booting Linux,
>> so the Linux IDE driver didn;t crashs, when probing the
>   does not crash
> 
> The same below in the actual README.

Thanks for detecting this, patch follow

bye
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v4 2/2] mucmc52, uc101: delete a...@3a00 node, if no CF card is detected

2009-09-14 Thread Stefan Roese
Hi Heiko,

sorry for the late review, but I just noticed some minor issues.

On Monday 14 September 2009 17:06:46 Heiko Schocher wrote:
> U-Boot can detect, if a ide device is present or not.
> If not and this new config option is activated, u-boot
> removes the ata node from the DTS before booting Linux,
> so the Linux IDE driver does not crash, when probing the
> device. This is needed for buggy hardware (uc101) where
> no pull down resistor is connected to the signal IDE5V_DD7.
> 
> Signed-off-by: Heiko Schocher 
> ---
> 
> changes since v1:
> - added comment from Wolfgang Denk, to move this to a more
>   common place, so others can also use it, and made it
>   therefore per CONFIG_OF_IDE_FIXUP selectable.
> 
> changes since v2:
> - add CONFIG_OF_IDE_FIXUP to mpc5200-common.h
> 
> changes since v3
> - correct spelling in README and commit message, as
>   Detlev suggested
> 
>  README |9 +
>  cpu/mpc5xxx/cpu.c  |   18 ++
>  include/configs/manroland/mpc5200-common.h |1 +
>  3 files changed, 28 insertions(+), 0 deletions(-)
> 
> diff --git a/README b/README
> index ff4ed8b..191a122 100644
> --- a/README
> +++ b/README
> @@ -386,6 +386,15 @@ The following options need to be configured:
>   This define fills in the correct boot CPU in the boot
>   param header, the default value is zero if undefined.
> 
> + CONFIG_OF_IDE_FIXUP
> +
> + U-Boot can detect, if a ide device is present or not.
> + If not and this config option is activated, u-boot
> + removes the ata node from the DTS before booting Linux,
> + so the Linux IDE driver does not crash, when probing the
> + device. This is needed for buggy hardware (uc101) where
> + no pull down resistor is connected to the signal IDE5V_DD7.
> +
>  - vxWorks boot parameters:
> 
>   bootvx constructs a valid bootline using the following
> diff --git a/cpu/mpc5xxx/cpu.c b/cpu/mpc5xxx/cpu.c
> index f6258c7..a2fc323 100644
> --- a/cpu/mpc5xxx/cpu.c
> +++ b/cpu/mpc5xxx/cpu.c
> @@ -125,6 +125,9 @@ void ft_cpu_setup(void *blob, bd_t *bd)
>   uchar enetaddr[6];
>   char * eth_path = "/" OF_SOC "/ether...@3000";
>  #endif
> +#if defined(CONFIG_OF_IDE_FIXUP)
> + extern block_dev_desc_t ide_dev_desc[CONFIG_SYS_IDE_MAXDEVICE];
> +#endif

Why do you declare this global variable inside of the function? Perhaps it 
would be better to move this declaration into some header.

>   do_fixup_by_path_u32(blob, cpu_path, "timebase-frequency", OF_TBCLK, 1);
>   do_fixup_by_path_u32(blob, cpu_path, "bus-frequency", bd->bi_busfreq, 
> 1);
> @@ -137,6 +140,21 @@ void ft_cpu_setup(void *blob, bd_t *bd)
>   do_fixup_by_path(blob, eth_path, "mac-address", enetaddr, 6, 0);
>   do_fixup_by_path(blob, eth_path, "local-mac-address", enetaddr, 6, 0);
>  #endif
> +#if defined(CONFIG_OF_IDE_FIXUP)
> + if (ide_dev_desc[0].type == DEV_TYPE_UNKNOWN) {
> + /* NO CF card detected -> delete ata node in DTS */
> + int nodeoffset = 0;
> + char nodename[] = "/soc5...@f000/a...@3a00";
> +
> + nodeoffset = fdt_path_offset (blob, nodename);
> + if (nodeoffset >= 0) {
> + fdt_del_node(blob, nodeoffset);
> + } else
> + printf("%s: cannot find %s node err:%s\n",
> + __func__, nodename, fdt_strerror(nodeoffset));

Incorrect multi-line parentheses:

if (nodeoffset >= 0) {
fdt_del_node(blob, nodeoffset);
} else {
printf("%s: cannot find %s node err:%s\n",
__func__, nodename, fdt_strerror(nodeoffset));
}

Cheers,
Stefan

--
DENX Software Engineering GmbH,  MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: off...@denx.de
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] Enable usb ehci support for p2020ds board

2009-09-14 Thread Wolfgang Denk
Dear "Zang Roy-R61911",

In message 
<7df0af56456b8f4081e3c44ccce311de5a3...@zch01exm23.fsl.freescale.net> you wrote:
>  
...
> You need to run
> => usb start
> to start usb, then run
> => usb dev 0
> to specify the device, then run

This should not be needed...

> => ext2ls usb 0:1
> to ls the sda1 content. make sure it is ext2.

... as this command explicitly sets the device.

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
What's the sound a name makes when it's dropped?
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] Enable usb ehci support for p2020ds board

2009-09-14 Thread Wolfgang Denk
Dear Felix Radensky,

In message <4aadfbc6.4080...@embedded-sol.com> you wrote:
> 
...
> I think "usb start" and "usb reset" are identical, but anyway:

Yes, they are.

> => usb start
> (Re)start USB...
> USB:   Register 10011 NbrPorts 1
> USB EHCI 1.00
> scanning bus for devices... 2 USB Device(s) found
>scanning bus for storage devices... Device NOT ready
>Request Sense returned 00 00 00
> 0 Storage Device(s) found

There _is_ an error.


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
... bacteriological warfare ... hard to believe we were once foolish
enough to play around with that.
-- McCoy, "The Omega Glory", stardate unknown
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] Enable usb ehci support for p2020ds board

2009-09-14 Thread Wolfgang Denk
Dear "Zang Roy-R61911",

In message 
<7df0af56456b8f4081e3c44ccce311de5a3...@zch01exm23.fsl.freescale.net> you wrote:
>  
> > => usb start
> > (Re)start USB...
> > USB:   Register 10011 NbrPorts 1
> > USB EHCI 1.00
> > scanning bus for devices... 2 USB Device(s) found
> >scanning bus for storage devices... Device NOT ready
> >Request Sense returned 00 00 00
> > 0 Storage Device(s) found
^

> What is your file system on your disk?

This is irrelevant, as already the bus scan fails.

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
Brain fried - Core dumped
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] TI: DaVinci DM365: Minor config cleanup

2009-09-14 Thread s-paulraj
From: Sandeep Paulraj 

The DM365 config was using the 'CONFIG_CMD_SAVEENV' flag.
This is already included when we include the
config_cmd_default.h header file. So this flag is removed.
Also another flag to enable NAND functions was being
enabled incorrectly.

Signed-off-by: Sandeep Paulraj 
---
 include/configs/davinci_dm365evm.h |2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/include/configs/davinci_dm365evm.h 
b/include/configs/davinci_dm365evm.h
index 72eccb9..2797f82 100644
--- a/include/configs/davinci_dm365evm.h
+++ b/include/configs/davinci_dm365evm.h
@@ -73,7 +73,6 @@
 
 /* NAND: socketed, two chipselects, normally 2 GBytes */
 #define CONFIG_NAND_DAVINCI
-#define CONFIG_SYS_NAND_HW_ECC
 #define CONFIG_SYS_NAND_USE_FLASH_BBT
 #define CONFIG_SYS_NAND_4BIT_HW_ECC_OOBFIRST
 #define CONFIG_SYS_NAND_PAGE_2K
@@ -97,7 +96,6 @@
 #define CONFIG_CMD_I2C
 #define CONFIG_CMD_PING
 #define CONFIG_CMD_SAVES
-#define CONFIG_CMD_SAVEENV
 
 #ifdef CONFIG_NAND_DAVINCI
 #define CONFIG_CMD_MTDPARTS
-- 
1.6.0.4

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


[U-Boot] [PATCH] TI DaVinci DM365: Removing header file which does not exist

2009-09-14 Thread s-paulraj
From: Sandeep Paulraj 

The DaVinci DM365 EVM board specific code was including a header file
which does not exist. So removing this header file.

Signed-off-by: Sandeep Paulraj 
---
 board/davinci/dm365evm/dm365evm.c |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/board/davinci/dm365evm/dm365evm.c 
b/board/davinci/dm365evm/dm365evm.c
index e30184b..99392b3 100644
--- a/board/davinci/dm365evm/dm365evm.c
+++ b/board/davinci/dm365evm/dm365evm.c
@@ -17,7 +17,6 @@
 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
-- 
1.6.0.4

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


[U-Boot] [PATCH] TI: DaVinci DM365: Enabling net support on DM365

2009-09-14 Thread s-paulraj
From: Sandeep Paulraj 

This patch enables EMAC on the DM365 EVM.

Signed-off-by: Sandeep Paulraj 
---
 board/davinci/dm365evm/dm365evm.c |   38 +
 1 files changed, 38 insertions(+), 0 deletions(-)

diff --git a/board/davinci/dm365evm/dm365evm.c 
b/board/davinci/dm365evm/dm365evm.c
index 99392b3..2092324 100644
--- a/board/davinci/dm365evm/dm365evm.c
+++ b/board/davinci/dm365evm/dm365evm.c
@@ -17,9 +17,11 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
+#include 
 #include "../common/misc.h"
 
 DECLARE_GLOBAL_DATA_PTR;
@@ -32,6 +34,42 @@ int board_init(void)
return 0;
 }
 
+#ifdef CONFIG_DRIVER_TI_EMAC
+int board_eth_init(bd_t *bis)
+{
+   uint8_t eeprom_enetaddr[6];
+   int i;
+
+   /* Configure PINMUX 3 to enable EMAC pins */
+   writel((readl(PINMUX3) | 0x1a), PINMUX3);
+
+   /* Configure GPIO20 as output */
+   writel((readl(GIO_DIR01) & 0xffef), GIO_DIR01);
+
+   /* Toggle GPIO 20 */
+   for (i = 0; i < 20; i++) {
+   /* GPIO 20 low */
+   writel((readl(GIO_OUT_DATA01) & 0xffef), GIO_OUT_DATA01);
+
+   udelay(1000);
+
+   /* GPIO 20 high */
+   writel((readl(GIO_OUT_DATA01) | 0x0010), GIO_OUT_DATA01);
+   }
+
+   /* Configure I2C pins so that EEPROM can be read */
+   writel((readl(PINMUX3) | 0x0140), PINMUX3);
+
+   /* Read Ethernet MAC address from EEPROM */
+   if (dvevm_read_mac_address(eeprom_enetaddr))
+   dv_configure_mac_address(eeprom_enetaddr);
+
+   davinci_emac_initialize();
+
+   return 0;
+}
+#endif
+
 #ifdef CONFIG_NAND_DAVINCI
 static void nand_dm365evm_select_chip(struct mtd_info *mtd, int chip)
 {
-- 
1.6.0.4

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


Re: [U-Boot] [TESTING PATCH] ppc: Relocation test patch

2009-09-14 Thread Wolfgang Denk
Dear Peter Tyser,

In message <1252709159-22326-1-git-send-email-pty...@xes-inc.com> you wrote:
> ** This patch is only meant to allow others to test relocation, it
> should not be applied!! **
> 
> This patch is a quick hack to enable proper relocation on powerpc
> boards.  I tested on some mpc85xx-based boards.
> 
> I updated the common ppc config.mk and u-boot.lds in cpu/ as needed, but
> didn't bother to update board-specific ones.  CONFIG_RELOC_FIXUP_WORKS
> has also been hacked into common.h unconditionally.
> 
> So if you want to try out this patch, make sure that you
> 1. Remove the *(.fixup) entry from the text section in your board's
> linker script.
> 
> 2. Make sure your board's config.mk file includes:
> PLATFORM_RELFLAGS += -mrelocatable
> 
> I'm hoping that relocation will work for all powerpc boards assuming you
> use a semi-recent version.  I think at least gcc >= 3.4.6 (or maybe even
> 3.4.5) should work.
> 
> It'd be great if people could give feedback if this patch works for
> them, and if not, how their board breaks.

I have tested this patch on the following boards / tool chains:


Tool Chain: ELDK 3.1.1  ELDK 4.0ELDK 4.2
gcc-3.3.3   gcc-4.0.0   gcc-4.2.2
Board:  binutils-2.14   binutils-2.16.1 binutils-2.17.50.0
TQM834x OK  OK  OK
Canyonlands NOK1OK  OK
MPC5121ADS  OK  OK  OK
Haleakala   OK  OK  OK
Ocotea  NOK1OK  OK

NOK1: build error because old compiler does not accept "-m440" option


So I would say this looks pretty good :-)

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
That said, there may be good reasons for what you did beyond obsequi-
ous sycophantic parody. Perhaps you might be so kind as to elucidate.
 -- Tom Christiansen in <5ldjbm$jt...@csnews.cs.colorado.edu>
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] kwbimage.c: Fix compile warning when building on 64 bit systems

2009-09-14 Thread Wolfgang Denk

In message <1252660703-15596-1-git-send-email...@denx.de> you wrote:
> Fix this warning when building on 64 bit systems:
> tools/kwbimage.c: In function 'kwbimage_checksum32':
> tools/kwbimage.c:135: warning: format '%d' expects type 'int',
> but argument 4 has type 'long unsigned int'
> 
> Signed-off-by: Wolfgang Denk 
> Cc: Prafulla Wadaskar 
> ---
>  tools/kwbimage.c |2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

Applied.


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
"It's like deja vu all over again."  - Yogi Berra
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] TI: DaVinci DM365: Enabling net support on DM365

2009-09-14 Thread Matt Waddel
Hi Sandeep,

Is there another part to this patch still coming or did I miss a patch 
along the way?  This patch as-is doesn't compile:
...
dm365evm.c: In function ‘board_eth_init’:   
dm365evm.c:47: error: ‘GIO_DIR01’ undeclared (first use in this function)   
dm365evm.c:47: error: (Each undeclared identifier is reported only once 
dm365evm.c:47: error: for each function it appears in.) 
dm365evm.c:52: error: ‘GIO_OUT_DATA01’ undeclared (first use in this function)

Best regards,
Matt

On Monday 14 September 2009 01:16:38 pm s-paul...@ti.com wrote:
> From: Sandeep Paulraj 
> 
> This patch enables EMAC on the DM365 EVM.
> 
> Signed-off-by: Sandeep Paulraj 
> ---
>  board/davinci/dm365evm/dm365evm.c |   38 
> +
>  1 files changed, 38 insertions(+), 0 deletions(-)
> 
> diff --git a/board/davinci/dm365evm/dm365evm.c 
> b/board/davinci/dm365evm/dm365evm.c
> index 99392b3..2092324 100644
> --- a/board/davinci/dm365evm/dm365evm.c
> +++ b/board/davinci/dm365evm/dm365evm.c
> @@ -17,9 +17,11 @@
>  
>  #include 
>  #include 
> +#include 
>  #include 
>  #include 
>  #include 
> +#include 
>  #include "../common/misc.h"
>  
>  DECLARE_GLOBAL_DATA_PTR;
> @@ -32,6 +34,42 @@ int board_init(void)
>   return 0;
>  }
>  
> +#ifdef CONFIG_DRIVER_TI_EMAC
> +int board_eth_init(bd_t *bis)
> +{
> + uint8_t eeprom_enetaddr[6];
> + int i;
> +
> + /* Configure PINMUX 3 to enable EMAC pins */
> + writel((readl(PINMUX3) | 0x1a), PINMUX3);
> +
> + /* Configure GPIO20 as output */
> + writel((readl(GIO_DIR01) & 0xffef), GIO_DIR01);
> +
> + /* Toggle GPIO 20 */
> + for (i = 0; i < 20; i++) {
> + /* GPIO 20 low */
> + writel((readl(GIO_OUT_DATA01) & 0xffef), GIO_OUT_DATA01);
> +
> + udelay(1000);
> +
> + /* GPIO 20 high */
> + writel((readl(GIO_OUT_DATA01) | 0x0010), GIO_OUT_DATA01);
> + }
> +
> + /* Configure I2C pins so that EEPROM can be read */
> + writel((readl(PINMUX3) | 0x0140), PINMUX3);
> +
> + /* Read Ethernet MAC address from EEPROM */
> + if (dvevm_read_mac_address(eeprom_enetaddr))
> + dv_configure_mac_address(eeprom_enetaddr);
> +
> + davinci_emac_initialize();
> +
> + return 0;
> +}
> +#endif
> +
>  #ifdef CONFIG_NAND_DAVINCI
>  static void nand_dm365evm_select_chip(struct mtd_info *mtd, int chip)
>  {
> -- 
> 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


Re: [U-Boot] Microblaze repo update - patches

2009-09-14 Thread Ben Warren
Michal,

Michal Simek wrote:
> Hi Wolfgang,
>
> I added all Microblaze changes to my repo.
>
> Ben: Can you finally check LL-Temac driver? I haven't got any your reaction.
> I know you have just a lot of work.
>   
I'm sending out a review shortly of your latest submission.  Obviously, 
I'm OK with removing the old driver, but there are issues with the new 
one 'll_temac' and the revised emaclite.

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


[U-Boot] [PATCH v2] board/flagadm/flash.c: fix compile warning

2009-09-14 Thread Wolfgang Denk
Fix warning: flash.c:531: warning: dereferencing type-punned pointer
will break strict-aliasing rules

Signed-off-by: Wolfgang Denk 
Cc: K�ri Dav��sson 
---
v2: change implementation as suggested by Scott Wood in
http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/67828/focus=67900

 board/flagadm/flash.c |   12 +---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/board/flagadm/flash.c b/board/flagadm/flash.c
index bbefbac..a69b1a4 100644
--- a/board/flagadm/flash.c
+++ b/board/flagadm/flash.c
@@ -528,11 +528,17 @@ int write_word (flash_info_t *info, ulong dest, ulong da)
ulong start;
char csr;
int flag;
-   ushort * d = (ushort*)&da;
int i;
+   union {
+   u32 data32;
+   u16 data16[2];
+   } data;
+
+   data.data32 = da;
 
/* Check if Flash is (sufficiently) erased */
-   if (((*addr & d[0]) != d[0]) || ((*(addr+1) & d[1]) != d[1])) {
+   if (((*addr & data.data16[0]) != data.data16[0]) ||
+   ((*(addr+1) & data.data16[1]) != data.data16[1])) {
return (2);
}
/* Disable interrupts which might cause a timeout here */
@@ -544,7 +550,7 @@ int write_word (flash_info_t *info, ulong dest, ulong da)
*addr = 0x0010;
 
/* Write Data */
-   *addr = d[i];
+   *addr = data.data16[i];
 
/* re-enable interrupts if necessary */
if (flag)
-- 
1.6.0.6

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


Re: [U-Boot] [PATCH] drivers/net/natsemi.c: fix compile warning

2009-09-14 Thread Wolfgang Denk
In message <1252660703-15596-4-git-send-email...@denx.de> you wrote:
> Fix warning: natsemi.c:757: warning: dereferencing type-punned pointer
> will break strict-aliasing rules
> 
> Signed-off-by: Wolfgang Denk 
> Cc: Ben Warren 
> ---
>  drivers/net/natsemi.c |3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)

Applied.


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
I object to intellect without discipline;  I object to power without
constructive purpose.
-- Spock, "The Squire of Gothos", stardate 2124.5
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] sk98lin: fix compile warnings

2009-09-14 Thread Wolfgang Denk
In message <1252660703-15596-5-git-send-email...@denx.de> you wrote:
> Fix warnings:
> skge.c: In function 'BoardInitMem':
> skge.c:1389: warning: dereferencing type-punned pointer will break 
> strict-aliasing rules
> skge.c:1390: warning: dereferencing type-punned pointer will break 
> strict-aliasing rules
> skge.c:1391: warning: dereferencing type-punned pointer will break 
> strict-aliasing rules
> skgesirq.c: In function 'SkGePortCheckUpXmac':
> skgesirq.c:1301: warning: dereferencing type-punned pointer will break 
> strict-aliasing rules
> skgesirq.c:1301: warning: dereferencing type-punned pointer will break 
> strict-aliasing rules
> skgesirq.c:1398: warning: dereferencing type-punned pointer will break 
> strict-aliasing rules
> skgesirq.c:1398: warning: dereferencing type-punned pointer will break 
> strict-aliasing rules
> skrlmt.c: In function 'SkRlmtInit':
> skrlmt.c:661: warning: dereferencing type-punned pointer will break 
> strict-aliasing rules
> skxmac2.c: In function 'SkMacPromiscMode':
> skxmac2.c:753: warning: dereferencing type-punned pointer will break 
> strict-aliasing rules
> skxmac2.c:753: warning: dereferencing type-punned pointer will break 
> strict-aliasing rules
> skxmac2.c: In function 'SkMacHashing':
> skxmac2.c:803: warning: dereferencing type-punned pointer will break 
> strict-aliasing rules
> skxmac2.c:803: warning: dereferencing type-punned pointer will break 
> strict-aliasing rules
> skxmac2.c: In function 'SkMacFlushTxFifo':
> skxmac2.c:1115: warning: dereferencing type-punned pointer will break 
> strict-aliasing rules
> skxmac2.c:1115: warning: dereferencing type-punned pointer will break 
> strict-aliasing rules
> skxmac2.c: In function 'SkMacFlushRxFifo':
> skxmac2.c:1145: warning: dereferencing type-punned pointer will break 
> strict-aliasing rules
> skxmac2.c:1145: warning: dereferencing type-punned pointer will break 
> strict-aliasing rules
> skxmac2.c: In function 'SkXmInitPauseMd':
> skxmac2.c:1987: warning: dereferencing type-punned pointer will break 
> strict-aliasing rules
> skxmac2.c:1987: warning: dereferencing type-punned pointer will break 
> strict-aliasing rules
> skxmac2.c: In function 'SkXmOverflowStatus':
> skxmac2.c:4236: warning: dereferencing type-punned pointer will break 
> strict-aliasing rules
> skxmac2.c:4236: warning: dereferencing type-punned pointer will break 
> strict-aliasing rules
> skxmac2.c:4242: warning: dereferencing type-punned pointer will break 
> strict-aliasing rules
> skxmac2.c:4242: warning: dereferencing type-punned pointer will break 
> strict-aliasing rules
> 
> Signed-off-by: Wolfgang Denk 
> Cc: Ben Warren 
> ---
>  drivers/net/sk98lin/skge.c |   12 +---
>  drivers/net/sk98lin/skgesirq.c |7 +--
>  drivers/net/sk98lin/skrlmt.c   |3 ++-
>  drivers/net/sk98lin/skxmac2.c  |   20 +---
>  4 files changed, 29 insertions(+), 13 deletions(-)

Aplied.

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
Marriage is the triumph  of  imagination  over  intelligence.  Second
marriage is the triumph of hope over experience.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] board/esd/common/flash.c: Fix compile warning

2009-09-14 Thread Wolfgang Denk
In message <1252660703-15596-6-git-send-email...@denx.de> you wrote:
> Fix warning: ../common/flash.c:635: warning: dereferencing type-punned
> pointer will break strict-aliasing rules
> 
> Signed-off-by: Wolfgang Denk 
> Cc: Matthias Fuchs 
> Cc: Stefan Roese 
> ---
>  board/esd/common/flash.c |3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)

Applied.

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
Operating-system software is the program that  orchestrates  all  the
basic functions of a computer.
- The Wall Street Journal, Tuesday, September 15, 1987, page 40
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] board/esd/cpci750/ide.c: fix compile warning

2009-09-14 Thread Wolfgang Denk
In message <1252660703-15596-7-git-send-email...@denx.de> you wrote:
> Fix warning: ide.c:54: warning: dereferencing type-punned pointer will
> break strict-aliasing rules
> 
> Signed-off-by: Wolfgang Denk 
> Cc: Matthias Fuchs 
> Cc: Stefan Roese 
> ---
>  board/esd/cpci750/ide.c |8 ++--
>  1 files changed, 6 insertions(+), 2 deletions(-)

Applied.

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
He who hesitates is not only lost, but miles from the next exit.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] net/bootp.c: fix compile warning

2009-09-14 Thread Wolfgang Denk
In message <1252660703-15596-2-git-send-email...@denx.de> you wrote:
> Fix warning: bootp.c:695: warning: dereferencing type-punned pointer
> will break strict-aliasing rules
> 
> Signed-off-by: Wolfgang Denk 
> Cc: Ben Warren 
> ---
>  net/bootp.c |6 +-
>  1 files changed, 5 insertions(+), 1 deletions(-)

Applied.

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
If all the Chinese simultaneously jumped into the Pacific  off  a  10
foot platform erected 10 feet off their coast, it would cause a tidal
wave that would destroy everything in this country west of Nebraska.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] board/dave/common/flash.c: fix compile warning

2009-09-14 Thread Wolfgang Denk
In message <1252662563-18284-1-git-send-email...@denx.de> you wrote:
> Fix warning: ../common/flash.c:668: warning: dereferencing type-punned
> pointer will break strict-aliasing rules
> 
> Signed-off-by: Wolfgang Denk 
> Cc: Andrea Marson 
> ---
>  board/dave/common/flash.c |3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)

Applied.

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
Veni, Vidi, VISA:
I came, I saw, I did a little shopping.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] board/etin/debris/phantom.c: Fix compile error

2009-09-14 Thread Wolfgang Denk
In message <1252662563-18284-3-git-send-email...@denx.de> you wrote:
> Fix build problem caused by commit e84aba13: "Replace BCD2BIN and
> BIN2BCD macros with inline functions"
> 
> phantom.c:163: error: redefinition of 'bcd2bin'
> /home/wd/git/u-boot/work/include/bcd.h:16: error: previous definition of 
> 'bcd2bin' was here
> phantom.c:168: error: redefinition of 'bin2bcd'
> /home/wd/git/u-boot/work/include/bcd.h:21: error: previous definition of 
> 'bin2bcd' was here
> 
> Signed-off-by: Wolfgang Denk 
> Cc: Sangmoon Kim 
> ---
>  board/etin/debris/phantom.c |   10 --
>  1 files changed, 0 insertions(+), 10 deletions(-)

Applied.

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
"Plan to throw one away.  You will anyway."
  - Fred Brooks, "The Mythical Man Month"
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] TI: DaVinci DM365: Enabling net support on DM365

2009-09-14 Thread Paulraj, Sandeep


> -Original Message-
> From: Matt Waddel [mailto:mwad...@control4.com]
> Sent: Monday, September 14, 2009 5:43 PM
> To: u-boot@lists.denx.de
> Cc: Paulraj, Sandeep
> Subject: Re: [U-Boot] [PATCH] TI: DaVinci DM365: Enabling net support on
> DM365
> 
> Hi Sandeep,
> 
> Is there another part to this patch still coming or did I miss a patch
> along the way?  This patch as-is doesn't compile:
> ...
> dm365evm.c: In function 'board_eth_init':
> dm365evm.c:47: error: 'GIO_DIR01' undeclared (first use in this function)
> dm365evm.c:47: error: (Each undeclared identifier is reported only once
> dm365evm.c:47: error: for each function it appears in.)
> dm365evm.c:52: error: 'GIO_OUT_DATA01' undeclared (first use in this
> function)

You will need the patch with this header sent Saturday

TI: DaVinci: Adding GIO addresses to header file

After that you will need a patch I have not submitted because the same EMAC 
driver will be used by DM365, DM6467 and DA8xx series of chips.

So we(developers involved with DM6467 and DA8xx and me) have to come up with a 
clean and clever way to achieve this.

In the meanwhile if you are interested look at this tree. Its part of TI's 
ARAGO project and I added the EMAC support there


http://arago-project.org/git/people/?p=sandeep/u-boot-davinci.git;a=summary

The patch in question happens to be last commit in the above repo.
I have not submitted this patch and probably will not in this form because of 
the reason mentioned above.

If you clone the tree from the above mentioned link you will get a working 
version of U-Boot for DM365. I am using it as we speak.

Let me know if you have any concerns/issues.

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


[U-Boot] [PATCH v2] board/linkstation/ide.c: Fix compile warning

2009-09-14 Thread Wolfgang Denk
Fix warning: ide.c:60: warning: dereferencing type-punned pointer will
break strict-aliasing rules

Signed-off-by: Wolfgang Denk 
Cc: Guennadi Liakhovetski 

---
v2: Better implementation as suggested by Scott Wood in
http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/67840/focus=67891

 board/linkstation/ide.c |6 --
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/board/linkstation/ide.c b/board/linkstation/ide.c
index 2c89d62..568fdf5 100644
--- a/board/linkstation/ide.c
+++ b/board/linkstation/ide.c
@@ -54,11 +54,13 @@ int ide_preinit (void)
if (devbusfn == -1)
devbusfn = 
pci_find_device(PCI_VENDOR_ID_ITE,PCI_DEVICE_ID_ITE_8212,0);
if (devbusfn != -1) {
+   u32 ide_bus_offset32;
+
status = 0;
 
pci_read_config_dword (devbusfn, PCI_BASE_ADDRESS_0,
-  (u32 *) 
&ide_bus_offset[0]);
-   ide_bus_offset[0] &= 0xfffe;
+  &ide_bus_offset32);
+   ide_bus_offset[0] = ide_bus_offset32 & 0xfffe;
ide_bus_offset[0] = pci_hose_bus_to_phys(&hose,
 ide_bus_offset[0] & 
0xfffe,
 PCI_REGION_IO);
-- 
1.6.0.6

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


Re: [U-Boot] [PATCH] board/amcc/taihu/flash.c: Fix compile warning

2009-09-14 Thread Wolfgang Denk
In message <1252662563-18284-5-git-send-email...@denx.de> you wrote:
> Fix warnings:
> flash.c: In function 'write_word_1':
> flash.c:696: warning: dereferencing type-punned pointer will break 
> strict-aliasing rules
> flash.c: In function 'write_word_2':
> flash.c:1044: warning: dereferencing type-punned pointer will break 
> strict-aliasing rules
> 
> Signed-off-by: Wolfgang Denk 
> Cc: Stefan Roese 
> ---
>  board/amcc/taihu/flash.c |   14 --
>  1 files changed, 8 insertions(+), 6 deletions(-)

Applied.

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
Alan Turing thought about criteria to settle the question of  whether
machines  can think, a question of which we now know that it is about
as relevant as the question of whether submarines can swim.
   -- Edsger Dijkstra
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] board/amcc/yucca/flash.c: Fix compile warning

2009-09-14 Thread Wolfgang Denk
In message <1252662563-18284-6-git-send-email...@denx.de> you wrote:
> Fix warning: flash.c:919: warning: dereferencing type-punned pointer
> will break strict-aliasing rules
> 
> Signed-off-by: Wolfgang Denk 
> Cc: Stefan Roese 
> ---
>  board/amcc/yucca/flash.c |7 ---
>  1 files changed, 4 insertions(+), 3 deletions(-)

Applied.

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
Do not underestimate the value of print statements for debugging.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] OMAP3 MMC: Fix warning dereferencing type-punned pointer

2009-09-14 Thread Paulraj, Sandeep


> -Original Message-
> From: u-boot-boun...@lists.denx.de [mailto:u-boot-boun...@lists.denx.de]
> On Behalf Of Dirk Behme
> Sent: Sunday, September 13, 2009 4:40 AM
> To: u-boot@lists.denx.de
> Subject: [U-Boot] [PATCH] OMAP3 MMC: Fix warning dereferencing type-punned
> pointer
> 
> Fix warning
> 
> dereferencing type-punned pointer will break strict-aliasing rules
> 
> Signed-off-by: Dirk Behme 
> 
> ---
If nobody has any issues with this patch I would like to push this to u-boot-ti 
as the u-boot-mmc fork seems not synced up with the latest U-Boot GIT tree.
> 
> Patch against recent u-boot-ti git
> f4f92c81835ccc43f74925737dfd478edb0182f2
> "TI: OMAP3: Overo Tobi ethernet support"
> 
> Compile tested only ./MAKEALL ARM_CORTEX_A8
> 
>  drivers/mmc/omap3_mmc.c |   56 --
> --
>  1 file changed, 29 insertions(+), 27 deletions(-)
> 
> Index: u-boot-ti/drivers/mmc/omap3_mmc.c
> ===
> --- u-boot-ti.orig/drivers/mmc/omap3_mmc.c
> +++ u-boot-ti/drivers/mmc/omap3_mmc.c
> @@ -235,8 +235,13 @@ unsigned char mmc_detect_card(mmc_card_d
>   unsigned char err;
>   unsigned int argument = 0;
>   unsigned int ocr_value, ocr_recvd, ret_cmd41, hcs_val;
> - unsigned int resp[4];
>   unsigned short retry_cnt = 2000;
> + union {
> + unsigned int resp[4];
> + mmc_resp_r3 *r3;
> + mmc_resp_r6 *r6;
> + } mmc_resp;
> +
> 
>   /* Set to Initialization Clock */
>   err = mmc_clock_config(CLK_400KHZ, 0);
> @@ -247,18 +252,18 @@ unsigned char mmc_detect_card(mmc_card_d
>   argument = 0x;
> 
>   ocr_value = (0x1FF << 15);
> - err = mmc_send_cmd(MMC_CMD0, argument, resp);
> + err = mmc_send_cmd(MMC_CMD0, argument, mmc_resp.resp);
>   if (err != 1)
>   return err;
> 
>   argument = SD_CMD8_CHECK_PATTERN | SD_CMD8_2_7_3_6_V_RANGE;
> - err = mmc_send_cmd(MMC_SDCMD8, argument, resp);
> + err = mmc_send_cmd(MMC_SDCMD8, argument, mmc_resp.resp);
>   hcs_val = (err == 1) ?
>   MMC_OCR_REG_HOST_CAPACITY_SUPPORT_SECTOR :
>   MMC_OCR_REG_HOST_CAPACITY_SUPPORT_BYTE;
> 
>   argument = 0x << 16;
> - err = mmc_send_cmd(MMC_CMD55, argument, resp);
> + err = mmc_send_cmd(MMC_CMD55, argument, mmc_resp.resp);
>   if (err == 1) {
>   mmc_card_cur->card_type = SD_CARD;
>   ocr_value |= hcs_val;
> @@ -272,24 +277,24 @@ unsigned char mmc_detect_card(mmc_card_d
>   }
> 
>   argument = ocr_value;
> - err = mmc_send_cmd(ret_cmd41, argument, resp);
> + err = mmc_send_cmd(ret_cmd41, argument, mmc_resp.resp);
>   if (err != 1)
>   return err;
> 
> - ocr_recvd = ((mmc_resp_r3 *) resp)->ocr;
> + ocr_recvd = mmc_resp.r3->ocr;
> 
>   while (!(ocr_recvd & (0x1 << 31)) && (retry_cnt > 0)) {
>   retry_cnt--;
>   if (mmc_card_cur->card_type == SD_CARD) {
>   argument = 0x << 16;
> - err = mmc_send_cmd(MMC_CMD55, argument, resp);
> + err = mmc_send_cmd(MMC_CMD55, argument, mmc_resp.resp);
>   }
> 
>   argument = ocr_value;
> - err = mmc_send_cmd(ret_cmd41, argument, resp);
> + err = mmc_send_cmd(ret_cmd41, argument, mmc_resp.resp);
>   if (err != 1)
>   return err;
> - ocr_recvd = ((mmc_resp_r3 *) resp)->ocr;
> + ocr_recvd = mmc_resp.r3->ocr;
>   }
> 
>   if (!(ocr_recvd & (0x1 << 31)))
> @@ -318,22 +323,22 @@ unsigned char mmc_detect_card(mmc_card_d
>   if (!(ocr_recvd & ocr_value))
>   return 0;
> 
> - err = mmc_send_cmd(MMC_CMD2, argument, resp);
> + err = mmc_send_cmd(MMC_CMD2, argument, mmc_resp.resp);
>   if (err != 1)
>   return err;
> 
>   if (mmc_card_cur->card_type == MMC_CARD) {
>   argument = mmc_card_cur->RCA << 16;
> - err = mmc_send_cmd(MMC_CMD3, argument, resp);
> + err = mmc_send_cmd(MMC_CMD3, argument, mmc_resp.resp);
>   if (err != 1)
>   return err;
>   } else {
>   argument = 0x;
> - err = mmc_send_cmd(MMC_SDCMD3, argument, resp);
> + err = mmc_send_cmd(MMC_SDCMD3, argument, mmc_resp.resp);
>   if (err != 1)
>   return err;
> 
> - mmc_card_cur->RCA = ((mmc_resp_r6 *) resp)->newpublishedrca;
> + mmc_card_cur->RCA = mmc_resp.r6->newpublishedrca;
>   }
> 
>   writel(readl(&mmc_base->con) & ~OD, &mmc_base->con);
> @@ -437,10 +442,12 @@ unsigned char configure_mmc(mmc_card_dat
>  {
>   unsigned char ret_val;
>   unsigned int argument;
> - unsigned int resp[4];
>   unsigned int trans_clk, trans_fact, trans_unit, retries = 2;
> - mmc_csd_reg_t Card_CSD;
>   unsigned ch

Re: [U-Boot] [PATCH] board/amcc/common/flash.c: Fix compile warning

2009-09-14 Thread Wolfgang Denk
In message <1252662563-18284-2-git-send-email...@denx.de> you wrote:
> Fix warning: ../common/flash.c:917: warning: dereferencing type-punned
> pointer will break strict-aliasing rules
> 
> Signed-off-by: Wolfgang Denk 
> Cc: Stefan Roese 
> ---
>  board/amcc/common/flash.c |7 ---
>  1 files changed, 4 insertions(+), 3 deletions(-)

Applied.

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
In the beginning there was nothing.
And the Lord said "Let There Be Light!"
And still there was nothing, but at least now you could see it.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] net: [V2] Add LL TEMAC driver to u-boot and move Emaclite to NET_MULTI

2009-09-14 Thread Ben Warren
mon...@monstr.eu wrote:
> From: Michal Simek 
>
> Here are two major changes which should go together.
> First is adding LL Temac driver to u-boot and the second
> is changing Emaclite to NET_MULTI api.
>
>   
Please break this up into two independent patches.  I can sort through 
the common files when it comes time to integrate.
> There are some changes for proper initialization too.
>
> Signed-off-by: Michal Simek 
>
> ---
>
> V2: Applied Ben comments
> ---
>  .../xilinx/microblaze-generic/microblaze-generic.c |   16 +
>  drivers/net/Makefile   |1 +
>  drivers/net/xilinx_emaclite.c  |   86 ++--
>  drivers/net/xilinx_ll_temac.c  |  558 
> 
>  include/configs/microblaze-generic.h   |2 +
>  include/netdev.h   |2 +
>  lib_microblaze/board.c |   21 +-
>  7 files changed, 639 insertions(+), 47 deletions(-)
>  create mode 100644 drivers/net/xilinx_ll_temac.c
>
> diff --git a/board/xilinx/microblaze-generic/microblaze-generic.c 
> b/board/xilinx/microblaze-generic/microblaze-generic.c
> index f388b77..4ad9eb6 100644
> --- a/board/xilinx/microblaze-generic/microblaze-generic.c
> +++ b/board/xilinx/microblaze-generic/microblaze-generic.c
> @@ -27,6 +27,7 @@
>  
>  #include 
>  #include 
> +#include 
>  #include 
>  #include 
>  
> @@ -67,3 +68,18 @@ void fsl_init2 (void) {
>   NULL);
>  }
>  #endif
> +
> +int board_eth_init(bd_t *bis)
> +{
> + /*
> +  * This board either has PCI NICs or uses the CPU's TSECs
> +  * pci_eth_init() will return 0 if no NICs found, so in that case
> +  * returning -1 will force cpu_eth_init() to be called.
> +  */
>   
I asked before to remove this incorrect information.
> +#ifdef CONFIG_XILINX_EMACLITE
> + return xilinx_emaclite_initialize(bis);
> +#endif
> +#ifdef CONFIG_XILINX_LL_TEMAC
> + return xilinx_ll_temac_initialize(bis);
> +#endif
> +}
>   
Here's an opportunity to pass in device addresses.
> diff --git a/drivers/net/Makefile b/drivers/net/Makefile
> index 67018bb..4fd53f9 100644
> --- a/drivers/net/Makefile
> +++ b/drivers/net/Makefile
> @@ -73,6 +73,7 @@ COBJS-$(CONFIG_TSI108_ETH) += tsi108_eth.o
>  COBJS-$(CONFIG_ULI526X) += uli526x.o
>  COBJS-$(CONFIG_VSC7385_ENET) += vsc7385.o
>  COBJS-$(CONFIG_XILINX_EMACLITE) += xilinx_emaclite.o
> +COBJS-$(CONFIG_XILINX_LL_TEMAC) += xilinx_ll_temac.o
>  
>  COBJS:= $(COBJS-y)
>  SRCS := $(COBJS:.o=.c)
> diff --git a/drivers/net/xilinx_emaclite.c b/drivers/net/xilinx_emaclite.c
> index cf39573..99b5ae1 100644
> --- a/drivers/net/xilinx_emaclite.c
> +++ b/drivers/net/xilinx_emaclite.c
> @@ -14,7 +14,7 @@
>   * INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
>   * FOR A PARTICULAR PURPOSE.
>   *
> - * (C) Copyright 2007-2008 Michal Simek
> + * (C) Copyright 2007-2009 Michal Simek
>   * Michal SIMEK 
>   *
>   * (c) Copyright 2003 Xilinx Inc.
> @@ -25,6 +25,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>  #include 
>  
>  #undef DEBUG
> @@ -62,26 +63,19 @@
>  #define XEL_RSR_RECV_IE_MASK 0x0008UL
>  
>  typedef struct {
> - unsigned int baseaddress;   /* Base address for device (IPIF) */
> - unsigned int nexttxbuffertouse; /* Next TX buffer to write to */
> - unsigned int nextrxbuffertouse; /* Next RX buffer to read from */
> - unsigned char deviceid; /* Unique ID of device - for future */
> + u32 baseaddress;/* Base address for device (IPIF) */
> + u32 nexttxbuffertouse;  /* Next TX buffer to write to */
> + u32 nextrxbuffertouse;  /* Next RX buffer to read from */
> + uchar deviceid; /* Unique ID of device - for future */
>  } xemaclite;
>  
>  static xemaclite emaclite;
>  
>  static u32 etherrxbuff[PKTSIZE_ALIGN/4]; /* Receive buffer */
>  
> -/* hardcoded MAC address for the Xilinx EMAC Core when env is nowhere*/
> -#ifdef CONFIG_ENV_IS_NOWHERE
> -static u8 emacaddr[ENET_ADDR_LENGTH] = { 0x00, 0x0a, 0x35, 0x00, 0x22, 0x01 
> };
> -#else
> -static u8 emacaddr[ENET_ADDR_LENGTH];
> -#endif
> -
> -void xemaclite_alignedread (u32 * srcptr, void *destptr, unsigned bytecount)
> +static void xemaclite_alignedread (u32 * srcptr, void *destptr, u32 
> bytecount)
>  {
> - unsigned int i;
> + u32 i;
>   u32 alignbuffer;
>   u32 *to32ptr;
>   u32 *from32ptr;
> @@ -106,9 +100,9 @@ void xemaclite_alignedread (u32 * srcptr, void *destptr, 
> unsigned bytecount)
>   }
>  }
>  
> -void xemaclite_alignedwrite (void *srcptr, u32 destptr, unsigned bytecount)
> +static void xemaclite_alignedwrite (void *srcptr, u32 destptr, u32 bytecount)
>  {
> - unsigned i;
> + u32 i;
>   u32 alignbuffer;
>   u32 *to32ptr = (u32 *) destptr;
>   u32 *from32ptr;
> @@ -133,23 +127,16 @@ void xemaclite_alignedwrite (void *srcptr, u32 destptr, 
> unsigned bytecount)
>   *to32ptr++ = alignbuffer;
>  }
>  
> -void eth_halt (voi

Re: [U-Boot] configure ppc440spe as pci adapter

2009-09-14 Thread Wolfgang Denk
Dear dbrazeau,


please do not top-post / full quote. Make sure to read
http://www.netmeister.org/news/learn2quote.html


In message <25438442.p...@talk.nabble.com> you wrote:
> 
> Yes, I do mean PCIe.  Sorry should have mentioned that.

Well, in this case...

> > In message <25389144.p...@talk.nabble.com> you wrote:
> >> 
> >> I'm trying to get my ppc440spe (Katmai) board to initialize in PCI
> >> adapter
> >> mode.  I was hoping that someone could give me some pointers on what
> >> changes

...you should also make sure to use right terminology. "Adapter mode"
is a PCI (and PCI-X) related term, but is not used with PCI-e.

With PCI-e, we are talking about "root" versus "end point" mode, and
you do not have to implement any changes for this. You only have to
set the "pcie_mode" environment variable correctly.

Please see this commit message for a description:


commit d4cb2d17946466740afeb195a57d6cb290bf4cc0
Author: Stefan Roese 
Date:   Sat Oct 13 16:43:23 2007 +0200

ppc4xx: Dynamic configuration of 4xx PCIe mode as root or endpoint mode

This patch adds support for dynamic configuration of PCIe ports for the
AMCC PPC4xx boards equipped with PCIe interfaces. These are the PPC440SPe
boards Yucca & Katmai and the 405EX board Kilauea.

This dynamic configuration is done via the "pcie_mode" environement
variable. This variable can be set to "EP" or "RP" for endpoint or
rootpoint mode. Multiple values can be joined via the ":" delimiter.
Here an example:

pcie_mode=RP:EP:EP

This way, PCIe port 0 will be configured as rootpoint, PCIe port 1 and 2
as endpoint.

Per default Yucca will be configured as:
pcie_mode=RP:EP:EP

Per default Katmai will be configured as:
pcie_mode=RP:RP:REP

Per default Kilauea will be configured as:
pcie_mode=RP:RP

Signed-off-by: Tirumala R Marri 
Signed-off-by: Stefan Roese 



Sorry that this is not documented properly - Stefan, can you please
add at least some description to the README?

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
It is your destiny. - Darth Vader
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [TESTING PATCH] ppc: Relocation test patch

2009-09-14 Thread Peter Tyser
On Mon, 2009-09-14 at 23:26 +0200, Wolfgang Denk wrote:
> Dear Peter Tyser,
> 
> In message <1252709159-22326-1-git-send-email-pty...@xes-inc.com> you wrote:
> > ** This patch is only meant to allow others to test relocation, it
> > should not be applied!! **
> > 
> > This patch is a quick hack to enable proper relocation on powerpc
> > boards.  I tested on some mpc85xx-based boards.
> > 
> > I updated the common ppc config.mk and u-boot.lds in cpu/ as needed, but
> > didn't bother to update board-specific ones.  CONFIG_RELOC_FIXUP_WORKS
> > has also been hacked into common.h unconditionally.
> > 
> > So if you want to try out this patch, make sure that you
> > 1. Remove the *(.fixup) entry from the text section in your board's
> > linker script.
> > 
> > 2. Make sure your board's config.mk file includes:
> > PLATFORM_RELFLAGS += -mrelocatable
> > 
> > I'm hoping that relocation will work for all powerpc boards assuming you
> > use a semi-recent version.  I think at least gcc >= 3.4.6 (or maybe even
> > 3.4.5) should work.
> > 
> > It'd be great if people could give feedback if this patch works for
> > them, and if not, how their board breaks.
> 
> I have tested this patch on the following boards / tool chains:
> 
> 
> Tool Chain:   ELDK 3.1.1  ELDK 4.0ELDK 4.2
>   gcc-3.3.3   gcc-4.0.0   gcc-4.2.2
> Board:binutils-2.14   binutils-2.16.1 binutils-2.17.50.0
> TQM834x   OK  OK  OK
> Canyonlands   NOK1OK  OK
> MPC5121ADSOK  OK  OK
> Haleakala OK  OK  OK
> OcoteaNOK1OK  OK
> 
> NOK1: build error because old compiler does not accept "-m440" option
> 
> 
> So I would say this looks pretty good :-)

Great!  Thanks for the testing.  I'll submit a proper patch in this
window.  I'll also add a check for the .fixup section to catch those
compilers which don't generate it as Mike suggested in the original
relocation thread.

Best,
Peter

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


[U-Boot] U-Boot v2009.08 & JFFS2 (NOR)

2009-09-14 Thread Tommy Wang
Hello U-Boot Users,

I am working on updating a EP8248 based board from a very old U-Boot
1.1.2 to v2009.08.

The board has 2 banks of 32MB/256 sector NOR flash at 0xFC00 and
0xFE00.  The (single) JFFS2 partition is located at 0xFE02 to
0xFFEF.

Using U-Boot 1.1.2, the files within the partition show up just fine
w/ the ls command.  Using U-Boot v2009.08, when booting Linux via
TFTP, the JFFS2 partition can be mounted (mount -t jffs2
/dev/mtdblock2 /mnt), and the files show up fine.  I cannot seem to
get U-Boot to recognize the JFFS2 partition, however.

The existing JFFS2 configuration in U-Boot 1.1.2 is:

#define CFG_JFFS2_FIRST_BANK 1
#define CFG_JFFS2_FIRST_SECTOR 1
#define CFG_JFFS2_NUM_BANKS 1

In v2009.08, I have tried:

#define CONFIG_SYS_JFFS2_FIRST_BANK 1
#define CONFIG_SYS_JFFS2_FIRST_SECTOR 1
#define CONFIG_SYS_JFFS2_NUM_BANKS 1

My debug output shows me:

start_phys: fc00
end_phys: fbff
part->size: 

Looking through code, I saw that the above macros were no longer used.
 The doc/README.JFFS2 seemed to be out of date.  I tried copying from
configurations that look like they may work from other platforms:

#define CONFIG_JFFS2_DEV "nor1"
#define CONFIG_JFFS2_PART_SIZE 0x01ed
#define CONFIG_JFFS2_PART_OFFSET 0x0002
#define CONFGI_SYS_JFFS2_SORT_FRAGMENTS

This gives me the correct start and end address, but it still does not
recognize the JFFS2 partition:

=> ls
start_phys: fe02
end_phys: ffef
part->size: 1ed
size: 131072
Scanning JFFS2 FS: .  add_node: malloc failed
add_node failed!
ls: Failed to scan JFFSv2 file structure

Next, I tried setting up the mtd partitions:

#define CONFIG_CMD_MTDPARTS
#define CONFIG_MTD_DEVICE
#define CONFIG_FLASH_CFI_MTD
#define MTDIDS_DEFAULT "nor1=primary"
#define MTDPARTS_DEFAULT "mtdparts=primary:316...@128k(mypart)"
#define CONFIG_EXTRA_ENV_SETTINGS \
  "mtdids=nor1=primary \0" \
  "mtdparts=" MK_STR(MTDPARTS_DEFAULT) "\0"

But, again, the JFFS2 fails to load with the same error as above.

I am kind of out of ideas.  Can anyone give some advice?

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


Re: [U-Boot] U-Boot v2009.08 & JFFS2 (NOR)

2009-09-14 Thread Jon Diekema
On Mon, 2009-09-14 at 20:08 -0500, Tommy Wang wrote:
> Hello U-Boot Users,
> 
> I am working on updating a EP8248 based board from a very old U-Boot
> 1.1.2 to v2009.08.
> 
> The board has 2 banks of 32MB/256 sector NOR flash at 0xFC00 and
> 0xFE00.  The (single) JFFS2 partition is located at 0xFE02 to
> 0xFFEF.
> 
> Using U-Boot 1.1.2, the files within the partition show up just fine
> w/ the ls command.  Using U-Boot v2009.08, when booting Linux via
> TFTP, the JFFS2 partition can be mounted (mount -t jffs2
> /dev/mtdblock2 /mnt), and the files show up fine.  I cannot seem to
> get U-Boot to recognize the JFFS2 partition, however.
> 
> The existing JFFS2 configuration in U-Boot 1.1.2 is:
> 
> #define CFG_JFFS2_FIRST_BANK 1
> #define CFG_JFFS2_FIRST_SECTOR 1
> #define CFG_JFFS2_NUM_BANKS 1
> 
> In v2009.08, I have tried:
> 
> #define CONFIG_SYS_JFFS2_FIRST_BANK 1
> #define CONFIG_SYS_JFFS2_FIRST_SECTOR 1
> #define CONFIG_SYS_JFFS2_NUM_BANKS 1
> 
> My debug output shows me:
> 
> start_phys: fc00
> end_phys: fbff
> part->size: 
> 
> Looking through code, I saw that the above macros were no longer used.
>  The doc/README.JFFS2 seemed to be out of date.  I tried copying from
> configurations that look like they may work from other platforms:
> 
> #define CONFIG_JFFS2_DEV "nor1"
> #define CONFIG_JFFS2_PART_SIZE 0x01ed
> #define CONFIG_JFFS2_PART_OFFSET 0x0002
> #define CONFGI_SYS_JFFS2_SORT_FRAGMENTS
> 
> This gives me the correct start and end address, but it still does not
> recognize the JFFS2 partition:
> 
> => ls
> start_phys: fe02
> end_phys: ffef
> part->size: 1ed
> size: 131072
> Scanning JFFS2 FS: .  add_node: malloc failed
> add_node failed!
> ls: Failed to scan JFFSv2 file structure
> 
> Next, I tried setting up the mtd partitions:
> 
> #define CONFIG_CMD_MTDPARTS
> #define CONFIG_MTD_DEVICE
> #define CONFIG_FLASH_CFI_MTD
> #define MTDIDS_DEFAULT "nor1=primary"
> #define MTDPARTS_DEFAULT "mtdparts=primary:316...@128k(mypart)"
> #define CONFIG_EXTRA_ENV_SETTINGS \
>   "mtdids=nor1=primary \0" \
>   "mtdparts=" MK_STR(MTDPARTS_DEFAULT) "\0"
> 
> But, again, the JFFS2 fails to load with the same error as above.
> 
> I am kind of out of ideas.  Can anyone give some advice?

How about using something like the following:

> #undef  CONFIG_SYS_USE_UBI  /* Define to use UBI */
> #undef  CONFIG_SYS_USE_UBIFS/* Define to Use UBIFS */
> #define CONFIG_CMD_JFFS2/* Turn on the "fsload", "ls", and 
> "fsinfo" commands */
> 
> 
> #ifdef CONFIG_SYS_USE_UBIFS
> 
> #define CONFIG_CMD_UBIFS/* Turn on the "ubifsmount", 
> "ubifsls", */
> /* and "ubifsload" commands. */
> #define CONFIG_LZO  /* Use LZO library - needed for UBIFS 
> */
> #define CONFIG_SYS_USE_UBI  /* Use UBI */
> 
> #endif /* CONFIG_SYS_USE_UBIFS */
> 
> 
> #ifdef CONFIG_SYS_USE_UBI
> 
> #ifdef CONFIG_SYS_MALLOC_LEN
> #undef CONFIG_SYS_MALLOC_LEN
> #endif
> #define CONFIG_SYS_MALLOC_LEN   (CONFIG_ENV_SIZE + 1 * (1024 * 1024))
> 
> #define CONFIG_CMD_UBI  /* Turn on the "ubi" command */
> #define CONFIG_RBTREE   /* Red-black tree support - needed 
> for UBI */
> #define CONFIG_MTD_UBI_DEBUG/* Enable UBI debugging */
> #define CONFIG_MTD_PARTITIONS   /* Support MTD partitions */
> 
> #endif /* CONFIG_SYS_USE_UBI */
> 
> 
> #ifdef CONFIG_CMD_JFFS2
> #ifndef CONFIG_MTD_PARTITIONS
> #define CONFIG_MTD_PARTITIONS   /* Support MTD partitions */
> #define CONFIG_MTD_DEVICE   /* Support MTD devices */
> #endif /* CONFIG_MTD_PARTITIONS */
> #endif /* CONFIG_CMD_JFFS2 */
> 
> 
> #ifdef CONFIG_MTD_PARTITIONS
> 
> /* MTD partition support */
> #define CONFIG_FLASH_CFI_MTD  /* Export CFI flash to the MTD layer */ 
> #define CONFIG_CMD_MTDPARTS   /* Turn on the "chpart" and "mtdparts" 
> commands */
> 
> /* Default MTD partition table */
> #define MTDIDS_DEFAULT"nor0=yourBoard-0"
> #define MTDPARTS_DEFAULT  "mtdparts=yourBoard-0:" \
>   "384k(U-Boot),128k(U-Boot Env)," \
>   "384k(Backup U-Boot),128k(Backup U-Boot Env)," \
>   "13m(FIT Image)," \
>   "2m(Backup JFFS),112m(Data JFFS);"
> 
> #endif /* CONFIG_MTD_PARTITIONS */

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


Re: [U-Boot] [PATCH 2/4 v2] s5pc1xx: support onenand driver

2009-09-14 Thread Minkyu Kang
Dear Wolfgang

2009/9/10 Wolfgang Denk :
> Dear Minkyu Kang,
>
> In message <4aa8ac3b.5000...@samsung.com> you wrote:
>> This patch includes the onenand driver for s5pc100
>>
>> Signed-off-by: Minkyu Kang 
>> Signed-off-by: Kyungmin Park 
> ...
>> +struct s3c_onenand {
>> +     struct mtd_info *mtd;
>> +
>> +     void __iomem    *base;
>> +     void __iomem    *ahb_addr;
>> +
>> +     int             bootram_command;
>> +
>> +     void __iomem    *page_buf;
>> +     void __iomem    *oob_buf;
>> +
>> +     unsigned int    (*mem_addr)(int fba, int fpa, int fsa);
>> +
>> +     struct samsung_onenand *reg;
>> +};
>
> Please drop these blank lines.
>
ok.
>
>> +/*
>> + * 1Gb: FBA[21:12] FPA[11:6] FSA[5:4]
>> + * 2Gb: FBA[22:12] FPA[11:6] FSA[5:4]
>> + * 4Gb: FBA[23:12] FPA[11:6] FSA[5:4]
>> + */
>> +static unsigned int s3c64xx_mem_addr(int fba, int fpa, int fsa)
>> +{
>> +     return (fba << 12) | (fpa << 6) | (fsa << 4);
>> +}
>> +
>> +/*
>> + * 1Gb: FBA[22:13] FPA[12:7] FSA[6:5]
>> + * 2Gb: FBA[23:13] FPA[12:7] FSA[6:5]
>> + * 4Gb: FBA[24:13] FPA[12:7] FSA[6:5]
>> + */
>> +static unsigned int s5pc100_mem_addr(int fba, int fpa, int fsa)
>> +{
>> +     return (fba << 13) | (fpa << 7) | (fsa << 5);
>> +}
>
> Hm... when I wrote "This function needs explanation. Please add a
> comment what it does, and how." I meant some comment that really
> explains what is goong on here - what the arguments are, what the
> return value is, and which sort of transformation the function
> performs. Your comment is not exactly helpful.
>
> I can see what the code is doing, but I have no idea what that means -
> reading your comments don't help my understanding.
>

ok I'll write more comments.

> What I see raises just additional questions: should there be no error
> checking? I mean, something like
>
>        ... ((fpa & 0x3f) << 7) | ((fsa & 3) << 5)
>
> ?
>

hm.. I think no need.
because of each capacity have different offset
and each argument is got from mtd.
Kyungmin, how you think?

>
>> diff --git a/include/linux/mtd/samsung_onenand.h 
>> b/include/linux/mtd/samsung_onenand.h
>> new file mode 100644
>> index 000..d389606
>> --- /dev/null
>> +++ b/include/linux/mtd/samsung_onenand.h
> ...
>> +#ifndef __ASSEMBLY__
>> +struct samsung_onenand {
>> +     unsigned long   MEM_CFG;        /* 0x */
>> +     unsigned char   res1[0xc];
>> +     unsigned long   BURST_LEN;      /* 0x0010 */
>> +     unsigned char   res2[0xc];
>> +     unsigned long   MEM_RESET;      /* 0x0020 */
>> +     unsigned char   res3[0xc];
> ...
>
> Upper case vaiable names are not allowed. Upper case identifiers are
> reserved for macros only. Please use lower case names.

sure i do.

>
> 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
> That's the thing about people who think  they  hate  computers.  What
> they really hate is lousy programmers.
> - Larry Niven and Jerry Pournelle in "Oath of Fealty"
> ___
> U-Boot mailing list
> U-Boot@lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>

thanks
Minkyu Kang
-- 
from. prom.
www.promsoft.net
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCHv5 2/2] mucmc52, uc101: delete a...@3a00 node, if no CF card is detected

2009-09-14 Thread Heiko Schocher
U-Boot can detect if an IDE device is present or not.
If not, and this new config option is activated, U-Boot
removes the ATA node from the DTS before booting Linux,
so the Linux IDE driver does not probe the device and
crash. This is needed for buggy hardware (uc101) where
no pull down resistor is connected to the signal IDE5V_DD7.

Signed-off-by: Heiko Schocher 
---

changes since v1:
- added comment from Wolfgang Denk, to move this to a more
  common place, so others can also use it, and made it
  therefore per CONFIG_OF_IDE_FIXUP selectable.

changes since v2:
- add CONFIG_OF_IDE_FIXUP to mpc5200-common.h

changes since v3
- correct spelling in README and commit message, as
  Detlev Zundel suggested

changes since v4
- added comments from Stefan Roese
  Coding Style corrections
  do not longer include the global variable, instead
  call ide_device_present()
- added comment from Jerry Van Baren
  correct README entry

 README |9 +
 common/cmd_ide.c   |8 
 cpu/mpc5xxx/cpu.c  |   20 
 include/configs/manroland/mpc5200-common.h |1 +
 include/ide.h  |3 +++
 5 files changed, 41 insertions(+), 0 deletions(-)

diff --git a/README b/README
index ff4ed8b..8d0cbc9 100644
--- a/README
+++ b/README
@@ -386,6 +386,15 @@ The following options need to be configured:
This define fills in the correct boot CPU in the boot
param header, the default value is zero if undefined.

+   CONFIG_OF_IDE_FIXUP
+
+   U-Boot can detect if an IDE device is present or not.
+   If not, and this new config option is activated, U-Boot
+   removes the ATA node from the DTS before booting Linux,
+   so the Linux IDE driver does not probe the device and
+   crash. This is needed for buggy hardware (uc101) where
+   no pull down resistor is connected to the signal IDE5V_DD7.
+
 - vxWorks boot parameters:

bootvx constructs a valid bootline using the following
diff --git a/common/cmd_ide.c b/common/cmd_ide.c
index 4d7a0ac..ec9a1df 100644
--- a/common/cmd_ide.c
+++ b/common/cmd_ide.c
@@ -1624,6 +1624,14 @@ static void ide_led (uchar led, uchar status)

 #endif /* CONFIG_IDE_LED */

+#if defined(CONFIG_OF_IDE_FIXUP)
+int ide_device_present(int dev)
+{
+   if (dev >= CONFIG_SYS_IDE_MAXBUS)
+   return 0;
+   return (ide_dev_desc[dev].type == DEV_TYPE_UNKNOWN ? 0 : 1);
+}
+#endif
 /* - */

 #ifdef CONFIG_ATAPI
diff --git a/cpu/mpc5xxx/cpu.c b/cpu/mpc5xxx/cpu.c
index f6258c7..7307c05 100644
--- a/cpu/mpc5xxx/cpu.c
+++ b/cpu/mpc5xxx/cpu.c
@@ -40,6 +40,10 @@
 #include 
 #endif

+#if defined(CONFIG_OF_IDE_FIXUP)
+#include 
+#endif
+
 DECLARE_GLOBAL_DATA_PTR;

 int checkcpu (void)
@@ -137,6 +141,22 @@ void ft_cpu_setup(void *blob, bd_t *bd)
do_fixup_by_path(blob, eth_path, "mac-address", enetaddr, 6, 0);
do_fixup_by_path(blob, eth_path, "local-mac-address", enetaddr, 6, 0);
 #endif
+#if defined(CONFIG_OF_IDE_FIXUP)
+   if (ide_device_present(0)) {
+   /* NO CF card detected -> delete ata node in DTS */
+   int nodeoffset = 0;
+   char nodename[] = "/soc5...@f000/a...@3a00";
+
+   nodeoffset = fdt_path_offset(blob, nodename);
+   if (nodeoffset >= 0) {
+   fdt_del_node(blob, nodeoffset);
+   } else {
+   printf("%s: cannot find %s node err:%s\n",
+   __func__, nodename, fdt_strerror(nodeoffset));
+   }
+   }
+
+#endif
 }
 #endif

diff --git a/include/configs/manroland/mpc5200-common.h 
b/include/configs/manroland/mpc5200-common.h
index 2f092b1..b29ef9b 100644
--- a/include/configs/manroland/mpc5200-common.h
+++ b/include/configs/manroland/mpc5200-common.h
@@ -225,5 +225,6 @@
 #define OF_SOC "soc5...@f000"
 #define OF_TBCLK   (bd->bi_busfreq / 4)
 #define OF_STDOUT_PATH "/soc5...@f000/ser...@2000"
+#define CONFIG_OF_IDE_FIXUP

 #endif /* __MANROLAND_MPC52XX__COMMON_H */
diff --git a/include/ide.h b/include/ide.h
index ddb9579..6a1b7ae 100644
--- a/include/ide.h
+++ b/include/ide.h
@@ -54,4 +54,7 @@ void ide_init(void);
 ulong ide_read(int device, lbaint_t blknr, ulong blkcnt, void *buffer);
 ulong ide_write(int device, lbaint_t blknr, ulong blkcnt, void *buffer);

+#if defined(CONFIG_OF_IDE_FIXUP)
+int ide_device_present(int dev);
+#endif
 #endif /* _IDE_H */
-- 
1.6.0.6

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] about 88E1145

2009-09-14 Thread Prafulla Wadaskar

> -Original Message-
> From: u-boot-boun...@lists.denx.de 
> [mailto:u-boot-boun...@lists.denx.de] On Behalf Of Zhe Wang
> Sent: Monday, September 14, 2009 8:08 PM
> To: u-boot@lists.denx.de
> Subject: [U-Boot] about 88E1145
> 
> Hi all,
> 
>Now I encoutered one problem about 88E1145 in Uboot. The 
> CPU can access
> 88e1145 internel register correctly through SMI (PHY ID is 
> correct), but the
> ethernet connection does not work. I guess it is caused by 
> not initializing
> 88e1145 correctly. So could anybody help provide one correct 88e1145
> register initialization list? Thanks!
Hi Alga 
88E1116 bring up code is mainlined you can see 
boards/Marvell/Sheevaplug/sheevaplug.c
I hope you can get some useful reference from it.

Regards..
Prafulla . .

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


Re: [U-Boot] [PATCH] net: [V2] Add LL TEMAC driver to u-boot and move Emaclite to NET_MULTI

2009-09-14 Thread Michal Simek
Hi Ben,

sorry for head quoting but this is V2.
In my net branch is V3 which has some fixes which you reported.

Anyway. You want to create two separate patches. I am ok with it.
I'll do it and let you know.

Thanks,
Michal






Ben Warren wrote:
> mon...@monstr.eu wrote:
>> From: Michal Simek 
>>
>> Here are two major changes which should go together.
>> First is adding LL Temac driver to u-boot and the second
>> is changing Emaclite to NET_MULTI api.
>>
>>   
> Please break this up into two independent patches.  I can sort through 
> the common files when it comes time to integrate.
>> There are some changes for proper initialization too.
>>
>> Signed-off-by: Michal Simek 
>>
>> ---
>>
>> V2: Applied Ben comments
>> ---
>>  .../xilinx/microblaze-generic/microblaze-generic.c |   16 +
>>  drivers/net/Makefile   |1 +
>>  drivers/net/xilinx_emaclite.c  |   86 ++--
>>  drivers/net/xilinx_ll_temac.c  |  558 
>> 
>>  include/configs/microblaze-generic.h   |2 +
>>  include/netdev.h   |2 +
>>  lib_microblaze/board.c |   21 +-
>>  7 files changed, 639 insertions(+), 47 deletions(-)
>>  create mode 100644 drivers/net/xilinx_ll_temac.c
>>
>> diff --git a/board/xilinx/microblaze-generic/microblaze-generic.c 
>> b/board/xilinx/microblaze-generic/microblaze-generic.c
>> index f388b77..4ad9eb6 100644
>> --- a/board/xilinx/microblaze-generic/microblaze-generic.c
>> +++ b/board/xilinx/microblaze-generic/microblaze-generic.c
>> @@ -27,6 +27,7 @@
>>  
>>  #include 
>>  #include 
>> +#include 
>>  #include 
>>  #include 
>>  
>> @@ -67,3 +68,18 @@ void fsl_init2 (void) {
>>   NULL);
>>  }
>>  #endif
>> +
>> +int board_eth_init(bd_t *bis)
>> +{
>> +/*
>> + * This board either has PCI NICs or uses the CPU's TSECs
>> + * pci_eth_init() will return 0 if no NICs found, so in that case
>> + * returning -1 will force cpu_eth_init() to be called.
>> + */
>>   
> I asked before to remove this incorrect information.
>> +#ifdef CONFIG_XILINX_EMACLITE
>> +return xilinx_emaclite_initialize(bis);
>> +#endif
>> +#ifdef CONFIG_XILINX_LL_TEMAC
>> +return xilinx_ll_temac_initialize(bis);
>> +#endif
>> +}
>>   
> Here's an opportunity to pass in device addresses.
>> diff --git a/drivers/net/Makefile b/drivers/net/Makefile
>> index 67018bb..4fd53f9 100644
>> --- a/drivers/net/Makefile
>> +++ b/drivers/net/Makefile
>> @@ -73,6 +73,7 @@ COBJS-$(CONFIG_TSI108_ETH) += tsi108_eth.o
>>  COBJS-$(CONFIG_ULI526X) += uli526x.o
>>  COBJS-$(CONFIG_VSC7385_ENET) += vsc7385.o
>>  COBJS-$(CONFIG_XILINX_EMACLITE) += xilinx_emaclite.o
>> +COBJS-$(CONFIG_XILINX_LL_TEMAC) += xilinx_ll_temac.o
>>  
>>  COBJS   := $(COBJS-y)
>>  SRCS:= $(COBJS:.o=.c)
>> diff --git a/drivers/net/xilinx_emaclite.c b/drivers/net/xilinx_emaclite.c
>> index cf39573..99b5ae1 100644
>> --- a/drivers/net/xilinx_emaclite.c
>> +++ b/drivers/net/xilinx_emaclite.c
>> @@ -14,7 +14,7 @@
>>   * INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
>>   * FOR A PARTICULAR PURPOSE.
>>   *
>> - * (C) Copyright 2007-2008 Michal Simek
>> + * (C) Copyright 2007-2009 Michal Simek
>>   * Michal SIMEK 
>>   *
>>   * (c) Copyright 2003 Xilinx Inc.
>> @@ -25,6 +25,7 @@
>>  #include 
>>  #include 
>>  #include 
>> +#include 
>>  #include 
>>  
>>  #undef DEBUG
>> @@ -62,26 +63,19 @@
>>  #define XEL_RSR_RECV_IE_MASK0x0008UL
>>  
>>  typedef struct {
>> -unsigned int baseaddress;   /* Base address for device (IPIF) */
>> -unsigned int nexttxbuffertouse; /* Next TX buffer to write to */
>> -unsigned int nextrxbuffertouse; /* Next RX buffer to read from */
>> -unsigned char deviceid; /* Unique ID of device - for future */
>> +u32 baseaddress;/* Base address for device (IPIF) */
>> +u32 nexttxbuffertouse;  /* Next TX buffer to write to */
>> +u32 nextrxbuffertouse;  /* Next RX buffer to read from */
>> +uchar deviceid; /* Unique ID of device - for future */
>>  } xemaclite;
>>  
>>  static xemaclite emaclite;
>>  
>>  static u32 etherrxbuff[PKTSIZE_ALIGN/4]; /* Receive buffer */
>>  
>> -/* hardcoded MAC address for the Xilinx EMAC Core when env is nowhere*/
>> -#ifdef CONFIG_ENV_IS_NOWHERE
>> -static u8 emacaddr[ENET_ADDR_LENGTH] = { 0x00, 0x0a, 0x35, 0x00, 0x22, 0x01 
>> };
>> -#else
>> -static u8 emacaddr[ENET_ADDR_LENGTH];
>> -#endif
>> -
>> -void xemaclite_alignedread (u32 * srcptr, void *destptr, unsigned bytecount)
>> +static void xemaclite_alignedread (u32 * srcptr, void *destptr, u32 
>> bytecount)
>>  {
>> -unsigned int i;
>> +u32 i;
>>  u32 alignbuffer;
>>  u32 *to32ptr;
>>  u32 *from32ptr;
>> @@ -106,9 +100,9 @@ void xemaclite_alignedread (u32 * srcptr, void *destptr, 
>> unsigned bytecount)
>>  }
>>  }
>>  
>> -void xemaclite_alignedwrite (void *srcptr, u32 destptr, unsigned byte

Re: [U-Boot] [PATCH] Enable usb ehci support for p2020ds board

2009-09-14 Thread Hu Mingkai-B21284
 

> -Original Message-
> From: u-boot-boun...@lists.denx.de 
> [mailto:u-boot-boun...@lists.denx.de] On Behalf Of Felix Radensky
> Sent: Monday, September 14, 2009 3:50 PM
> To: Zang Roy-R61911
> Cc: U-Boot-Denx; Zhang Junjie-B18070; Kumar Gala
> Subject: Re: [U-Boot] [PATCH] Enable usb ehci support for 
> p2020ds board
> 
> Hi,
> 
> This is what I get on MPC8536DS:
> 
> U-Boot 2009.08-rc3 (Aug 26 2009 - 18:18:31)
> 
> CPU:   8536E, Version: 1.0, (0x803f0090)
> Core:  E500, Version: 3.0, (0x80210030)
> Clock Configuration:
>CPU0:1249.988 MHz,
>CCB:499.995 MHz,
>DDR:249.998 MHz (499.995 MT/s data rate) 
> (Synchronous), LBC:31.250 MHz
> L1:D-cache 32 kB enabled
>I-cache 32 kB enabled
> Board: MPC8536DS Sys ID: 0x15, Sys Ver: 0x10, FPGA Ver: 0x13, vBank: 0
> I2C:   ready
> DRAM:  InitializingDDR: 512 MB (DDR2, 64-bit, CL=4, ECC off)
> Top of RAM usable for U-Boot at: 2000 Reserving 800k for 
> U-Boot at: 1ff3 Reserving 1032k for malloc() at: 1fe2e000 
> Reserving 80 Bytes for Board Info at: 1fe2dfb0 Reserving 76 
> Bytes for Global Data at: 1fe2df64 Stack Pointer at: 1fe2df48 
> New Stack Pointer is: 1fe2df48 Now running in RAM - U-Boot 
> at: 1ff3
> FLASH: 128 MB
> L2:512 KB enabled
> NAND:  4096 MiB
> Invalid ID (ff ff ff ff)
> 
> PCIE3 connected to Slot3 as Root Complex (base address ffe0b000)
>Scanning PCI bus 01
> 01  00  8086  10b9  0200  00
> PCIE3 on bus 00 - 01
> 
> PCIE1 connected to Slot1 as Root Complex (base address ffe0a000)
> PCIE1 on bus 02 - 02
> 
> PCIE2 connected to Slot 2 as Root Complex (base address ffe09000)
> PCIE2 on bus 03 - 03
> 
> PCI: 32 bit, 66 MHz, async, host, arbiter (base address ffe08000)
>Scanning PCI bus 04
> PCI on bus 04 - 04
> Video: No radeon video card found!
> U-Boot relocated to 1ff3
> MMC:  FSL_ESDHC: 0
> Net:   e1000: 00:1b:21:1e:2d:2a
> eTSEC1, eTSEC3, e1000#0
> Warning: e1000#0 MAC addresses don't match:
> Address in SROM is 00:1b:21:1e:2d:2a
> Address in environment is  04:00:00:00:00:0c
> 
> Hit any key to stop autoboot:  0
> => usb reset
> (Re)start USB...
> USB:   Register 10011 NbrPorts 1
> USB EHCI 1.00
> scanning bus for devices... 2 USB Device(s) found
>scanning bus for storage devices... Device NOT ready
>Request Sense returned 00 00 00
> 0 Storage Device(s) found
> => usb info
> 1: Hub,  USB Revision 2.0
>  - u-boot EHCI Host Controller
>  - Class: Hub
>  - PacketSize: 64  Configurations: 1
>  - Vendor: 0x  Product 0x Version 1.0
>Configuration: 1
>- Interfaces: 1 Self Powered 0mA
>  Interface: 0
>  - Alternate Setting 0, Endpoints: 1
>  - Class Hub
>  - Endpoint 1 In Interrupt MaxPacket 2048 Interval 0ms
> 
> 2: Mass Storage,  USB Revision 2.0
>  - SanDisk Corporation Cruzer Mini 200435130107dcd07f5f
>  - Class: (from Interface) Mass Storage
>  - PacketSize: 64  Configurations: 1
>  - Vendor: 0x0781  Product 0x5150 Version 0.32
>Configuration: 1
>- Interfaces: 1 Bus Powered 200mA
>  Interface: 0
>  - Alternate Setting 0, Endpoints: 2
>  - Class Mass Storage, Transp. SCSI, Bulk only
>  - Endpoint 1 In Bulk MaxPacket 512
>  - Endpoint 1 Out Bulk MaxPacket 512
> 
> => fatls usb 0:1
> Device NOT ready
>Request Sense returned 00 00 00
> ** Can't read from device 0 **
> 
> ** Unable to use usb 0:1 for fatls **
> 

Hi Felix,

I tested this on my 8536DS board, it works well.

I noticed that when scan the USB, the device is not ready, so does the
board supply
the power to USB stick? I run into this problem sometimes.

And the CPU version you used is 1.0, so your board version should less
than B2.
I'm not sure whether this affects the results.

U-Boot 2009.08-00157-g8263793 (Sep 15 2009 - 10:21:04)

CPU:   8536E, Version: 1.1, (0x803f0091)
Core:  E500, Version: 3.0, (0x80210030)
Clock Configuration:
   CPU0:1499.985 MHz,
   CCB:499.995 MHz,
   DDR:333.330 MHz (666.660 MT/s data rate) (Asynchronous),
LBC:31.250 MHz
L1:D-cache 32 kB enabled
   I-cache 32 kB enabled
Board: MPC8536DS Sys ID: 0x15, Sys Ver: 0x10, FPGA Ver: 0x13, vBank: 0
I2C:   ready
DRAM:  InitializingDDR: 512 MB (DDR2, 64-bit, CL=5, ECC off)
FLASH: 128 MB
L2:512 KB enabled
NAND:  4096 MiB
EEPROM: Invalid ID (ff ff ff ff)

PCIE3 connected to Slot3 as Root Complex (base address ffe0b000)
PCIE3 on bus 00 - 00

PCIE1 connected to Slot1 as Root Complex (base address ffe0a000)
PCIE1 on bus 01 - 01

PCIE2 connected to Slot 2 as Root Complex (base address ffe09000)
PCIE2 on bus 02 - 02

PCI: 32 bit, 66 MHz, async, host, arbiter (base address ffe08000)
   Scanning PCI bus 03
PCI on bus 03 - 03
Video: No radeon video card found!
In:serial
Out:   serial
Err:   serial
MMC:  FSL_ESDHC: 0
Net:   eTSEC1, eTSEC3
Hit any key to stop autoboot:  0
=>
=>
=> usb reset
(Re)start USB...
USB:   Register 10011 NbrPorts 1
USB