Re: [U-Boot] Bug#897671: u-boot does not work on sheevaplug

2018-05-06 Thread drEagle
Hello all,

Take my apologies for the late activity and also for the mailer I am using, 
which may disturb the following reading.

> Le 6 mai 2018 à 02:13, Tom Rini  a écrit :
> 
> On Sat, May 05, 2018 at 04:04:08PM -0700, Vagrant Cascadian wrote:
> 
>> Hello U-Boot.
>> 
>> Markus Krebs discovered that the sheevaplug target has again grown and
>> installation overlaps where the u-boot env is saved since u-boot
>> ~2017.09. Running saveenv overwrites u-boot, and installing u-boot
>> overwrites any prior environment settings.
>> 
>> More detail on the bug report in Debian:
>> 
>>  https://bugs.debian.org/897671
>> 
>> We don't carry any patches for the sheevaplug u-boot target in Debian,
>> so this is likely also an issue upstream. Who are the current
>> maintainers for sheevaplug in u-boot upstream?
>> 
>> A brief summary of the current findings:
>> 
>> On 2018-05-05, Markus Krebs wrote:
>>> Am 05.05.2018 um 20:36 schrieb Markus Krebs:
 Am 05.05.2018 um 20:35 schrieb Martin Michlmayr:
> * Markus Krebs  [2018-05-05 20:32]:
>> I got it. Indeed it has to to with the size of u-boot.
> 
> Does it boot?
> 
 
 Yes it does.
>>> 
>>> ... and no longer so, when I "saveenv" :-(
>>> 
>>> I downloaded u-boot via git; I guess that the config for u-boot for 
>>> sheevaplug is already broken upstream (in sheevaplug.h):
>>> 
>>>   #define CONFIG_ENV_SIZE 0x2 /* 128k */
>>>   #define CONFIG_ENV_ADDR 0x8
>>>   #define CONFIG_ENV_OFFSET   0x8 /* env starts here */
>>> 
>>> but the environment shouldn't start at 0x8 when u-boot.kwb > 524 KB; 
>>> in this case 'saveenv' overwrites u-boot (?).
>>> Changing 0x8 to 0xa helps ; I compiled a u-boot.kwb from the 
>>> so-modified sources, and now I can start Debian fine.
>> 
>> It looks like it was bumped from 0x6 to 0x8 in 2014:
>> 
>>  
>> http://git.denx.de/?p=u-boot.git;a=commit;h=4dfb0e4d3e75763d6fbe8788316bea9ba23e8e01
>> 
>> If 0x8 isn't enough, there might be some features in the config to
>> experiment with removing, or it may need to be bumped again.
> 
> I've added the maintainer to the list as well.  I would suggest looking
> for things to trim out, perhaps CMD_MEMTEST ?  Also, a patch to make it
> a link error when we exceed the size allowed would be great, so that in
> the future we catch this when it happens.  Thanks!
> 
> 

Take a look to the proposal of patching the env config files to MTD1 and not 
offsetting from MTD0, which may take a quick fix.

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=781874 


> UBOOT ENV offset can be defined in sheevaplug.config in two ways.
> With a global offset as usual defined, but gets read errors if ENV move :
> +/dev/mtd0   0x8 0x2 0x2
> Or, my prefered proposition, which will not need change with future 
> modification of uboot size :
> +/dev/mtd1   0x0 0x2 0x2

Take also a look to openwork patches where the size is offset to 0xE on 
Kirkwood supported boards.

https://github.com/openwrt/openwrt/blob/f21cd9640052a733e1759519e3d7ca0f9453653b/package/boot/uboot-kirkwood/patches/110-dockstar.patch
 



-#define CONFIG_ENV_ADDR0x8
-#define CONFIG_ENV_OFFSET  0x8 /* env starts here */
+#define CONFIG_ENV_OFFSET  0xe /* env starts here */


I remember having a lot of troubles with this and I proposed the two solutions.
Better way will add also a test to get no write at all if overlapping binary, 
and we will get a robust solution.

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


[U-Boot] Request for tutorial

2015-04-09 Thread drEagle
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Hi all,

Is there any tutorial to help integrating a new platform into mainline u-boot ?
I may propose a new board upsream but the only information I have are an older 
refork uboot.

Any advice will be welcome.

Thanks
++GK
-BEGIN PGP SIGNATURE-
Version: GnuPG v2

iQEcBAEBCAAGBQJVJqbVAAoJEIoWzNw2mnfMMQwH/1pZDYYeI1X2KYio9CiIjTgI
vryijp0HP29Qt90/n1IMSTsPrE+HBLuMeatG29oKqmzSm4rAHK8O6M+zMDbeNrKF
VIHGTv+YKNEf2kzOt8Zcutx3caY76tZmm/O3ccFA1E49ggw2Fr6+8E8x1xBL33/n
OKMqZdie1/lNWW5oWuI2Rvlzh87WoFqgJl0DVh3rT+rja9+Jsm+k2EgFAY1uqT+r
BQd3wMVUuYSDPGsNhr/BXUgEXHmUZJxHBxl9m72dLrqjzq0NSTl1CalmhAlstcON
kXPjBpxdiTALhsPLuEa30xaRaoZcEq3PflC+YwJ3UxDpVsTiAfjYjK+NSWWVbCc=
=z2V6
-END PGP SIGNATURE-
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] KIRKWOOD - PARTITIONS and BOOTSTRAP

2015-04-07 Thread drEagle
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Hi,

Le 07/04/2015 02:39, Tom Rini a écrit :
 On Sat, Apr 04, 2015 at 06:13:18PM +0200, drEagle wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA256

 Le 03/04/2015 23:46, Vagrant Cascadian a écrit :
 On 2015-03-25, drEagle wrote:
 Le 21/03/2015 15:53, Vagrant Cascadian a écrit :
 It seems that OpenRD Ultimate with u-boot 2015.04-rc3 and newer no
 longer builds from source, both in Debian and with mainline git. It
 appears to have overgrown the size limits set for it:

 Looks like the NAND partition map had to be changed to give more space for 
 u-boot.

...
 I'll likely remove openrd_ultimate from future uploads to Debian if I
 can't get confirmation about how to fix this properly.

 The same may be a problem for SHEEVAPLUG and GURUPLUG, may be also all 
 KIRKWOOD derivatives.
 We need to get a more robust and compatible way to define the NAND PARTS, 
 the BOOTLOAD and the NAND UPGRADE.
 Each distribution has differents needs.

 It's a discution needed upstream because it ill impact all distribution and 
 users.
 
 It's possible that by removing some CONFIG options things can fit under
 the size limit and not require env to be moved.

I do not agree with a stay in the past situation.
I have proposed these refresh to help kirkwood plugs become useable.
This is a platform that was looking promising and had also been not so user 
frendly in the beginning.
The features like the sheevaplug MMC/SD driver was a pain.
UBOOT have greatly gain in a peace of software more robust that in was few 
years ago.
For Kirkwood Sheevaplugs we have also a device, SD cards, which was simply 
unuseable.

So I decided to get this driver upstream.

So what now ?
USB layer get fixed.
IDE layer get fixed.
UBIFS is a new standard.
EXT4 support helpfull.
DEVICETREE is needed for linux kernel support.

What I proposed is to get a refresh for :
- - The NAND partitions (with a possible study to be friendly with most 
distributions around)
- - To discuss about the better BOOTSTRAP method (I may used a script, propose 
defaults ENV. We may need to boot from IDE, USB, NAND, NET, ...)

It's an open discussion to get a friendly users, understand with the lesser 
patch in each distribution, with the most possibility afford.

I do not think that, all around customisation is the solution.

Enjoy
Gérald
-BEGIN PGP SIGNATURE-
Version: GnuPG v2

iQEcBAEBCAAGBQJVJLuSAAoJEIoWzNw2mnfM+E4H/je+trD4WIb4Fgm01IZxZyev
0i7Z7F9Yf7pENUmh+IWdjycVMbOTXfHfA4/NXkUTF/TPK8xoE7Qv/tDqoqbeQ1Tl
ZU2OtKu9HU8mKivj+2ljNSCoiahx9Kv22zU6VjNTlp0Xc423yiU9OjaFHpIQg6g3
BhFzbCIvM/SWRvUfpLtmGVuYR66hOIaKvFtg0k3MoD9ZdHXbQE9G3ywGGg6M3CVU
D6+OdWg8E5UyL6Ion3aBYYlieZRzCS3hvo2/QwT95XfFG9LHmt4wG6cTC5SQtmdZ
t/bUVFgB0OOderKN0kV4AVBn88rcdro5e+CkA4qKqYWn6hm2cb2YBIbs/XQDfKI=
=J7kX
-END PGP SIGNATURE-
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] u-boot: OpenRD Ultimate fails to build

2015-04-04 Thread drEagle
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Le 03/04/2015 23:46, Vagrant Cascadian a écrit :
 On 2015-03-25, drEagle wrote:
 Le 21/03/2015 15:53, Vagrant Cascadian a écrit :
 It seems that OpenRD Ultimate with u-boot 2015.04-rc3 and newer no
 longer builds from source, both in Debian and with mainline git. It
 appears to have overgrown the size limits set for it:

 Looks like the NAND partition map had to be changed to give more space for 
 u-boot.
 
 The following patch gets it to build by moving the env addr and offset
 later. This might cause problems with new or existing u-boot
 installations on openrd if the environment needs to be at a specific
 location. I have no hardware to test, so no way of confirming this
 directly:
 
 diff --git a/include/configs/openrd.h b/include/configs/openrd.h
 index b6f80af..2f1e174 100644
 --- a/include/configs/openrd.h
 +++ b/include/configs/openrd.h
 @@ -72,12 +72,12 @@
  /*
   * max 4k env size is enough, but in case of nand
   * it has to be rounded to sector size
   */
  #define CONFIG_ENV_SIZE  0x2 /* 128k */
 -#define CONFIG_ENV_ADDR  0x6
 -#define CONFIG_ENV_OFFSET0x6 /* env starts here */
 +#define CONFIG_ENV_ADDR  0x8
 +#define CONFIG_ENV_OFFSET0x8 /* env starts here */
  /*
   * Environment is right behind U-Boot in flash. Make sure U-Boot
   * doesn't grow into the environment area.
   */
  #define CONFIG_BOARD_SIZE_LIMIT  CONFIG_ENV_OFFSET
 
 
 I'll likely remove openrd_ultimate from future uploads to Debian if I
 can't get confirmation about how to fix this properly.

The same may be a problem for SHEEVAPLUG and GURUPLUG, may be also all KIRKWOOD 
derivatives.
We need to get a more robust and compatible way to define the NAND PARTS, the 
BOOTLOAD and the NAND UPGRADE.
Each distribution has differents needs.

It's a discution needed upstream because it ill impact all distribution and 
users.

Gérald

-BEGIN PGP SIGNATURE-
Version: GnuPG v2

iQEcBAEBCAAGBQJVIA2eAAoJEIoWzNw2mnfMARsH/AyoItE9b11eGbv06rDfRNyP
fnQx8Tfjj6tR+900rbivADLQt3FaeXiHzRHzw5yuwANL1+Es6DOWn5SaSfOJi8+2
x/vTownVs509Dmw625OJINudEOdo7Gl1NAB8g6aYOC4t/Bc99m++12/TAIR63HNA
72PgK6h+1skNJMORRIIefOjqjwBKK0IUAGtX4yWw6dvwt57Z1lt/djvauMT55b0L
VTcfA9X4kr4luvc/Xat7Z/S01K5UO+RHzeFHketFADRh/zL0dbyIBBl5brewzroT
zR9C2vwLutogWnk5IqTAIoxiCNfGl7WYClirT0UgupYLYZOaWFyBOi9ZdqUPYPU=
=mfV8
-END PGP SIGNATURE-
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] u-boot: OpenRD Ultimate fails to build

2015-03-25 Thread drEagle
Hi Vagrant,

Le 21/03/2015 15:53, Vagrant Cascadian a écrit :
 It seems that OpenRD Ultimate with u-boot 2015.04-rc3 and newer no
 longer builds from source, both in Debian and with mainline git. It
 appears to have overgrown the size limits set for it:

Looks like the NAND partition map had to be changed to give more space for 
u-boot.

Take care also that the MMC/SDIO kirkwood driver has been renamed and is now 
mainline (MVEBU_MMC).
Default define is in SheevaPlug config file.

guruplug_mvfs_and_mmc.diff and openrd-mmc.diff still refer to an old driver.
These 2 patches may both been removed.

Guruplug has no need of the kirkwood MMC driver, cause the MMC/uSD slot they 
get is an USB hardware.
OpenRD and derivatives must use the newer (MVEBU_MMC) driver.

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


Re: [U-Boot] [PATCH v2 1/1] marvell: kirkwood: guruplug refresh for newer kernel

2015-01-03 Thread drEagle
Hi Prafulla,

Any news of this patch ?

Regards,
Gérald

Le 23/12/2014 14:04, drEagle a écrit :
 Hi Prafulla,
 
 Is it okay also for this patch which is a GuruPlug refresh for same config as 
 the SheevaPlug one.
 
 Regards,
 Gérald
 
 Le 19/12/2014 08:20, Gerald Kerma a écrit :
 Refresh for newer kernel.
 Prepare ENV settings for guruplugs to be OpenWRT ready.

 +--+
 | UBOOT|  896 Kb (7x128)  = uboot
 +--+
 | ENV  |  128 Kb  = uboot_env
 +--+
 | ROOT(FS) |  511 Mb @ 1 Mb   = root - rootfs (ubifs)
 +--+

 With (CC) TRUNK OpenWRT build (QUICK HOWTO) :

 INTERRUPT
 Marvell nand erase.part root
 Marvell ubi part root
 Marvell ubi remove rootfs
 Marvell ubi create rootfs
 Marvell usb start
 Marvell fatload usb 2:1 0x80 
 guruplug/openwrt/openwrt-kirkwood-guruplugserverplus-rootfs.ubifs
 Marvell ubi write 0x80 rootfs ${filesize}
 Marvell reset

 Changes in v2:
 - Fix commit comments

 Changes in v1:
 - ADD generic board define
 - ADD FDT support
 - ADD HUSH interpreter
 - Define new NAND partition mapping

 Signed-off-by: Gerald Kerma drea...@doukki.net
 ---
  include/configs/guruplug.h | 84 
 --
  1 file changed, 67 insertions(+), 17 deletions(-)

 diff --git a/include/configs/guruplug.h b/include/configs/guruplug.h
 index a56a4cb..8e53af8 100644
 --- a/include/configs/guruplug.h
 +++ b/include/configs/guruplug.h
 @@ -1,5 +1,6 @@
  /*
 - * (C) Copyright 2009
 + * (C) Copyright 2009-2014
 + * Gerald Kerma drea...@doukki.net
   * Marvell Semiconductor www.marvell.com
   * Written-by: Siddarth Gore go...@marvell.com
   *
 @@ -9,6 +10,8 @@
  #ifndef _CONFIG_GURUPLUG_H
  #define _CONFIG_GURUPLUG_H
  
 +#define CONFIG_SYS_GENERIC_BOARD
 +
  /*
   * Version number information
   */
 @@ -23,17 +26,36 @@
  #define CONFIG_SKIP_LOWLEVEL_INIT   /* disable board lowlevel_init */
  
  /*
 + * Compression configuration
 + */
 +#define CONFIG_BZIP2
 +#define CONFIG_LZMA
 +#define CONFIG_LZO
 +
 +/*
 + * Enable device tree support
 + */
 +#define CONFIG_OF_LIBFDT
 +
 +/*
 + * Miscellaneous configurable options
 + */
 +#define CONFIG_SYS_HUSH_PARSER  /* use hush command parser */
 +
 +/*
   * Commands configuration
   */
  #define CONFIG_SYS_NO_FLASH /* Declare no flash (NOR/SPI) */
  #include config_cmd_default.h
 +#define CONFIG_CMD_BOOTZ
  #define CONFIG_CMD_DHCP
  #define CONFIG_CMD_ENV
 -#define CONFIG_CMD_FAT
 +#define CONFIG_CMD_IDE
 +#define CONFIG_CMD_MII
  #define CONFIG_CMD_NAND
  #define CONFIG_CMD_PING
  #define CONFIG_CMD_USB
 -#define CONFIG_CMD_IDE
 +#define CONFIG_CMD_FAT
  
  /*
   * mv-common.h should be defined after CMD configs since it used them
 @@ -55,24 +77,38 @@
   * it has to be rounded to sector size
   */
  #define CONFIG_ENV_SIZE 0x2 /* 128k */
 -#define CONFIG_ENV_ADDR 0x6
 -#define CONFIG_ENV_OFFSET   0x6 /* env starts here */
 +#define CONFIG_ENV_OFFSET   0xE /* env starts here */
  
  /*
   * Default environment variables
   */
 -#define CONFIG_BOOTCOMMAND  setenv ethact egiga0;  \
 -${x_bootcmd_ethernet}; setenv ethact egiga1;  \
 -${x_bootcmd_ethernet}; ${x_bootcmd_usb}; ${x_bootcmd_kernel}; \
 -setenv bootargs ${x_bootargs} ${x_bootargs_root}; \
 -bootm 0x640;
 -
 -#define CONFIG_EXTRA_ENV_SETTINGS   \
 -x_bootcmd_ethernet=ping 192.168.2.1\0 \
 -x_bootcmd_usb=usb start\0 \
 -x_bootcmd_kernel=nand read.e 0x640 0x10 0x40\0 \
 -x_bootargs=console=ttyS0,115200\0 \
 -x_bootargs_root=ubi.mtd=2 root=ubi0:rootfs rootfstype=ubifs\0
 +#define CONFIG_BOOTCOMMAND \
 +setenv bootargs ${console} ${mtdparts} ${bootargs_root};  \
 +ubi part root;\
 +ubifsmount ubi:rootfs;\
 +ubifsload 0x80 ${kernel}; \
 +ubifsload 0x70 ${fdt};\
 +ubifsumount;  \
 +fdt addr 0x70; fdt resize; fdt chosen;\
 +bootz 0x80 - 0x70
 +
 +#define CONFIG_MTDPARTS \
 +mtdparts=orion_nand:  \
 +896K(uboot),128K(uboot_env),  \
 +-@1M(root)\0
 +
 +#define CONFIG_EXTRA_ENV_SETTINGS \
 +console=console=ttyS0,115200\0\
 +mtdids=nand0=orion_nand\0 \
 +mtdparts=CONFIG_MTDPARTS  \
 +kernel=/boot/zImage\0 \
 +fdt=/boot/guruplug-server-plus.dtb\0  \
 +bootargs_root=ubi.mtd=2 root=ubi0:rootfs rootfstype=ubifs rw\0
 +
 +#define MTDIDS_DEFAULT  nand0=orion_nand
 +
 +#define

Re: [U-Boot] [PATCH v3 0/6] ARM: kirkwood: mvebu_mmc: Speed up access time

2015-01-03 Thread drEagle
Hi,

any news for this patch ?

Regards,
Gérald,

Le 23/12/2014 14:01, drEagle a écrit :
 Hi Pantelis,
 
 Is these patches reviewed and upstreamed ?
 
 Regards,
 Gérald
 
 Le 17/12/2014 11:18, Pantelis Antoniou a écrit :
 Hi Gerald,

 Last pull-req for mmc was last Friday, I intend to issue another this Friday 
 too.

 Regards

 — Pantelis

 On Dec 17, 2014, at 11:22 , drEagle drea...@doukki.net wrote:

 Hi,

 Any chance to be included in the next release of u-boot ?

 Regards,
 Gérald

 Le 15/12/2014 12:14, Mario Schuknecht a écrit :

 2014-12-13 21:35 GMT+01:00 Gérald Kerma drea...@doukki.net 
 mailto:drea...@doukki.net:


This serie of patches speed up access time of MVEBUMMC driver

This is allowed by a fix in MVEBUMMC init status check inspired from 
 linux MVSDIO driver.
 * Hardware weirdness.  The FIFO_EMPTY bit of the HW_STATE
 * register is sometimes not set before a while when some
 * unusual data block sizes are used (such as with the SWITCH
 * command), even despite the fact that the XFER_DONE interrupt
 * was raised.  And if another data transfer starts before
 * this bit comes to good sense (which eventually happens by
 * itself) then the new transfer simply fails with a timeout.

It allows about 10x to 40x faster access time transfer on SHEEVAPLUG MMC
It may also fixes some SD types incompatibilities

### before patch

Marvell ext2load mmc 0:1 0x80 uImage
1613392 bytes read in 977 ms (1.6 MiB/s)

### with fix

Marvell ext2load mmc 0:1 0x80 uImage
1613392 bytes read in 83 ms (18.5 MiB/s)



 Looks good to me.
 ACK to this series of patches:


Gérald Kerma (6):
  MVEBUMMC : Change copyright date
  MVEBUMMC : Speed up access time
  MVEBUMMC : FIX debug strings
  MVEBUMMC : REMOVE unnecessary delays
  MVEBUMMC : CLEAN code
  MVEBUMMC : REMOVE unnecessary delay from init


 drivers/mmc/mvebu_mmc.c | 103 
 
 include/mvebu_mmc.h |   1 +
 2 files changed, 61 insertions(+), 43 deletions(-)

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


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


Re: [U-Boot] [PATCH v3 0/6] SHEEVAPLUG : REFRESH 201412

2015-01-03 Thread drEagle
Le 23/12/2014 13:01, Prafulla Wadaskar a écrit :
 
 
 -Original Message-
 From: drEagle [mailto:drea...@doukki.net]
 Sent: 23 December 2014 17:14
 To: Prafulla Wadaskar
 Cc: u-boot@lists.denx.de; l...@openwrt.org
 Subject: Re: [U-Boot] [PATCH v3 0/6] SHEEVAPLUG :
 REFRESH 201412

 Hi Prafulla,

 Have you review these patchs ?
 Have you any comments or suggestions ?
 
 Nope... ready to get pulled.
 
 Regards...
 Prafulla . . .

Hi Prafulla,

Any news of this patch ?

Regards,
Gérald


 Le 17/12/2014 15:27, drEagle a écrit :
 Le 17/12/2014 15:24, Prafulla Wadaskar a écrit :


 -Original Message-
 From: Gérald Kerma [mailto:drea...@doukki.net]
 Sent: 17 December 2014 19:33
 To: u-boot@lists.denx.de; Prafulla Wadaskar
 Cc: albert.u.b...@aribaud.net; l...@openwrt.org;
 Gérald
 Kerma
 Subject: [PATCH v3 0/6] SHEEVAPLUG : REFRESH 201412

 Is this final one to be pulled, or you are planning
 more changes? :-)

 Hi Prafulla, I think this one is good.

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


Re: [U-Boot] [PATCH v3 0/6] SHEEVAPLUG : REFRESH 201412

2014-12-23 Thread drEagle
Hi Prafulla,

Have you review these patchs ?
Have you any comments or suggestions ?

Le 17/12/2014 15:27, drEagle a écrit :
 Le 17/12/2014 15:24, Prafulla Wadaskar a écrit :


 -Original Message-
 From: Gérald Kerma [mailto:drea...@doukki.net]
 Sent: 17 December 2014 19:33
 To: u-boot@lists.denx.de; Prafulla Wadaskar
 Cc: albert.u.b...@aribaud.net; l...@openwrt.org; Gérald
 Kerma
 Subject: [PATCH v3 0/6] SHEEVAPLUG : REFRESH 201412

 Is this final one to be pulled, or you are planning more changes? :-)
 
 Hi Prafulla, I think this one is good.

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


Re: [U-Boot] [PATCH v3 0/6] ARM: kirkwood: mvebu_mmc: Speed up access time

2014-12-23 Thread drEagle
Hi Pantelis,

Is these patches reviewed and upstreamed ?

Regards,
Gérald

Le 17/12/2014 11:18, Pantelis Antoniou a écrit :
 Hi Gerald,
 
 Last pull-req for mmc was last Friday, I intend to issue another this Friday 
 too.
 
 Regards
 
 — Pantelis
 
 On Dec 17, 2014, at 11:22 , drEagle drea...@doukki.net wrote:

 Hi,

 Any chance to be included in the next release of u-boot ?

 Regards,
 Gérald

 Le 15/12/2014 12:14, Mario Schuknecht a écrit :

 2014-12-13 21:35 GMT+01:00 Gérald Kerma drea...@doukki.net 
 mailto:drea...@doukki.net:


This serie of patches speed up access time of MVEBUMMC driver

This is allowed by a fix in MVEBUMMC init status check inspired from 
 linux MVSDIO driver.
 * Hardware weirdness.  The FIFO_EMPTY bit of the HW_STATE
 * register is sometimes not set before a while when some
 * unusual data block sizes are used (such as with the SWITCH
 * command), even despite the fact that the XFER_DONE interrupt
 * was raised.  And if another data transfer starts before
 * this bit comes to good sense (which eventually happens by
 * itself) then the new transfer simply fails with a timeout.

It allows about 10x to 40x faster access time transfer on SHEEVAPLUG MMC
It may also fixes some SD types incompatibilities

### before patch

Marvell ext2load mmc 0:1 0x80 uImage
1613392 bytes read in 977 ms (1.6 MiB/s)

### with fix

Marvell ext2load mmc 0:1 0x80 uImage
1613392 bytes read in 83 ms (18.5 MiB/s)



 Looks good to me.
 ACK to this series of patches:


Gérald Kerma (6):
  MVEBUMMC : Change copyright date
  MVEBUMMC : Speed up access time
  MVEBUMMC : FIX debug strings
  MVEBUMMC : REMOVE unnecessary delays
  MVEBUMMC : CLEAN code
  MVEBUMMC : REMOVE unnecessary delay from init


 drivers/mmc/mvebu_mmc.c | 103 
 
 include/mvebu_mmc.h |   1 +
 2 files changed, 61 insertions(+), 43 deletions(-)

--
2.1.3
___
U-Boot mailing list
U-Boot@lists.denx.de mailto: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] [PATCH v2 1/1] marvell: kirkwood: guruplug refresh for newer kernel

2014-12-23 Thread drEagle
Hi Prafulla,

Is it okay also for this patch which is a GuruPlug refresh for same config as 
the SheevaPlug one.

Regards,
Gérald

Le 19/12/2014 08:20, Gerald Kerma a écrit :
 Refresh for newer kernel.
 Prepare ENV settings for guruplugs to be OpenWRT ready.
 
 +--+
 | UBOOT|  896 Kb (7x128)  = uboot
 +--+
 | ENV  |  128 Kb  = uboot_env
 +--+
 | ROOT(FS) |  511 Mb @ 1 Mb   = root - rootfs (ubifs)
 +--+
 
 With (CC) TRUNK OpenWRT build (QUICK HOWTO) :
 
 INTERRUPT
 Marvell nand erase.part root
 Marvell ubi part root
 Marvell ubi remove rootfs
 Marvell ubi create rootfs
 Marvell usb start
 Marvell fatload usb 2:1 0x80 
 guruplug/openwrt/openwrt-kirkwood-guruplugserverplus-rootfs.ubifs
 Marvell ubi write 0x80 rootfs ${filesize}
 Marvell reset
 
 Changes in v2:
 - Fix commit comments
 
 Changes in v1:
 - ADD generic board define
 - ADD FDT support
 - ADD HUSH interpreter
 - Define new NAND partition mapping
 
 Signed-off-by: Gerald Kerma drea...@doukki.net
 ---
  include/configs/guruplug.h | 84 
 --
  1 file changed, 67 insertions(+), 17 deletions(-)
 
 diff --git a/include/configs/guruplug.h b/include/configs/guruplug.h
 index a56a4cb..8e53af8 100644
 --- a/include/configs/guruplug.h
 +++ b/include/configs/guruplug.h
 @@ -1,5 +1,6 @@
  /*
 - * (C) Copyright 2009
 + * (C) Copyright 2009-2014
 + * Gerald Kerma drea...@doukki.net
   * Marvell Semiconductor www.marvell.com
   * Written-by: Siddarth Gore go...@marvell.com
   *
 @@ -9,6 +10,8 @@
  #ifndef _CONFIG_GURUPLUG_H
  #define _CONFIG_GURUPLUG_H
  
 +#define CONFIG_SYS_GENERIC_BOARD
 +
  /*
   * Version number information
   */
 @@ -23,17 +26,36 @@
  #define CONFIG_SKIP_LOWLEVEL_INIT/* disable board lowlevel_init */
  
  /*
 + * Compression configuration
 + */
 +#define CONFIG_BZIP2
 +#define CONFIG_LZMA
 +#define CONFIG_LZO
 +
 +/*
 + * Enable device tree support
 + */
 +#define CONFIG_OF_LIBFDT
 +
 +/*
 + * Miscellaneous configurable options
 + */
 +#define CONFIG_SYS_HUSH_PARSER   /* use hush command parser */
 +
 +/*
   * Commands configuration
   */
  #define CONFIG_SYS_NO_FLASH  /* Declare no flash (NOR/SPI) */
  #include config_cmd_default.h
 +#define CONFIG_CMD_BOOTZ
  #define CONFIG_CMD_DHCP
  #define CONFIG_CMD_ENV
 -#define CONFIG_CMD_FAT
 +#define CONFIG_CMD_IDE
 +#define CONFIG_CMD_MII
  #define CONFIG_CMD_NAND
  #define CONFIG_CMD_PING
  #define CONFIG_CMD_USB
 -#define CONFIG_CMD_IDE
 +#define CONFIG_CMD_FAT
  
  /*
   * mv-common.h should be defined after CMD configs since it used them
 @@ -55,24 +77,38 @@
   * it has to be rounded to sector size
   */
  #define CONFIG_ENV_SIZE  0x2 /* 128k */
 -#define CONFIG_ENV_ADDR  0x6
 -#define CONFIG_ENV_OFFSET0x6 /* env starts here */
 +#define CONFIG_ENV_OFFSET0xE /* env starts here */
  
  /*
   * Default environment variables
   */
 -#define CONFIG_BOOTCOMMAND   setenv ethact egiga0;  \
 - ${x_bootcmd_ethernet}; setenv ethact egiga1;  \
 - ${x_bootcmd_ethernet}; ${x_bootcmd_usb}; ${x_bootcmd_kernel}; \
 - setenv bootargs ${x_bootargs} ${x_bootargs_root}; \
 - bootm 0x640;
 -
 -#define CONFIG_EXTRA_ENV_SETTINGS\
 - x_bootcmd_ethernet=ping 192.168.2.1\0 \
 - x_bootcmd_usb=usb start\0 \
 - x_bootcmd_kernel=nand read.e 0x640 0x10 0x40\0 \
 - x_bootargs=console=ttyS0,115200\0 \
 - x_bootargs_root=ubi.mtd=2 root=ubi0:rootfs rootfstype=ubifs\0
 +#define CONFIG_BOOTCOMMAND \
 + setenv bootargs ${console} ${mtdparts} ${bootargs_root};  \
 + ubi part root;\
 + ubifsmount ubi:rootfs;\
 + ubifsload 0x80 ${kernel}; \
 + ubifsload 0x70 ${fdt};\
 + ubifsumount;  \
 + fdt addr 0x70; fdt resize; fdt chosen;\
 + bootz 0x80 - 0x70
 +
 +#define CONFIG_MTDPARTS  \
 + mtdparts=orion_nand:  \
 + 896K(uboot),128K(uboot_env),  \
 + -@1M(root)\0
 +
 +#define CONFIG_EXTRA_ENV_SETTINGS \
 + console=console=ttyS0,115200\0\
 + mtdids=nand0=orion_nand\0 \
 + mtdparts=CONFIG_MTDPARTS  \
 + kernel=/boot/zImage\0 \
 + fdt=/boot/guruplug-server-plus.dtb\0  \
 + bootargs_root=ubi.mtd=2 root=ubi0:rootfs rootfstype=ubifs rw\0
 +
 +#define MTDIDS_DEFAULT   nand0=orion_nand
 +
 +#define MTDPARTS_DEFAULT \
 + mtdparts=CONFIG_MTDPARTS
  
  

Re: [U-Boot] [PATCH 1/1] kikwood: uboot-envtools: add plugs boards

2014-12-18 Thread drEagle
Sorry...

I post to the wrong list !

Regards,
Gérald

Le 18/12/2014 15:59, Gerald Kerma a écrit :
 Add some kirkwood plugs to uboot-envtools
 - SheevaPlug
 - SheevaPlug with eSATA
 - GuruplugServerPlus
 
 Signed-off-by: Gerald Kerma drea...@doukki.net
 ---
  package/boot/uboot-envtools/files/kirkwood | 5 -
  1 file changed, 4 insertions(+), 1 deletion(-)
 
 diff --git a/package/boot/uboot-envtools/files/kirkwood 
 b/package/boot/uboot-envtools/files/kirkwood
 index b15b8f9..13b3e60 100644
 --- a/package/boot/uboot-envtools/files/kirkwood
 +++ b/package/boot/uboot-envtools/files/kirkwood
 @@ -17,7 +17,10 @@ case $board in
  ea3500 | \
  ea4500 | \
  ib62x0 | \
 -pogo_e02)
 +guruplug-server-plus | \
 +pogo_e02| \
 +sheevaplug | \
 +sheevaplug-esata )
   ubootenv_add_uci_config /dev/mtd1 0x0 0x2 0x2
   ;;
  esac
 
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v3 0/6] ARM: kirkwood: mvebu_mmc: Speed up access time

2014-12-17 Thread drEagle
Hi,

Any chance to be included in the next release of u-boot ?

Regards,
Gérald

Le 15/12/2014 12:14, Mario Schuknecht a écrit :
 
 2014-12-13 21:35 GMT+01:00 Gérald Kerma drea...@doukki.net 
 mailto:drea...@doukki.net:
 
 
 This serie of patches speed up access time of MVEBUMMC driver
 
 This is allowed by a fix in MVEBUMMC init status check inspired from 
 linux MVSDIO driver.
  * Hardware weirdness.  The FIFO_EMPTY bit of the HW_STATE
  * register is sometimes not set before a while when some
  * unusual data block sizes are used (such as with the SWITCH
  * command), even despite the fact that the XFER_DONE interrupt
  * was raised.  And if another data transfer starts before
  * this bit comes to good sense (which eventually happens by
  * itself) then the new transfer simply fails with a timeout.
 
 It allows about 10x to 40x faster access time transfer on SHEEVAPLUG MMC
 It may also fixes some SD types incompatibilities
 
 ### before patch
 
 Marvell ext2load mmc 0:1 0x80 uImage
 1613392 bytes read in 977 ms (1.6 MiB/s)
 
 ### with fix
 
 Marvell ext2load mmc 0:1 0x80 uImage
 1613392 bytes read in 83 ms (18.5 MiB/s)
 
 
 
 Looks good to me.
 ACK to this series of patches:
  
 
 Gérald Kerma (6):
   MVEBUMMC : Change copyright date
   MVEBUMMC : Speed up access time
   MVEBUMMC : FIX debug strings
   MVEBUMMC : REMOVE unnecessary delays
   MVEBUMMC : CLEAN code
   MVEBUMMC : REMOVE unnecessary delay from init
 
 
  drivers/mmc/mvebu_mmc.c | 103 
 
  include/mvebu_mmc.h |   1 +
  2 files changed, 61 insertions(+), 43 deletions(-)
 
 --
 2.1.3
 ___
 U-Boot mailing list
 U-Boot@lists.denx.de mailto: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] [PATCH v3 0/6] SHEEVAPLUG : REFRESH 201412

2014-12-17 Thread drEagle
Le 17/12/2014 15:24, Prafulla Wadaskar a écrit :
 
 
 -Original Message-
 From: Gérald Kerma [mailto:drea...@doukki.net]
 Sent: 17 December 2014 19:33
 To: u-boot@lists.denx.de; Prafulla Wadaskar
 Cc: albert.u.b...@aribaud.net; l...@openwrt.org; Gérald
 Kerma
 Subject: [PATCH v3 0/6] SHEEVAPLUG : REFRESH 201412

 Is this final one to be pulled, or you are planning more changes? :-)

Hi Prafulla, I think this one is good.

Regards,
Gérald
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v3 1/2] arm: marvell: add LIBFDT support to sheevaplug

2014-12-05 Thread drEagle
Hi Prafulla,

Without LIBFDT feature, all newer kernel are unusable !

I agree with a review may be needed with : [PATCH v3 2/2] arm: marvell: fix ENV 
and MTDPARTS for sheevaplug 
is there any problem with : [PATCH v3 1/2] arm: marvell: add LIBFDT support to 
sheevaplug

Regards,
Gérald

Le 25/10/2014 07:54, Gerald Kerma a écrit :
 This patch add LIBFDT support to Marvell Sheevaplug
 
  Changes in v2:
  - mainline rebased
  Changes in v1:
  - add LIBFDT support
 
 Signed-off-by: Gerald Kerma drea...@doukki.net
 ---
  include/configs/sheevaplug.h | 6 ++
  1 file changed, 6 insertions(+)
 
 diff --git a/include/configs/sheevaplug.h b/include/configs/sheevaplug.h
 index 71be823..247789c 100644
 --- a/include/configs/sheevaplug.h
 +++ b/include/configs/sheevaplug.h
 @@ -49,6 +49,12 @@
  #define CONFIG_CMD_NAND
  #define CONFIG_CMD_PING
  #define CONFIG_CMD_USB
 +
 +/*
 +* Enable device tree support
 +*/
 +#define CONFIG_OF_LIBFDT
 +
  /*
   * mv-common.h should be defined after CMD configs since it used them
   * to enable certain macros
 




signature.asc
Description: OpenPGP digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] mvebu_mmc: Speed up access time

2014-11-25 Thread drEagle
Hi Mario,

I test this patch but it is unsuccessfull with the seevaplug :

After upgrade with U-Boot 2015.01-rc2-dirty (Nov 25 2014 - 08:10:39)
   
Marvell-Sheevaplug  

Marvell mmc list  
MVEBU_MMC: 0
Marvell mmc part  
Marvell mmc dev 0 1   
Card did not respond to voltage select! 
Marvell mmc rescan
Marvell ext2ls mmc 0:1
** Bad device mmc 0 **  
Marvell 

The same master branch (without your patch) work as before...

The udelay removal get the MVEBU_MMC driver bug with sheevaplug.

Regards,
Gérald

Le 03/11/2014 20:36, Mario Schuknecht a écrit :
 Remove udelay, because card status is polled in a loop.
 
 Signed-off-by: Mario Schuknecht mario.schukne...@dresearch-fe.de
 ---
  drivers/mmc/mvebu_mmc.c | 2 --
  1 file changed, 2 deletions(-)
 
 diff --git a/drivers/mmc/mvebu_mmc.c b/drivers/mmc/mvebu_mmc.c
 index 9f98c3f..2bf9444 100644
 --- a/drivers/mmc/mvebu_mmc.c
 +++ b/drivers/mmc/mvebu_mmc.c
 @@ -72,8 +72,6 @@ static int mvebu_mmc_send_cmd(struct mmc *mmc, struct 
 mmc_cmd *cmd,
   debug(cmdidx [0x%x] resp_type[0x%x] cmdarg[0x%x]\n,
 cmd-cmdidx, cmd-resp_type, cmd-cmdarg);
  
 - udelay(10*1000);
 -
   debug(%s: cmd %d (hw state 0x%04x)\n, DRIVER_NAME,
 cmd-cmdidx, mvebu_mmc_read(SDIO_HW_STATE));
  
 




signature.asc
Description: OpenPGP digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v3 0/2] arm: marvell: sheevaplug: add FDT and fixes MTDPARTS

2014-10-30 Thread drEagle
Hi Prafulla,

Can anyone review these patches ?

Regards,

On 25/10/2014 07:54, Gerald Kerma wrote:
 These series of patch :
  - fixes ENV and MTDPARTS for sheevaplug
  - add FDT support for sheevaplug
  - add the possibility to use a bootstrap from nand (bootscript)
 
 Gerald Kerma (2):
   arm: marvell: add LIBFDT support to sheevaplug
   arm: marvell: fix ENV and MTDPARTS for sheevaplug
 
  include/configs/sheevaplug.h | 62 
 ++--
  1 file changed, 42 insertions(+), 20 deletions(-)
 




signature.asc
Description: OpenPGP digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [BUG] kwimage v0 broken

2014-10-30 Thread drEagle
On 27/10/2014 08:18, Stefan Roese wrote:
 Hi!
 
 On 25.10.2014 07:59, drEagle wrote:
 With the latest u-boot mainline from denx git, the kirkwood image old 
 version/format are broken;
 Sheevaplug u-boot.kwb is no more flahsable and brick the plug.

 Using an older mkimage version still work with the same u-boot binary.

 u-boot (in elf loading mode) still work well also.

 If I can help by some tests, please feel free to ask.

 PS: I'm not on the list, thans to cc me.
 
 Hmmm. I have no access to a mainlined Kirkwood board right now. So I can't 
 really test right now. I added Luka to Cc, as he did some testing on this 
 patch series a few weeks ago. And IIRC, he didn't experience any such 
 problems with the kwimage tool.
 
 Luka, could you perhaps take another look at it? And give the current 
 mainline version a try on your board?

I can give some tests if you want, with sheevaplugs and guruplugs.

I also have a Mirabox for testing purpose.

Ask if you need more feedbacks with some notes.

Feel free to ask.

Regards,
Gérald



signature.asc
Description: OpenPGP digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [BUG] kwimage v0 broken

2014-10-30 Thread drEagle
On 30/10/2014 20:46, Prafulla Wadaskar wrote:

Hi all,

I have compared the latest kwimage and the oldest one.

I have found some minor differences that make my sheevaplugs flashing and 
u-booting again.

 -Original Message-
 From: u-boot-boun...@lists.denx.de [mailto:u-boot-
 boun...@lists.denx.de] On Behalf Of drEagle
 Sent: 30 October 2014 20:15
 To: Stefan Roese; Luka Perkov
 Cc: u-boot@lists.denx.de
 Subject: Re: [U-Boot] [BUG] kwimage v0 broken

 On 27/10/2014 08:18, Stefan Roese wrote:
 Hi!

 On 25.10.2014 07:59, drEagle wrote:
 With the latest u-boot mainline from denx git, the
 kirkwood image old version/format are broken;
 Sheevaplug u-boot.kwb is no more flahsable and brick
 the plug.

 Using an older mkimage version still work with the
 same u-boot binary.

 u-boot (in elf loading mode) still work well also.

 If I can help by some tests, please feel free to
 ask.

 PS: I'm not on the list, thans to cc me.

 Hmmm. I have no access to a mainlined Kirkwood board
 right now. So I can't really test right now. I added
 Luka to Cc, as he did some testing on this patch series
 a few weeks ago. And IIRC, he didn't experience any
 such problems with the kwimage tool.
 
 Hmm... We must fix this asap.
 Can someone post the patch?

A quick patch was sent to the list.

Enjoy,
Gérald




signature.asc
Description: OpenPGP digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [BUG] kwimage v0 broken

2014-10-26 Thread drEagle
Hi,

With the latest u-boot mainline from denx git, the kirkwood image old 
version/format are broken;
Sheevaplug u-boot.kwb is no more flahsable and brick the plug.

Using an older mkimage version still work with the same u-boot binary.

u-boot (in elf loading mode) still work well also.

If I can help by some tests, please feel free to ask.

PS: I'm not on the list, thans to cc me.



signature.asc
Description: OpenPGP digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 0/5] ARM: sheevaplug: refresh for 201410

2014-10-07 Thread DrEagle

Thank you Prafulla,

Is there a pull request planned to master 2014-10 release from 
git-marvell ?


Regards

Le 2014-10-01 13:21, Prafulla Wadaskar a écrit :

-Original Message-
From: drEagle [mailto:drea...@doukki.net]
Sent: 26 September 2014 14:47
To: Prafulla Wadaskar; Albert ARIBAUD
Cc: Nobuhiro Iwamatsu; U-Boot; Pantelis Antoniou; Tom
Rini
Subject: Re: [PATCH 0/5] ARM: sheevaplug: refresh for
201410

Hi,

Is there any actions to take theses patches mainlined ?



This patch series is applies to u-boot-marvell.git master branch

Thanks and regards...
Prafulla . . .


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


Re: [U-Boot] [PATCH 0/5] ARM: sheevaplug: refresh for 201410

2014-09-26 Thread drEagle
Hi,

Is there any actions to take theses patches mainlined ?

Regards,

On 21/09/2014 08:47, drEagle wrote:
 Hi Prafulla,
 
 Is there any chance for theses patches to be reviewed in time for next 
 release ?
 
 Can you get it reviewed by anyone else ?
 
 Enjoy,
 
 On 15/09/2014 06:36, drEagle wrote:
 Hi Preafulla,

 Any news about these patches ?

 Regards,

 On 09/09/2014 08:59, Prafulla Wadaskar wrote:
 Hi Everybody,

 Sorry for being inactive on the thread...
 I will pull these patches and provide a pull request to albert soon...

 Regards...
 Prafulla . . .

 -Original Message-
 From: Nobuhiro Iwamatsu [mailto:iwama...@nigauri.org]
 Sent: 09 September 2014 12:08
 To: Albert ARIBAUD
 Cc: U-Boot; Prafulla Wadaskar; Pantelis Antoniou;
 Gerald Kerma; Tom Rini
 Subject: Re: [PATCH 0/5] ARM: sheevaplug: refresh for
 201410

 Hi, Albert.

 These patches are not taken for a long time.
 If possible and Prafulla is OK, can you apply to u-
 boot-arm directly?

 Best regards,
   Nobuhiro

 2014-09-08 1:01 GMT+09:00 Gerald Kerma
 drea...@doukki.net:
 This serie of patches add some needed features to
 sheevaplug

 Gerald Kerma (5):
   ARM: sheevaplug: change env location
   ARM: sheevaplug: add MVSATA driver
   ARM: sheevaplug: add MTD defaults
   ARM: sheevaplug: redefine MTDPARTS
   ARM: sheevaplug: add HUSH parser

  include/configs/sheevaplug.h | 46
 +++-
  1 file changed, 41 insertions(+), 5 deletions(-)

 --
 1.9.1




 --
 Nobuhiro Iwamatsu
iwamatsu at {nigauri.org / debian.org}
GPG ID: 40AD1FA6


 
 




signature.asc
Description: OpenPGP digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 0/5] ARM: sheevaplug: refresh for 201410

2014-09-21 Thread drEagle
Hi Prafulla,

Is there any chance for theses patches to be reviewed in time for next release ?

Can you get it reviewed by anyone else ?

Enjoy,

On 15/09/2014 06:36, drEagle wrote:
 Hi Preafulla,
 
 Any news about these patches ?
 
 Regards,
 
 On 09/09/2014 08:59, Prafulla Wadaskar wrote:
 Hi Everybody,

 Sorry for being inactive on the thread...
 I will pull these patches and provide a pull request to albert soon...

 Regards...
 Prafulla . . .

 -Original Message-
 From: Nobuhiro Iwamatsu [mailto:iwama...@nigauri.org]
 Sent: 09 September 2014 12:08
 To: Albert ARIBAUD
 Cc: U-Boot; Prafulla Wadaskar; Pantelis Antoniou;
 Gerald Kerma; Tom Rini
 Subject: Re: [PATCH 0/5] ARM: sheevaplug: refresh for
 201410

 Hi, Albert.

 These patches are not taken for a long time.
 If possible and Prafulla is OK, can you apply to u-
 boot-arm directly?

 Best regards,
   Nobuhiro

 2014-09-08 1:01 GMT+09:00 Gerald Kerma
 drea...@doukki.net:
 This serie of patches add some needed features to
 sheevaplug

 Gerald Kerma (5):
   ARM: sheevaplug: change env location
   ARM: sheevaplug: add MVSATA driver
   ARM: sheevaplug: add MTD defaults
   ARM: sheevaplug: redefine MTDPARTS
   ARM: sheevaplug: add HUSH parser

  include/configs/sheevaplug.h | 46
 +++-
  1 file changed, 41 insertions(+), 5 deletions(-)

 --
 1.9.1




 --
 Nobuhiro Iwamatsu
iwamatsu at {nigauri.org / debian.org}
GPG ID: 40AD1FA6
 
 




signature.asc
Description: OpenPGP digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 0/5] ARM: sheevaplug: refresh for 201410

2014-09-14 Thread drEagle
Hi Preafulla,

Any news about these patches ?

Regards,

On 09/09/2014 08:59, Prafulla Wadaskar wrote:
 Hi Everybody,
 
 Sorry for being inactive on the thread...
 I will pull these patches and provide a pull request to albert soon...
 
 Regards...
 Prafulla . . .
 
 -Original Message-
 From: Nobuhiro Iwamatsu [mailto:iwama...@nigauri.org]
 Sent: 09 September 2014 12:08
 To: Albert ARIBAUD
 Cc: U-Boot; Prafulla Wadaskar; Pantelis Antoniou;
 Gerald Kerma; Tom Rini
 Subject: Re: [PATCH 0/5] ARM: sheevaplug: refresh for
 201410

 Hi, Albert.

 These patches are not taken for a long time.
 If possible and Prafulla is OK, can you apply to u-
 boot-arm directly?

 Best regards,
   Nobuhiro

 2014-09-08 1:01 GMT+09:00 Gerald Kerma
 drea...@doukki.net:
 This serie of patches add some needed features to
 sheevaplug

 Gerald Kerma (5):
   ARM: sheevaplug: change env location
   ARM: sheevaplug: add MVSATA driver
   ARM: sheevaplug: add MTD defaults
   ARM: sheevaplug: redefine MTDPARTS
   ARM: sheevaplug: add HUSH parser

  include/configs/sheevaplug.h | 46
 +++-
  1 file changed, 41 insertions(+), 5 deletions(-)

 --
 1.9.1




 --
 Nobuhiro Iwamatsu
iwamatsu at {nigauri.org / debian.org}
GPG ID: 40AD1FA6




signature.asc
Description: OpenPGP digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/1] ARM: sheevaplug: fix uboot corruption

2014-09-06 Thread drEagle
Hi,

Is there any chance for this patch to be upstreamed in the next release ?

On sheevaplug if you try the latest u-boot you may be brick the plug.
It will be corrupted because of the size of the of the u-boot binary.

The fix of env location proposed is a needed fix.

I have still some few patch to propose been mainlined next this one.
Is the marvell u-boot custodian still active ?

Enjoy,

On 27/07/2014 07:54, Gerald Kerma wrote:
 This patch move the environment offset in sheevaplug.
 The size of the u-boot binary is become too big.
 Saving environments will result of corrupting the u-boot.
 
 Signed-off-by: Gerald Kerma drea...@doukki.net
 ---
 
  Changes in v1:
  - fix sheevaplug environment offset
 
  include/configs/sheevaplug.h | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/include/configs/sheevaplug.h b/include/configs/sheevaplug.h
 index 3d6ff09..85c6bc2 100644
 --- a/include/configs/sheevaplug.h
 +++ b/include/configs/sheevaplug.h
 @@ -55,8 +55,8 @@
   * it has to be rounded to sector size
   */
  #define CONFIG_ENV_SIZE  0x2 /* 128k */
 -#define CONFIG_ENV_ADDR  0x6
 -#define CONFIG_ENV_OFFSET0x6 /* env starts here */
 +#define CONFIG_ENV_ADDR  0x8
 +#define CONFIG_ENV_OFFSET0x8 /* env starts here */
  
  /*
   * Default environment variables
 




signature.asc
Description: OpenPGP digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Pull request: u-boot-mmc 1/08/2014

2014-08-01 Thread drEagle
On 01/08/2014 20:22, Marek Vasut wrote:
 On Friday, August 01, 2014 at 07:21:23 PM, Pantelis Antoniou wrote:
 Hi Tom,

 The following changes since commit
 25b4adbba018633b943a99322bfb2fb819c0bafb:

   include: remove CONFIG_SPL/CONFIG_TPL definition in config headers
 (2014-07-30 14:42:03 -0400)

 are available in the git repository at:

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

 for you to fetch changes up to 6e7b7df4df435742fcfde5f384760ae1bda2e39c:

   env_mmc: support env partition setup in runtime (2014-08-01 20:12:15
 +0300)

 
 Bo Shen (3):
   MMC: atmel_mci: refactor setting the mode register
   MMC: atmel_mci: add configuration register definition
   MMC: atmel_mci: enable high speed mode support

 Chin Liang See (1):
   mmc/dw_mmc: Fix clock divider calculation error for bypass mode

 Dmitry Lifshitz (2):
   env_mmc: add mmc_get_env_addr() prototype
   env_mmc: support env partition setup in runtime

 DrEagle (1):
 
 What is this nickname doing here ? Where is the full name of this person ?

I do not know that nickname was forbidden to contribute.
My Real name is Gérald Kerma.

   ARM: kirkwood: add mvsdio driver
 [...]
 
 Best regards,
 Marek Vasut

Enjoy,
Gérald




signature.asc
Description: OpenPGP digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v7 1/1] ARM: kirkwood: add mvsdio driver

2014-07-29 Thread drEagle
Hi Stefan,

On 26/07/2014 13:54, Stefan Roese wrote:
 On 25.07.2014 21:07, Gerald Kerma wrote:
 This patch add Marvell kirkwood MVSDIO/MMC driver
 and enable it for Sheevaplugs and OpenRD boards.

 Signed-off-by: Gerald Kerma drea...@doukki.net
 
 Looks good now, so:
 
 Reviewed-by: Stefan Roese s...@denx.de

Thank for you review.

Is there any action I have to do now ?

Enjoy



signature.asc
Description: OpenPGP digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v4 1/1] ARM: kirkwood: add mvsdio driver

2014-07-25 Thread drEagle
Hi Stefan,

On 25/07/2014 09:15, Stefan Roese wrote:
 Hi Gerald,

 Thanks. But still some more comments below.

Thanks for the review.

Just sent a new version of the patch.

 I still don't see why this function is needed for the MMC driver. It seems to 
 only be used from a debug() output. I suggest to remove it from this patch to 
 not touch the general kirkwood stuff.
 
 Also this MMC driver should be able to support multiple Marvells SoC's, 
 right? So calling some kirkwood functions doesn't seem to be generic.

Agree, cleaned as requested.

 Again, please use the SPDX license identifier as done in all U-Boot sources 
 now. This is mandatory!

Oops...

 BTW: You seem to be adding a new Kirkwood SoC version with this MMC patch. 
 This really is not MMC related and should be split into a separate patch.

Will do this.

Enjoy,



signature.asc
Description: OpenPGP digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v5 1/1] ARM: kirkwood: add mvsdio driver

2014-07-25 Thread drEagle
Hi Stefan,

On 25/07/2014 16:50, Stefan Roese wrote:
 On 25.07.2014 15:27, Gerald Kerma wrote:
 This patch add Marvell kirkwood MVSDIO/MMC driver
 and enable it for Sheevaplugs and OpenRD boards.

 Signed-off-by: Gerald Kerma drea...@doukki.net
 
 Please don't send this patch as base64 encoded. It makes it impossible to 
 apply this patch or run checkpatch on it.

I use git send-email and I have used the default encoding [UTF-8], what is the 
preferred format that I may specify ?

 Did you run it though checkpatch btw?

yes, the results given is :
total: 0 errors, 0 warnings, 0 checks, 744 lines checked

Same for the coming v6 on 730 lines checked. 

 I suggest to rename the driver to mvebu_mmc.c instead. This MVEBU is the 
 generally agreed upon abbreviation for Marvell SoC's (Orion, Kirkwood, Armada 
 XP, 370 ...).

Done,

 Doesn't it make sense to move this code to init / enable the MMC driver into 
 the arch/cpu/... SoC code? Instead of adding it to all the board specific 
 files?

Good idea

 Here we have this code again. I suggest to move it to the kirkwood cpu.c file 
 instead.

Done

I'll check and send a new version (v6).
Do I rename the patch header ?

Enjoy




signature.asc
Description: OpenPGP digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v5 1/1] ARM: kirkwood: add mvsdio driver

2014-07-25 Thread drEagle
 Please don't send this patch as base64 encoded. It makes it impossible to 
 apply this patch or run checkpatch on it.
 
 I use git send-email and I have used the default encoding [UTF-8], what is 
 the preferred format that I may specify ?

My first name is Gérald.
So the message are sent in UTF-8

MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Is this a problem ?

Enjoy,
-- 



signature.asc
Description: OpenPGP digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v6 1/1] ARM: kirkwood: add mvsdio driver

2014-07-25 Thread drEagle
On 25/07/2014 20:19, Stefan Roese wrote:
 On 25.07.2014 19:07, Gerald Kerma wrote:
 This patch add Marvell kirkwood MVSDIO/MMC driver
 and enable it for Sheevaplugs and OpenRD boards.

 Signed-off-by: Gerald Kerma drea...@doukki.net

 Thanks. This really looks better.
 
 Only some mostly nitpicking comments below.

correction added in next version.

 diff --git a/include/configs/sheevaplug.h b/include/configs/sheevaplug.h
 index ecc93bc..de38ad3 100644
 --- a/include/configs/sheevaplug.h
 +++ b/include/configs/sheevaplug.h
 @@ -31,9 +31,11 @@
   #define CONFIG_CMD_DHCP
   #define CONFIG_CMD_ENV
   #define CONFIG_CMD_MII
 +#define CONFIG_CMD_MMC
   #define CONFIG_CMD_NAND
   #define CONFIG_CMD_PING
   #define CONFIG_CMD_USB
 +
   /*
* mv-common.h should be defined after CMD configs since it used them
* to enable certain macros
 @@ -49,13 +51,14 @@
   #else
   #define CONFIG_ENV_IS_NOWHERE1/* if env in SDRAM */
   #endif
 +
   /*
* max 4k env size is enough, but in case of nand
* it has to be rounded to sector size
*/
   #define CONFIG_ENV_SIZE0x2/* 128k */
 -#define CONFIG_ENV_ADDR0x6
 -#define CONFIG_ENV_OFFSET0x6/* env starts here */
 +#define CONFIG_ENV_ADDR0x8
 +#define CONFIG_ENV_OFFSET0x8/* env starts here */
 
 This change seems to be unrelated. And breaks compatibility with the 
 environment. Or am I missing something?

Removed, but, the new u-boot.kwb image is greater than 0x6. If you write 
environments or reset environments that will corrupt uboot and broke it.

May be fixed in another patch. 

 Thanks for your patience!
 
 Stefan

V7 sent.

Enjoy,





signature.asc
Description: OpenPGP digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 1/1] ARM: kirkwood: add mvsdio driver

2014-07-24 Thread drEagle
Hi Pantelis,

Thansk for your feedback.

On 22/07/2014 17:36, Pantelis Antoniou wrote:
 Hi Gerald,
 
 On Jul 20, 2014, at 9:28 AM, Gerald Kerma wrote:
 
 This patch add Marvell kirkwood MVSDIO/MMC driver and enable it for 
 Sheevaplugs
 and OpenRD boards.
 - Fix some typo and missing lines from patch import

 Signed-off-by: Gerald Kerma drea...@doukki.net

v3 sent.

 I guess you could move the initialization of timeout here, but it's no biggie.
 I'll let it pass.

Sure,
cleaned.

 Drop this, or put it under a quirk.

I added a quirk in case off

 All in all looks to be in excellent state. Just remove the #if and I'll pick 
 it up
 for the next mmc drop.

Done.

Enjoy
Gérald




signature.asc
Description: OpenPGP digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 1/1] ARM: kirkwood: add mvsdio driver

2014-07-22 Thread drEagle
Hi Prafulla,

On 20/07/2014 14:54, Prafulla Wadaskar wrote:
 
 This patch add Marvell kirkwood MVSDIO/MMC driver and
 enable it for Sheevaplugs
 and OpenRD boards.
 - Fix some typo and missing lines from patch import
 
 If above line is your change log info then it should put is below ---
 Also you should maintain all history like...
 Change log V1:...
 Change log V2:...

Is there any chance to get this patch be reviewed in time for been included in 
the near stable release ?

Regards,
G



signature.asc
Description: OpenPGP digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 1/1] ARM: kirkwood: add mvsdio driver

2014-07-22 Thread drEagle
Hi Prafulla,

On 20/07/2014 14:54, Prafulla Wadaskar wrote:
 
 This patch add Marvell kirkwood MVSDIO/MMC driver and
 enable it for Sheevaplugs
 and OpenRD boards.
 - Fix some typo and missing lines from patch import
 
 If above line is your change log info then it should put is below ---
 Also you should maintain all history like...
 Change log V1:...
 Change log V2:...

Is there any chance to get this patch be reviewe in time for been included in 
the near stable release ?

Regards,
G



signature.asc
Description: OpenPGP digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Marvell SheevaPlug v2013.04 Refresh (ask for review)

2013-07-07 Thread DrEagle
Le 05/07/2013 23:08, Albert ARIBAUD a écrit :
 Hi Gérald,

Hello,

 On Tue, 02 Jul 2013 23:17:51 +0200, DrEagle drea...@doukki.net wrote:
 
 Hi,

 I have started to rework all the MVSDIO driver, and some more enhancements, 
 to make a cool updated and workable SheevaPlug.
 I have take the v2013.04 denx uBoot to base my patchs.

 If you can take a look inside and give me needed feedback.

 I want to precise that I do not easily practice GIT features.
 
 Pease submit patch according to the patch submission guidelines at
 http://www.denx.de/wiki/U-Boot/Patches. Especially, do not send
 patches to the list as attachments; instead, use 'git format-patch' and
 'git send-email'. Also, put the relevant custodians and/or maintainers
 in Cc: of your mail.

I'll try to get it rewrote according rules.

I do not get git send-email working.

So I have take appart the patch and will send them separatly.

Regards,
Gérald
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 0/8] arm kirkwood - sheevaplug refresh

2013-07-07 Thread DrEagle
This serie of patch :
- add kirkwood_id to detect supported devices and revisions
- update supported devices and revisions
- add kw88f6282 support
- add SDIO/MMC generic driver v3
- add SDIO/MMC driver support to Kirkwood SoC
- add SDIO/MMC support to Sheevaplug board
- add MVSATA sheevaplug support
- update sheevaplug defaults config

Signed-off-by: drEagle ub...@doukki.net
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 1/8] arm kirkwood - add kirkwood_id

2013-07-07 Thread DrEagle
- add kirkwood_id to detect supported devices and revisions

Signed-off-by: drEagle ub...@doukki.net

 arch/arm/cpu/arm926ejs/kirkwood/cpu.c  |
 arch/arm/include/asm/arch-kirkwood/cpu.h   |

diff --git a/arch/arm/cpu/arm926ejs/kirkwood/cpu.c 
b/arch/arm/cpu/arm926ejs/kirkwood/cpu.c
index fba5e01..720fccf 100644
--- a/arch/arm/cpu/arm926ejs/kirkwood/cpu.c
+++ b/arch/arm/cpu/arm926ejs/kirkwood/cpu.c
@@ -350,6 +350,64 @@ int arch_cpu_init(void)
 }
 #endif /* CONFIG_ARCH_CPU_INIT */
 
+/*
+ * General
+ /
+#if defined(CONFIG_ARCH_DEV_ID)
+
+void kirkwood_pcie_id(u32 *dev, u32 *rev)
+{
+   *dev = (readl(KW_REG_PCIE_DEVID)  16)  0x;
+   *rev = readl(KW_REG_PCIE_REVID)  0xff;
+}
+
+/*
+ * Identify device ID and revision.
+ */
+char *kirkwood_id(void)
+{
+   u32 dev, rev;
+
+   kirkwood_pcie_id(dev, rev);
+
+   if (dev == MV88F6281_DEV_ID) {
+   if (rev == MV88F6281_REV_Z0)
+   return MV88F6281-Z0;
+   else if (rev == MV88F6281_REV_A0)
+   return MV88F6281-A0;
+   else if (rev == MV88F6281_REV_A1)
+   return MV88F6281-A1;
+   else
+   return MV88F6281-Rev-Unsupported;
+   } else if (dev == MV88F6192_DEV_ID) {
+   if (rev == MV88F6192_REV_Z0)
+   return MV88F6192-Z0;
+   else if (rev == MV88F6192_REV_A0)
+   return MV88F6192-A0;
+   else if (rev == MV88F6192_REV_A1)
+   return MV88F6192-A1;
+   else
+   return MV88F6192-Rev-Unsupported;
+   } else if (dev == MV88F6180_DEV_ID) {
+   if (rev == MV88F6180_REV_A0)
+   return MV88F6180-Rev-A0;
+   else if (rev == MV88F6180_REV_A1)
+   return MV88F6180-Rev-A1;
+   else
+   return MV88F6180-Rev-Unsupported;
+   } else if (dev == MV88F6282_DEV_ID) {
+   if (rev == MV88F6282_REV_A0)
+   return MV88F6282-Rev-A0;
+   else if (rev == MV88F6282_REV_A1)
+   return MV88F6282-Rev-A1;
+   else
+   return MV88F6282-Rev-Unsupported;
+   } else {
+   return Device-Unknown;
+   }
+}
+#endif /* CONFIG_ARCH_DEV_ID */
+
 /*
  * SOC specific misc init
  */
--- a/arch/arm/include/asm/arch-kirkwood/cpu.h
+++ b/arch/arm/include/asm/arch-kirkwood/cpu.h
@@ -167,5 +167,7 @@ int kw_config_mpp(unsigned int mpp0_7, unsigned int mpp8_15,
unsigned int mpp32_39, unsigned int mpp40_47,
unsigned int mpp48_55);
 unsigned int kw_winctrl_calcsize(unsigned int sizeval);
+void kirkwood_pcie_id(u32 *dev, u32 *rev);
+char *kirkwood_id(void);
 #endif /* __ASSEMBLY__ */
 #endif /* _KWCPU_H */
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 2/8] arm kirkwood update supported devices and revisions

2013-07-07 Thread DrEagle
- update kirkwood supported devices and revisions

Signed-off-by: drEagle ub...@doukki.net

 arch/arm/include/asm/arch-kirkwood/config.h|

diff --git a/arch/arm/include/asm/arch-kirkwood/kirkwood.h 
b/arch/arm/include/asm/arch-kirkwood/kirkwood.h
index 47771d5..c696dc4 100644
--- a/arch/arm/include/asm/arch-kirkwood/kirkwood.h
+++ b/arch/arm/include/asm/arch-kirkwood/kirkwood.h
@@ -77,10 +78,33 @@
 #define MVCPU_WIN_ENABLE   KWCPU_WIN_ENABLE
 #define MVCPU_WIN_DISABLE  KWCPU_WIN_DISABLE
 
+/*
+ * Supported devices and revisions.
+ */
+#define MV88F6281_DEV_ID   0x6281
+#define MV88F6281_REV_Z0   0
+#define MV88F6281_REV_A0   2
+#define MV88F6281_REV_A1   3
+
+#define MV88F6192_DEV_ID   0x6192
+#define MV88F6192_REV_Z0   0
+#define MV88F6192_REV_A0   2
+#define MV88F6192_REV_A1   3
+
+#define MV88F6180_DEV_ID   0x6180
+#define MV88F6180_REV_A0   2
+#define MV88F6180_REV_A1   3
+
+#define MV88F6282_DEV_ID   0x6282
+#define MV88F6282_REV_A0   0
+#define MV88F6282_REV_A1   1
+
 #if defined (CONFIG_KW88F6281)
 #include asm/arch/kw88f6281.h
 #elif defined (CONFIG_KW88F6192)
 #include asm/arch/kw88f6192.h
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 3/8] arm kirkwood add kw88f6282 support

2013-07-07 Thread DrEagle
- add kw88f6282 device support

Signed-off-by: drEagle ub...@doukki.net

 arch/arm/include/asm/arch-kirkwood/config.h|
 arch/arm/include/asm/arch-kirkwood/kirkwood.h  |
 arch/arm/include/asm/arch-kirkwood/kw88f6282.h |

diff --git a/arch/arm/include/asm/arch-kirkwood/config.h 
b/arch/arm/include/asm/arch-kirkwood/config.h
index a9499b7..210cc3f 100644
--- a/arch/arm/include/asm/arch-kirkwood/config.h
+++ b/arch/arm/include/asm/arch-kirkwood/config.h
@@ -35,6 +35,8 @@
 #include asm/arch/kw88f6281.h
 #elif defined (CONFIG_KW88F6192)
 #include asm/arch/kw88f6192.h
+#elif defined (CONFIG_KW88F6182)
+#include asm/arch/kw88f6182.h
 #else
 #error SOC Name not defined
 #endif /* CONFIG_KW88F6281 */
diff --git a/arch/arm/include/asm/arch-kirkwood/kirkwood.h 
b/arch/arm/include/asm/arch-kirkwood/kirkwood.h
index 47771d5..c696dc4 100644
--- a/arch/arm/include/asm/arch-kirkwood/kirkwood.h
+++ b/arch/arm/include/asm/arch-kirkwood/kirkwood.h
@@ -77,10 +78,33 @@
 #if defined (CONFIG_KW88F6281)
 #include asm/arch/kw88f6281.h
 #elif defined (CONFIG_KW88F6192)
 #include asm/arch/kw88f6192.h
+#elif defined (CONFIG_KW88F6182)
+#include asm/arch/kw88f6182.h
 #else
 #error SOC Name not defined
 #endif /* CONFIG_KW88F6281 */
diff --git a/arch/arm/include/asm/arch-kirkwood/kw88f6282.h 
b/arch/arm/include/asm/arch-kirkwood/kw88f6282.h
new file mode 100644
index 000..22d10f1
--- /dev/null
+++ b/arch/arm/include/asm/arch-kirkwood/kw88f6282.h
@@ -0,0 +1,39 @@
+/*
+ * (C) Copyright 2009
+ * Marvell Semiconductor www.marvell.com
+ * Written-by: Prafulla Wadaskar prafu...@marvell.com
+ *
+ * Header file for Feroceon CPU core 88FR131 Based KW88F6281 SOC.
+ *
+ * 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
+ */
+
+#ifndef _ASM_ARCH_KW88F6281_H
+#define _ASM_ARCH_KW88F6281_H
+
+/* SOC specific definitions */
+#define KW88F6281_REGS_PHYS_BASE   0xf100
+#define KW_REGS_PHY_BASE   KW88F6281_REGS_PHYS_BASE
+
+/* TCLK Core Clock definition */
+#ifndef CONFIG_SYS_TCLK
+#define CONFIG_SYS_TCLK2 /* 200MHz */
+#endif
+
+#endif /* _ASM_ARCH_KW88F6281_H */
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 5/8] arm kirkwood add MVSDIO kirkwood support

2013-07-07 Thread DrEagle
- add kirkwood MVSDIO driver support

Signed-off-by: drEagle ub...@doukki.net

 arch/arm/include/asm/arch-kirkwood/kirkwood.h  |

diff --git a/arch/arm/include/asm/arch-kirkwood/kirkwood.h 
b/arch/arm/include/asm/arch-kirkwood/kirkwood.h
index 47771d5..c696dc4 100644
--- a/arch/arm/include/asm/arch-kirkwood/kirkwood.h
+++ b/arch/arm/include/asm/arch-kirkwood/kirkwood.h
@@ -55,6 +55,7 @@
 #define KW_EGIGA0_BASE (KW_REGISTER(0x72000))
 #define KW_EGIGA1_BASE (KW_REGISTER(0x76000))
 #define KW_SATA_BASE   (KW_REGISTER(0x8))
+#define KW_SDIO_BASE   (KW_REGISTER(0x9))
 
 /* Kirkwood Sata controller has two ports */
 #define KW_SATA_PORT0_OFFSET   0x2000
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 4/8] arm kirkwood add MVSDIO driver v3

2013-07-07 Thread DrEagle
- add kirkwood MVSDIO driver

WIP : MVSDIO v3
WIP : MVSDIO SD/MMC Driver Support for Marvell Kirkwood SoC need debugging 
and code cleaning

Fix SDIO/MMC driver
- MVSDIO driver now works in non DEBUG mode

Change from v2:
- add base_clock in mrvl_mmc_initialize and mrvl_mmc_set_clk
  check kirkwood device and revision to fix clock rates
- add kirkwood supported devices and revisions
- add sheevaplug board_mmc_init
- MVSDIO driver code mostly rewrote and still need some cleaning

Change from v1:
- Fix an issue with most SDHC cards because of timeout delay

Signed-off-by: drEagle ub...@doukki.net

 drivers/mmc/Makefile   |
 drivers/mmc/mrvl_mmc.c |
 include/mrvl_mmc.h |

diff --git a/drivers/mmc/Makefile b/drivers/mmc/Makefile
index 1d6faa2..2a2745d 100644
--- a/drivers/mmc/Makefile
+++ b/drivers/mmc/Makefile
@@ -37,6 +37,7 @@ COBJS-$(CONFIG_GENERIC_MMC) += mmc.o
 COBJS-$(CONFIG_GENERIC_ATMEL_MCI) += gen_atmel_mci.o
 COBJS-$(CONFIG_MMC_SPI) += mmc_spi.o
 COBJS-$(CONFIG_ARM_PL180_MMCI) += arm_pl180_mmci.o
+COBJS-$(CONFIG_MRVL_MMC) += mrvl_mmc.o
 COBJS-$(CONFIG_MV_SDHCI) += mv_sdhci.o
 COBJS-$(CONFIG_MXC_MMC) += mxcmmc.o
 COBJS-$(CONFIG_MXS_MMC) += mxsmmc.o
diff --git a/drivers/mmc/mrvl_mmc.c b/drivers/mmc/mrvl_mmc.c
new file mode 100644
index 000..b0571cf
--- /dev/null
+++ b/drivers/mmc/mrvl_mmc.c
@@ -0,0 +1,446 @@
+/*
+ * Driver for Marvell SDIO/MMC controller
+ *
+ * (C) Copyright 2012
+ * Marvell Semiconductor www.marvell.com
+ * Written-by: Gérald Kerma ub...@doukki.net
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#include common.h
+#include malloc.h
+#include part.h
+#include mmc.h
+#include asm/io.h
+#include asm/arch/cpu.h
+#include asm/arch/kirkwood.h
+
+#include mrvl_mmc.h
+
+#define DRIVER_NAMEmvsdio
+
+static int maxfreq = MRVL_MMC_CLOCKRATE_MAX;
+
+#define mvsd_write(offs, val)  writel(val, CONFIG_SYS_MMC_BASE + (offs))
+#define mvsd_read(offs)readl(CONFIG_SYS_MMC_BASE + 
(offs))
+
+#define MRVL_MMC_MAKE_CMD(c, f) (((c  0xff)  8) | (f  0xff))
+
+static int mrvl_mmc_setup_data(struct mmc_data *data)
+{
+   u32 ctrl_reg;
+
+#ifdef DEBUG
+   printf(%s, data %s : blocks=%d blksz=%d\n, DRIVER_NAME,
+   (data-flags  MMC_DATA_READ) ? read : write,
+   data-blocks, data-blocksize);
+#endif
+
+   /* default to maximum timeout */
+   ctrl_reg = mvsd_read(SDIO_HOST_CTRL);
+   ctrl_reg |= SDIO_HOST_CTRL_TMOUT(SDIO_HOST_CTRL_TMOUT_MAX);
+   mvsd_write(SDIO_HOST_CTRL, ctrl_reg);
+
+   if (data-flags  MMC_DATA_READ) {
+   mvsd_write(SDIO_SYS_ADDR_LOW,(u32)data-dest  0x);
+   mvsd_write(SDIO_SYS_ADDR_HI,(u32)data-dest  16);
+   } else {
+   mvsd_write(SDIO_SYS_ADDR_LOW,(u32)data-src  0x);
+   mvsd_write(SDIO_SYS_ADDR_HI,(u32)data-src  16);
+   }
+
+   mvsd_write(SDIO_BLK_COUNT, data-blocks);
+   mvsd_write(SDIO_BLK_SIZE, data-blocksize);
+
+   return 0;
+}
+
+static int mrvl_mmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct 
mmc_data *data)
+{
+   int timeout = 10;
+   ushort waittype = 0;
+   ushort resptype = 0;
+   ushort xfertype = 0;
+   ushort resp_indx = 0;
+
+#ifdef CONFIG_MMC_DEBUG
+   printf(cmdidx [0x%x] resp_type[0x%x] cmdarg[0x%x]\n, cmd-cmdidx, 
cmd-resp_type, cmd-cmdarg);
+#endif
+
+   udelay(10*1000);
+
+#ifdef CONFIG_MMC_DEBUG
+   printf(%s: cmd %d (hw state 0x%04x)\n, DRIVER_NAME,
+   cmd-cmdidx, mvsd_read(SDIO_HW_STATE));
+#endif
+
+   /* Checking if card is busy */
+   while ((mvsd_read(SDIO_HW_STATE)  CARD_BUSY)) {
+   if (timeout == 0) {
+   printf(%s: card busy!\n, DRIVER_NAME);
+   return -1;
+   }
+   timeout--;
+   udelay(1000);
+   }
+
+   /* Set up for a data transfer if we have one */
+   if (data) {
+   int err = mrvl_mmc_setup_data(data);
+   if (err)
+   return err;
+   }
+
+   resptype = SDIO_CMD_INDEX(cmd-cmdidx

[U-Boot] [PATCH 6/8] arm kirkwood add MVSDIO sheevaplug support

2013-07-07 Thread DrEagle
- add sheevaplug MVSDIO driver support

Signed-off-by: drEagle ub...@doukki.net

 board/Marvell/sheevaplug/sheevaplug.c  |
 include/configs/sheevaplug.h   |

diff --git a/board/Marvell/sheevaplug/sheevaplug.c 
b/board/Marvell/sheevaplug/sheevaplug.c
index 16efe64..2bd2568 100644
--- a/board/Marvell/sheevaplug/sheevaplug.c
+++ b/board/Marvell/sheevaplug/sheevaplug.c
@@ -28,6 +28,9 @@
 #include asm/arch/kirkwood.h
 #include asm/arch/mpp.h
 #include sheevaplug.h
+#ifdef CONFIG_MRVL_MMC
+#include mrvl_mmc.h
+#endif /* CONFIG_MRVL_MMC */
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -147,3 +150,11 @@ void reset_phy(void)
printf(88E1116 Initialized on %s\n, name);
 }
 #endif /* CONFIG_RESET_PHY_R */
+
+#ifdef CONFIG_MRVL_MMC
+int board_mmc_init(bd_t *bis)
+{
+   mrvl_mmc_initialize(bis);
+   return 0;
+}
+#endif /* CONFIG_MRVL_MMC */
diff --git a/include/configs/sheevaplug.h b/include/configs/sheevaplug.h
index 83dd8ff..270fd56 100644
--- a/include/configs/sheevaplug.h
+++ b/include/configs/sheevaplug.h
@@ -39,17 +40,24 @@
 /*
  * Commands configuration
  */

 #define CONFIG_SYS_NO_FLASH/* Declare no flash (NOR/SPI) */
 #include config_cmd_default.h
 #define CONFIG_CMD_DHCP
 #define CONFIG_CMD_ENV
 #define CONFIG_CMD_MII
+#define CONFIG_CMD_MMC
 #define CONFIG_CMD_NAND
 #define CONFIG_CMD_PING
 #define CONFIG_CMD_USB

 /*
  * mv-common.h should be defined after CMD configs since it used them
  * to enable certain macros
@@ -98,17 +138,20 @@
 #endif /* CONFIG_CMD_NET */
 
 /*
 * File system
 */
#define CONFIG_CMD_EXT2
#define CONFIG_CMD_FAT
#define CONFIG_CMD_JFFS2
#define CONFIG_CMD_UBI
#define CONFIG_CMD_UBIFS
#define CONFIG_RBTREE
#define CONFIG_MTD_DEVICE   /* needed for mtdparts commands */
#define CONFIG_MTD_PARTITIONS
#define CONFIG_CMD_MTDPARTS
#define CONFIG_LZO

+/*
+ * SDIO/MMC Card Configuration
+ */
+#ifdef CONFIG_CMD_MMC
+#define CONFIG_MMC
+#define CONFIG_GENERIC_MMC
+#define CONFIG_MRVL_MMC
+#define CONFIG_SYS_MMC_BASE KW_SDIO_BASE
+#endif /* CONFIG_CMD_MMC */
 
 #endif /* _CONFIG_SHEEVAPLUG_H */
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 7/8] arm kirkwood add MVSATA sheevaplug support

2013-07-07 Thread DrEagle
- add sheevaplug MVSATA driver support

Signed-off-by: drEagle ub...@doukki.net

 include/configs/mv-common.h|
 include/configs/sheevaplug.h   |

diff --git a/include/configs/mv-common.h b/include/configs/mv-common.h
index 405a842..e917e6f 100644
--- a/include/configs/mv-common.h
+++ b/include/configs/mv-common.h
@@ -142,6 +146,19 @@
 #endif
 
 /*
+ * SATA driver configuration
+ */
+#ifdef CONFIG_CMD_IDE
+#define __io
+#define CONFIG_IDE_PREINIT
+#define CONFIG_DOS_PARTITION
+#define CONFIG_MVSATA_IDE_USE_PORT0
+#define CONFIG_MVSATA_IDE_USE_PORT1
+#define CONFIG_SYS_ATA_IDE0_OFFSET MV_SATA_PORT0_OFFSET
+#define CONFIG_SYS_ATA_IDE1_OFFSET MV_SATA_PORT1_OFFSET
+#endif /* CONFIG_CMD_IDE */
+
+/*
  * Common USB/EHCI configuration
  */
 #ifdef CONFIG_CMD_USB
diff --git a/include/configs/sheevaplug.h b/include/configs/sheevaplug.h
index 83dd8ff..270fd56 100644
--- a/include/configs/sheevaplug.h
+++ b/include/configs/sheevaplug.h
@@ -39,17 +40,24 @@
 /*
  * Commands configuration
  */

 #define CONFIG_SYS_NO_FLASH/* Declare no flash (NOR/SPI) */
 #include config_cmd_default.h
 #define CONFIG_CMD_DHCP
 #define CONFIG_CMD_ENV
+#define CONFIG_CMD_IDE
 #define CONFIG_CMD_MII
 #define CONFIG_CMD_NAND
 #define CONFIG_CMD_PING
 #define CONFIG_CMD_USB

 /*
  * mv-common.h should be defined after CMD configs since it used them
  * to enable certain macros
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 8/8] arm kirkwood update sheevaplug defaults config

2013-07-07 Thread DrEagle
- update defaults sheevaplug config

Signed-off-by: drEagle ub...@doukki.net

 include/configs/mv-common.h|
 include/configs/sheevaplug.h   |

diff --git a/include/configs/mv-common.h b/include/configs/mv-common.h
index 405a842..e917e6f 100644
--- a/include/configs/mv-common.h
+++ b/include/configs/mv-common.h
@@ -72,7 +72,10 @@
 #define CONFIG_BAUDRATE115200
 #define CONFIG_SYS_BAUDRATE_TABLE  { 9600, 19200, 38400, 57600, \
  115200,230400, 460800, 921600 }
-/* auto boot */
+/*
+ * Miscellaneous configurable options
+ */
+#define CONFIG_ENV_OVERWRITE
 #define CONFIG_BOOTDELAY   3   /* default enable autoboot */
 
 /*
@@ -98,6 +101,7 @@
  * Other required minimal configurations
  */
 #define CONFIG_SYS_LONGHELP
+#define CONFIG_SYS_HUSH_PARSER /* use hush command parser */
 #define CONFIG_AUTO_COMPLETE
 #define CONFIG_CMDLINE_EDITING
 #define CONFIG_CONSOLE_INFO_QUIET  /* some code reduction */
diff --git a/include/configs/sheevaplug.h b/include/configs/sheevaplug.h
index 83dd8ff..270fd56 100644
--- a/include/configs/sheevaplug.h
+++ b/include/configs/sheevaplug.h
@@ -28,7 +28,8 @@
 /*
  * Version number information
  */
-#define CONFIG_IDENT_STRING\nMarvell-Sheevaplug
+
+#define CONFIG_IDENT_STRING\nMarvell-Sheevaplug - eSATA - SD/MMC
 
 /*
  * High Level Configuration Options (easy to change)
@@ -39,17 +40,24 @@
 #define CONFIG_MACH_SHEEVAPLUG /* Machine type */
 #define CONFIG_SKIP_LOWLEVEL_INIT  /* disable board lowlevel_init */
 
+#define CONFIG_ARCH_DEV_ID 1
+
 /*
  * Commands configuration
  */
+
 #define CONFIG_SYS_NO_FLASH/* Declare no flash (NOR/SPI) */
+#define CONFIG_SYS_MVFS
 #include config_cmd_default.h
 #define CONFIG_CMD_DHCP
 #define CONFIG_CMD_ENV
 #define CONFIG_CMD_IDE
 #define CONFIG_CMD_MII
 #define CONFIG_CMD_MMC
 #define CONFIG_CMD_NAND
 #define CONFIG_CMD_PING
 #define CONFIG_CMD_USB
+
 /*
  * mv-common.h should be defined after CMD configs since it used them
  * to enable certain macros
@@ -57,6 +65,11 @@
 #include mv-common.h
 
 /*
+ * Miscellaneous configurable options
+ */
+#undef CONFIG_CONSOLE_INFO_QUIET
+
+/*
  *  Environment variables configurations
  */
 #ifdef CONFIG_CMD_NAND
@@ -65,29 +78,56 @@
 #else
 #define CONFIG_ENV_IS_NOWHERE  1   /* if env in SDRAM */
 #endif
+
 /*
  * max 4k env size is enough, but in case of nand
  * it has to be rounded to sector size
  */
 #define CONFIG_ENV_SIZE0x2 /* 128k */
-#define CONFIG_ENV_ADDR0x6
-#define CONFIG_ENV_OFFSET  0x6 /* env starts here */
+#define CONFIG_ENV_ADDR0x8
+#define CONFIG_ENV_OFFSET  0x8 /* env starts here */
 
 /*
  * Default environment variables
  */
-#define CONFIG_BOOTCOMMAND ${x_bootcmd_kernel};  \
-   setenv bootargs ${x_bootargs} ${x_bootargs_root}; \
-   ${x_bootcmd_usb}; bootm 0x640;
+#define CONFIG_BOOTCOMMAND \
+   run x_bootcmd; run z_bootstrap; reset;
 
-#define CONFIG_MTDPARTSorion_nand:512k(uboot),   \
-   3m@1m(kernel),1m@4m(psm),13m@5m(rootfs) rw\0
+#define CONFIG_MTDPARTS\
+   mtdparts=orion_nand:  \
+   768k(uboot),256k(uboot_env),  \
+   11m@1m(kernel),-@12m(rootfs)\0
 
-#define CONFIG_EXTRA_ENV_SETTINGS  x_bootargs=console\
-   =ttyS0,115200 mtdparts=CONFIG_MTDPARTS\
-   x_bootcmd_kernel=nand read 0x640 0x10 0x30\0 \
-   x_bootcmd_usb=usb start\0 \
-   x_bootargs_root=root=/dev/mtdblock3 rw rootfstype=jffs2\0
+#define CONFIG_EXTRA_ENV_SETTINGS  \
+   console=console=ttyS0,115200n8\0  \
+   mtdids=nand0=orion_nand\0 \
+   mtdparts=CONFIG_MTDPARTS  \
+   kerneladdr=0x0080\0   \
+   kernelfile=/boot/uImage.bin\0 \
+   scriptaddr=0x0080\0   \
+   scriptfile=/boot/boot.scr\0   \
+   x_bootargs=console=ttyS0,115200n8 CONFIG_MTDPARTS \
+   x_bootargs_root=root=LABEL=plug-rootfs rw rootwait panic=5\0  \
+   x_bootcmd=${x_bootcmd_kernel}; setenv bootargs ${x_bootargs}  \
+${x_bootargs_root}; run z_bootinit;\0\
+   x_bootcmd_kernel=echo == BootStrap start ==\0 \
+   x_bootstrap_scr=for device in \mmc usb ide\; do for fs in   \
+\ext2 fat\; do setenv loadcmd \${fs}load ${device} 0:1\; \
+if ${loadcmd} ${scriptaddr} ${scriptfile}; then; \
+run z_bootscr; fi; done; done;\0

[U-Boot] Marvell SheevaPlug v2013.04 Refresh (ask for review)

2013-07-02 Thread DrEagle
Hi,

I have started to rework all the MVSDIO driver, and some more enhancements, to 
make a cool updated and workable SheevaPlug.
I have take the v2013.04 denx uBoot to base my patchs.

If you can take a look inside and give me needed feedback.

I want to precise that I do not easily practice GIT features.

Regards,
Gérald

 arch/arm/cpu/arm926ejs/kirkwood/cpu.c  |  58 
 arch/arm/include/asm/arch-kirkwood/config.h|   2 +
 arch/arm/include/asm/arch-kirkwood/cpu.h   |   2 +
 arch/arm/include/asm/arch-kirkwood/kirkwood.h  |  24 ++
 arch/arm/include/asm/arch-kirkwood/kw88f6282.h |  39 +++
 board/Marvell/sheevaplug/sheevaplug.c  |  11 +
 drivers/mmc/Makefile   |   1 +
 drivers/mmc/mrvl_mmc.c | 446 +
 include/configs/mv-common.h|  19 +-
 include/configs/sheevaplug.h   |  91 +++--
 include/mmc.h  |   2 +-
 include/mrvl_mmc.h | 266 +++
 12 files changed, 935 insertions(+), 26 deletions(-)

diff --git a/arch/arm/cpu/arm926ejs/kirkwood/cpu.c b/arch/arm/cpu/arm926ejs/kirkwood/cpu.c
index fba5e01..720fccf 100644
--- a/arch/arm/cpu/arm926ejs/kirkwood/cpu.c
+++ b/arch/arm/cpu/arm926ejs/kirkwood/cpu.c
@@ -350,6 +350,64 @@ int arch_cpu_init(void)
 }
 #endif /* CONFIG_ARCH_CPU_INIT */
 
+/*
+ * General
+ /
+#if defined(CONFIG_ARCH_DEV_ID)
+
+void kirkwood_pcie_id(u32 *dev, u32 *rev)
+{
+	*dev = (readl(KW_REG_PCIE_DEVID)  16)  0x;
+	*rev = readl(KW_REG_PCIE_REVID)  0xff;
+}
+
+/*
+ * Identify device ID and revision.
+ */
+char *kirkwood_id(void)
+{
+	u32 dev, rev;
+
+	kirkwood_pcie_id(dev, rev);
+
+	if (dev == MV88F6281_DEV_ID) {
+		if (rev == MV88F6281_REV_Z0)
+			return MV88F6281-Z0;
+		else if (rev == MV88F6281_REV_A0)
+			return MV88F6281-A0;
+		else if (rev == MV88F6281_REV_A1)
+			return MV88F6281-A1;
+		else
+			return MV88F6281-Rev-Unsupported;
+	} else if (dev == MV88F6192_DEV_ID) {
+		if (rev == MV88F6192_REV_Z0)
+			return MV88F6192-Z0;
+		else if (rev == MV88F6192_REV_A0)
+			return MV88F6192-A0;
+		else if (rev == MV88F6192_REV_A1)
+			return MV88F6192-A1;
+		else
+			return MV88F6192-Rev-Unsupported;
+	} else if (dev == MV88F6180_DEV_ID) {
+		if (rev == MV88F6180_REV_A0)
+			return MV88F6180-Rev-A0;
+		else if (rev == MV88F6180_REV_A1)
+			return MV88F6180-Rev-A1;
+		else
+			return MV88F6180-Rev-Unsupported;
+	} else if (dev == MV88F6282_DEV_ID) {
+		if (rev == MV88F6282_REV_A0)
+			return MV88F6282-Rev-A0;
+		else if (rev == MV88F6282_REV_A1)
+			return MV88F6282-Rev-A1;
+		else
+			return MV88F6282-Rev-Unsupported;
+	} else {
+		return Device-Unknown;
+	}
+}
+#endif /* CONFIG_ARCH_DEV_ID */
+
 /*
  * SOC specific misc init
  */
diff --git a/arch/arm/include/asm/arch-kirkwood/config.h b/arch/arm/include/asm/arch-kirkwood/config.h
index a9499b7..210cc3f 100644
--- a/arch/arm/include/asm/arch-kirkwood/config.h
+++ b/arch/arm/include/asm/arch-kirkwood/config.h
@@ -35,6 +35,8 @@
 #include asm/arch/kw88f6281.h
 #elif defined (CONFIG_KW88F6192)
 #include asm/arch/kw88f6192.h
+#elif defined (CONFIG_KW88F6182)
+#include asm/arch/kw88f6182.h
 #else
 #error SOC Name not defined
 #endif /* CONFIG_KW88F6281 */
diff --git a/arch/arm/include/asm/arch-kirkwood/cpu.h b/arch/arm/include/asm/arch-kirkwood/cpu.h
index 009a6bb..34957a2 100644
--- a/arch/arm/include/asm/arch-kirkwood/cpu.h
+++ b/arch/arm/include/asm/arch-kirkwood/cpu.h
@@ -167,5 +167,7 @@ int kw_config_mpp(unsigned int mpp0_7, unsigned int mpp8_15,
 		unsigned int mpp32_39, unsigned int mpp40_47,
 		unsigned int mpp48_55);
 unsigned int kw_winctrl_calcsize(unsigned int sizeval);
+void kirkwood_pcie_id(u32 *dev, u32 *rev);
+char *kirkwood_id(void);
 #endif /* __ASSEMBLY__ */
 #endif /* _KWCPU_H */
diff --git a/arch/arm/include/asm/arch-kirkwood/kirkwood.h b/arch/arm/include/asm/arch-kirkwood/kirkwood.h
index 47771d5..c696dc4 100644
--- a/arch/arm/include/asm/arch-kirkwood/kirkwood.h
+++ b/arch/arm/include/asm/arch-kirkwood/kirkwood.h
@@ -55,6 +55,7 @@
 #define KW_EGIGA0_BASE			(KW_REGISTER(0x72000))
 #define KW_EGIGA1_BASE			(KW_REGISTER(0x76000))
 #define KW_SATA_BASE			(KW_REGISTER(0x8))
+#define KW_SDIO_BASE			(KW_REGISTER(0x9))
 
 /* Kirkwood Sata controller has two ports */
 #define KW_SATA_PORT0_OFFSET		0x2000
@@ -77,10 +78,33 @@
 #define MVCPU_WIN_ENABLE	KWCPU_WIN_ENABLE
 #define MVCPU_WIN_DISABLE	KWCPU_WIN_DISABLE
 
+/*
+ * Supported devices and revisions.
+ */
+#define MV88F6281_DEV_ID	0x6281
+#define MV88F6281_REV_Z0	0
+#define MV88F6281_REV_A0	2
+#define MV88F6281_REV_A1	3
+
+#define MV88F6192_DEV_ID	0x6192
+#define MV88F6192_REV_Z0	0
+#define MV88F6192_REV_A0	2
+#define MV88F6192_REV_A1	3
+
+#define MV88F6180_DEV_ID	0x6180
+#define MV88F6180_REV_A0	2
+#define MV88F6180_REV_A1	3
+

[U-Boot] Help : Marvell SDIO/MMC driver for Sheevaplug

2013-01-29 Thread DrEagle
Hi all,

  -Original Message-
  From: u-boot-bounces at lists.denx.de [mailto:u-boot-
  bounces at lists.denx.de] On Behalf Of DrEagle
  Sent: 22 September 2012 12:45
  To: DrEagle
  Cc: Lior Amsalem; u-boot at lists.denx.de; uboot at doukki.net
  Subject: [U-Boot] [PATCH v2 0/5] Marvell SDIO/MMC driver for
  Sheevaplug
  
  
  This serie of patch add SDIO/MMC support to Sheevaplug board
  
  Change from v1:
  - Fix an issue with most SDHC cards because of timeout delay
  
  drEagle (5):
Add Marvell SDIO/MMC driver for Kirkwood SoC
Add SDIO/MMC support for kirkwood SoC
Add SDIO/MMC support for Sheevaplug board
Fix env address for Sheevaplug board
Fix timeout in Marvell SDIO MMC driver

 Hi DrEagle
 I still request you to study mvsdhci.c which is similar framework used for 
 Pantheon family of SoCs, 
 try to use this infrastructure is possible for Kirkwood support.

 Regards...
 Prafulla . . .

I have started looking at sdhci component but I find only theses small details :

...
  9) mv_sdhci.c
  -
  This is a component of the SDHCI support, allowing it to run on Marvell
  Kirkwood chip. It is probable the SDHCI support will have to be modified to
  allow calling functions from this file based on information passed via
  platform_data.
...
  16) sdhci.c
  ---
  Follows the new API and also has a good encapsulation of the whole driver. The
  conversion here will be simple, though it'd be necessary to modify this driver
  to also support the Kirkwood series and probably also Tegra series of CPUs.
  See the respective parts of this section for details.
...

Can anybody give me more advice on how to port efficiently a patch for SDIO/MMC 
for SheevaPlug/Kirkwood SoC while using, as Prafulla asked, the *sdhci* 
framework.

What are the best practices and the technical details which can help me into 
this ?

Regards,
drEagle



signature.asc
Description: OpenPGP digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 4/5] Fix env address for Sheevaplug board

2012-09-25 Thread DrEagle
Le 24/09/2012 10:46, Prafulla Wadaskar a écrit :
 
 
 -Original Message-
 From: u-boot-boun...@lists.denx.de [mailto:u-boot-
 boun...@lists.denx.de] On Behalf Of DrEagle
 Sent: 22 September 2012 12:48
 To: DrEagle
 Cc: Lior Amsalem; u-boot@lists.denx.de; ub...@doukki.net
 Subject: [U-Boot] [PATCH v2 4/5] Fix env address for Sheevaplug board


 Fix env address for Sheevaplug board
 Move env address and offset from 0x6 to 0x8

 Signed-off-by: drEagle drea...@doukki.net
 ---
  include/configs/sheevaplug.h |5 ++---
  1 file changed, 2 insertions(+), 3 deletions(-)

 diff --git a/include/configs/sheevaplug.h
 b/include/configs/sheevaplug.h
 index 7d710bf..a10e825 100644
 --- a/include/configs/sheevaplug.h
 +++ b/include/configs/sheevaplug.h
 @@ -71,9 +71,8 @@
   * it has to be rounded to sector size
   */
  #define CONFIG_ENV_SIZE 0x2 /* 128k */
 -#define CONFIG_ENV_ADDR 0x6
 -#define CONFIG_ENV_OFFSET   0x6 /* env starts here */
 -
 +#define CONFIG_ENV_ADDR 0x8
 +#define CONFIG_ENV_OFFSET   0x8 /* env starts here */
 
 Why do you need this shift?

Because the size of the new u-boot binary overlap the actual env offset.
If you reset the env or save env with a new u-boot, the code is corrupt, and 
noo boot anymore.

This shift fix this.

 Regards...
 Prafulla . .. 
 

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


[U-Boot] [PATCH v2 0/5] Marvell SDIO/MMC driver for Sheevaplug

2012-09-22 Thread DrEagle

This serie of patch add SDIO/MMC support to Sheevaplug board

Change from v1:
- Fix an issue with most SDHC cards because of timeout delay

drEagle (5):
  Add Marvell SDIO/MMC driver for Kirkwood SoC
  Add SDIO/MMC support for kirkwood SoC
  Add SDIO/MMC support for Sheevaplug board
  Fix env address for Sheevaplug board
  Fix timeout in Marvell SDIO MMC driver

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


[U-Boot] [PATCH v2 1/5] Add Marvell SDIO/MMC driver for Kirkwood SoC

2012-09-22 Thread DrEagle

Add Marvell SDIO/MMC driver for Kirkwood SoC

Signed-off-by: Gérald Kerma ub...@doukki.net
Signed-off-by: Lior Amsalem al...@marvell.com
---
 drivers/mmc/Makefile   |1 +
 drivers/mmc/mrvl_mmc.c |  277 
 include/mrvl_mmc.h |  191 +
 3 files changed, 469 insertions(+)
 create mode 100644 drivers/mmc/mrvl_mmc.c
 create mode 100644 include/mrvl_mmc.h

diff --git a/drivers/mmc/Makefile b/drivers/mmc/Makefile
index 2b96cdc..7f3b7c1 100644
--- a/drivers/mmc/Makefile
+++ b/drivers/mmc/Makefile
@@ -37,6 +37,7 @@ COBJS-$(CONFIG_GENERIC_MMC) += mmc.o
 COBJS-$(CONFIG_GENERIC_ATMEL_MCI) += gen_atmel_mci.o
 COBJS-$(CONFIG_MMC_SPI) += mmc_spi.o
 COBJS-$(CONFIG_ARM_PL180_MMCI) += arm_pl180_mmci.o
+COBJS-$(CONFIG_MRVL_MMC) += mrvl_mmc.o
 COBJS-$(CONFIG_MV_SDHCI) += mv_sdhci.o
 COBJS-$(CONFIG_MXC_MMC) += mxcmmc.o
 COBJS-$(CONFIG_MXS_MMC) += mxsmmc.o
diff --git a/drivers/mmc/mrvl_mmc.c b/drivers/mmc/mrvl_mmc.c
new file mode 100644
index 000..8127961
--- /dev/null
+++ b/drivers/mmc/mrvl_mmc.c
@@ -0,0 +1,277 @@
+/*
+ * Driver for Marvell SDIO/MMC controller
+ *
+ * (C) Copyright 2012
+ * Marvell Semiconductor www.marvell.com
+ * Written-by: Lior Amsalem al...@marvell.com
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#include common.h
+#include malloc.h
+#include part.h
+#include mmc.h
+
+#include mrvl_mmc.h
+#define MRVL_MMC_MAKE_CMD(c, f) (((c  0xff)  8) | (f  0xff))
+
+
+static int mrvl_mmc_setup_data(struct mmc_data *data)
+{
+   if (data-flags  MMC_DATA_READ) {
+   SDIO_REG_WRITE16(SDIO_SYS_ADDR_LOW,((ulong)(data-dest))  
0x);
+   SDIO_REG_WRITE16(SDIO_SYS_ADDR_HI,(((ulong)data-dest)  16)  
0x);
+   } else {
+   SDIO_REG_WRITE16(SDIO_SYS_ADDR_LOW,((ulong)(data-src))  
0x);
+   SDIO_REG_WRITE16(SDIO_SYS_ADDR_HI,(((ulong)data-src)  16)  
0x);
+   }
+
+   SDIO_REG_WRITE16(SDIO_BLK_SIZE, data-blocksize);
+   SDIO_REG_WRITE16(SDIO_BLK_COUNT, data-blocks);
+
+   return 0;
+}
+
+static int mrvl_mmc_send_cmd (struct mmc *mmc, struct mmc_cmd *cmd, struct 
mmc_data *data)
+{
+   int timeout = 10;
+   ushort waittype = 0;
+   int err = 0 ;
+   ushort response[8], resp_indx = 0;
+   ushort resptype = 0;
+   ushort xfertype = 0;
+
+#ifdef DEBUG
+   printf(cmd [0x%x] resp_type[0x%x] arg[0x%x]\n, cmd-cmdidx, 
cmd-resp_type, cmd-cmdarg);
+#endif
+
+   /* clear status */
+   SDIO_REG_WRITE16(SDIO_NOR_INTR_STATUS, 0x);
+   SDIO_REG_WRITE16(SDIO_ERR_INTR_STATUS, 0x);
+
+   /* Checking if card is busy */
+   while ((SDIO_REG_READ16(SDIO_PRESENT_STATE0)  CARD_BUSY)) {
+   if (timeout == 0) {
+   printf(MRVL MMC: card busy!\n);
+   return -1;
+   }
+   timeout--;
+   udelay(1000);
+   }
+   
+   /* Set up for a data transfer if we have one */
+   if (data) {
+   int err;
+   err = mrvl_mmc_setup_data(data);
+   if(err)
+   return err;
+   }
+
+   /* Analyzing resptype/xfertype/waittype for the command */
+   if (cmd-resp_type  MMC_RSP_BUSY)
+   resptype |= SDIO_CMD_RSP_48BUSY;
+   else if (cmd-resp_type  MMC_RSP_136)
+   resptype |= SDIO_CMD_RSP_136;
+   else if (cmd-resp_type  MMC_RSP_PRESENT)
+   resptype |= SDIO_CMD_RSP_48;
+   else
+   resptype |= SDIO_CMD_RSP_NONE;
+
+   if (cmd-resp_type  MMC_RSP_CRC)
+   resptype |= SDIO_CMD_CHECK_CMDCRC;
+
+   if (cmd-resp_type  MMC_RSP_OPCODE)
+   resptype |= SDIO_CMD_INDX_CHECK;
+
+   if (cmd-resp_type  MMC_RSP_PRESENT) {
+   resptype |= SDIO_UNEXPECTED_RESP;
+   waittype |= SDIO_NOR_UNEXP_RSP;
+   }
+
+   if (data) {
+   resptype |= SDIO_CMD_DATA_PRESENT | SDIO_CMD_CHECK_DATACRC16;
+   xfertype |= SDIO_XFER_MODE_HW_WR_DATA_EN;
+   if (data-flags  MMC_DATA_READ) {
+   xfertype |= SDIO_XFER_MODE_TO_HOST;
+   waittype = SDIO_NOR_DMA_INI;
+   

[U-Boot] [PATCH v2 2/5] Add SDIO/MMC support for kirkwood SoC

2012-09-22 Thread DrEagle

Add SDIO/MMC support for kirkwood SoC

Signed-off-by: drEagle drea...@doukki.net
---
 arch/arm/include/asm/arch-kirkwood/kirkwood.h |1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/include/asm/arch-kirkwood/kirkwood.h 
b/arch/arm/include/asm/arch-kirkwood/kirkwood.h
index 47771d5..343214b 100644
--- a/arch/arm/include/asm/arch-kirkwood/kirkwood.h
+++ b/arch/arm/include/asm/arch-kirkwood/kirkwood.h
@@ -55,6 +55,7 @@
 #define KW_EGIGA0_BASE (KW_REGISTER(0x72000))
 #define KW_EGIGA1_BASE (KW_REGISTER(0x76000))
 #define KW_SATA_BASE   (KW_REGISTER(0x8))
+#define KW_SDIO_BASE   (KW_REGISTER(0x9))
 
 /* Kirkwood Sata controller has two ports */
 #define KW_SATA_PORT0_OFFSET   0x2000
-- 
1.7.10.4

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


[U-Boot] [PATCH v2 3/5] Add SDIO/MMC support for Sheevaplug board

2012-09-22 Thread DrEagle

Add SDIO/MMC support for Sheevaplug board

Signed-off-by: drEagle drea...@doukki.net
---
 board/Marvell/sheevaplug/sheevaplug.c |   11 +++
 include/configs/sheevaplug.h  |   12 
 2 files changed, 23 insertions(+)

diff --git a/board/Marvell/sheevaplug/sheevaplug.c 
b/board/Marvell/sheevaplug/sheevaplug.c
index 688d308..db64a05 100644
--- a/board/Marvell/sheevaplug/sheevaplug.c
+++ b/board/Marvell/sheevaplug/sheevaplug.c
@@ -28,6 +28,9 @@
 #include asm/arch/kirkwood.h
 #include asm/arch/mpp.h
 #include sheevaplug.h
+#ifdef CONFIG_MRVL_MMC
+#include mrvl_mmc.h
+#endif /* CONFIG_MRVL_MMC */
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -147,3 +150,11 @@ void reset_phy(void)
printf(88E1116 Initialized on %s\n, name);
 }
 #endif /* CONFIG_RESET_PHY_R */
+
+#ifdef CONFIG_MRVL_MMC
+int board_mmc_init(bd_t *bis)
+{
+   mrvl_mmc_initialize(bis);
+   return 0;
+}
+#endif /* CONFIG_MRVL_MMC */
diff --git a/include/configs/sheevaplug.h b/include/configs/sheevaplug.h
index 83dd8ff..7d710bf 100644
--- a/include/configs/sheevaplug.h
+++ b/include/configs/sheevaplug.h
@@ -47,6 +47,7 @@
 #define CONFIG_CMD_DHCP
 #define CONFIG_CMD_ENV
 #define CONFIG_CMD_MII
+#define CONFIG_CMD_MMC
 #define CONFIG_CMD_NAND
 #define CONFIG_CMD_PING
 #define CONFIG_CMD_USB
@@ -98,6 +99,17 @@
 #endif /* CONFIG_CMD_NET */
 
 /*
+ * SDIO/MMC Card Configuration
+ */
+#ifdef CONFIG_CMD_MMC
+#define CONFIG_MMC
+#define CONFIG_GENERIC_MMC
+#define CONFIG_MRVL_MMC
+#define CONFIG_SYS_MMC_BASE KW_SDIO_BASE
+#endif /* CONFIG_CMD_MMC */
+
+
+/*
  * File system
  */
 #define CONFIG_CMD_EXT2
-- 
1.7.10.4

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


[U-Boot] [PATCH v2 4/5] Fix env address for Sheevaplug board

2012-09-22 Thread DrEagle

Fix env address for Sheevaplug board
Move env address and offset from 0x6 to 0x8

Signed-off-by: drEagle drea...@doukki.net
---
 include/configs/sheevaplug.h |5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/include/configs/sheevaplug.h b/include/configs/sheevaplug.h
index 7d710bf..a10e825 100644
--- a/include/configs/sheevaplug.h
+++ b/include/configs/sheevaplug.h
@@ -71,9 +71,8 @@
  * it has to be rounded to sector size
  */
 #define CONFIG_ENV_SIZE0x2 /* 128k */
-#define CONFIG_ENV_ADDR0x6
-#define CONFIG_ENV_OFFSET  0x6 /* env starts here */
-
+#define CONFIG_ENV_ADDR0x8
+#define CONFIG_ENV_OFFSET  0x8 /* env starts here */
 /*
  * Default environment variables
  */
-- 
1.7.10.4

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


[U-Boot] [PATCH v2 5/5] Fix timeout in Marvell SDIO MMC driver

2012-09-22 Thread DrEagle

Fix an issue with most SDHC cards because of timeout delay

Signed-off-by: drEagle drea...@doukki.net
---
 drivers/mmc/mrvl_mmc.c |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/mrvl_mmc.c b/drivers/mmc/mrvl_mmc.c
index 8127961..bdafbc7 100644
--- a/drivers/mmc/mrvl_mmc.c
+++ b/drivers/mmc/mrvl_mmc.c
@@ -4,6 +4,7 @@
  * (C) Copyright 2012
  * Marvell Semiconductor www.marvell.com
  * Written-by: Lior Amsalem al...@marvell.com
+ * Written-by: Gérald Kerma ub...@doukki.net
  * See file CREDITS for list of people who contributed to this
  * project.
  *
@@ -127,10 +128,9 @@ static int mrvl_mmc_send_cmd (struct mmc *mmc, struct 
mmc_cmd *cmd, struct mmc_d
SDIO_REG_WRITE16(SDIO_CMD, MRVL_MMC_MAKE_CMD(cmd-cmdidx, resptype));
 
/* Waiting for completion */
-   timeout = 100;
+   timeout = 1;
 
while (!((SDIO_REG_READ16(SDIO_NOR_INTR_STATUS))  waittype)) {
-   udelay(1);
if (SDIO_REG_READ16(SDIO_NOR_INTR_STATUS)  SDIO_NOR_ERROR) {
 #ifdef DEBUG
printf(mrvl_mmc_send_cmd: error! cmd : %d, err reg: 
%04x\n, cmd-cmdidx, SDIO_REG_READ16(SDIO_ERR_INTR_STATUS));
@@ -139,6 +139,7 @@ static int mrvl_mmc_send_cmd (struct mmc *mmc, struct 
mmc_cmd *cmd, struct mmc_d
return TIMEOUT;
return COMM_ERR;
}
+   udelay(1000);
timeout--;
if (timeout = 0) {
printf(MRVL MMC: command timed out\n);
-- 
1.7.10.4

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


Re: [U-Boot] [PATCH v2 0/5] Marvell SDIO/MMC driver for Sheevaplug

2012-09-22 Thread DrEagle
Hi,

I found an issue of timeout problems.

Now all my cards read correctly, quickly and efficiently.

If someone need a precompiled u-boot binary for testing this version, fell free 
to ask.

I will put it available online.

Le 22/09/2012 09:15, DrEagle a écrit :
 
 This serie of patch add SDIO/MMC support to Sheevaplug board
 
 Change from v1:
 - Fix an issue with most SDHC cards because of timeout delay
 
 drEagle (5):
   Add Marvell SDIO/MMC driver for Kirkwood SoC
   Add SDIO/MMC support for kirkwood SoC
   Add SDIO/MMC support for Sheevaplug board
   Fix env address for Sheevaplug board
   Fix timeout in Marvell SDIO MMC driver
 




signature.asc
Description: OpenPGP digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 0/1] Add Marvell SDIO/MMC driver for Kirkwood SoC

2012-09-21 Thread DrEagle

This patch add a generic MMC driver for Marvell Kirkwood SoC

drEagle (1):
  Add Marvell SDIO/MMC driver for Kirkwood SoC

 drivers/mmc/Makefile   |1 +
 drivers/mmc/mrvl_mmc.c |  277 
 include/mrvl_mmc.h |  191 +
 3 files changed, 469 insertions(+)
 create mode 100644 drivers/mmc/mrvl_mmc.c
 create mode 100644 include/mrvl_mmc.h

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


[U-Boot] [PATCH 1/1] Add Marvell SDIO/MMC driver for Kirkwood SoC

2012-09-21 Thread DrEagle

Signed-off-by: Gérald Kerma ub...@doukki.net
Signed-off-by: Lior Amsalem al...@marvell.com
---
 drivers/mmc/Makefile   |1 +
 drivers/mmc/mrvl_mmc.c |  277 
 include/mrvl_mmc.h |  191 +
 3 files changed, 469 insertions(+)
 create mode 100644 drivers/mmc/mrvl_mmc.c
 create mode 100644 include/mrvl_mmc.h

diff --git a/drivers/mmc/Makefile b/drivers/mmc/Makefile
index 2b96cdc..7f3b7c1 100644
--- a/drivers/mmc/Makefile
+++ b/drivers/mmc/Makefile
@@ -37,6 +37,7 @@ COBJS-$(CONFIG_GENERIC_MMC) += mmc.o
 COBJS-$(CONFIG_GENERIC_ATMEL_MCI) += gen_atmel_mci.o
 COBJS-$(CONFIG_MMC_SPI) += mmc_spi.o
 COBJS-$(CONFIG_ARM_PL180_MMCI) += arm_pl180_mmci.o
+COBJS-$(CONFIG_MRVL_MMC) += mrvl_mmc.o
 COBJS-$(CONFIG_MV_SDHCI) += mv_sdhci.o
 COBJS-$(CONFIG_MXC_MMC) += mxcmmc.o
 COBJS-$(CONFIG_MXS_MMC) += mxsmmc.o
diff --git a/drivers/mmc/mrvl_mmc.c b/drivers/mmc/mrvl_mmc.c
new file mode 100644
index 000..8127961
--- /dev/null
+++ b/drivers/mmc/mrvl_mmc.c
@@ -0,0 +1,277 @@
+/*
+ * Driver for Marvell SDIO/MMC controller
+ *
+ * (C) Copyright 2012
+ * Marvell Semiconductor www.marvell.com
+ * Written-by: Lior Amsalem al...@marvell.com
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#include common.h
+#include malloc.h
+#include part.h
+#include mmc.h
+
+#include mrvl_mmc.h
+#define MRVL_MMC_MAKE_CMD(c, f) (((c  0xff)  8) | (f  0xff))
+
+
+static int mrvl_mmc_setup_data(struct mmc_data *data)
+{
+   if (data-flags  MMC_DATA_READ) {
+   SDIO_REG_WRITE16(SDIO_SYS_ADDR_LOW,((ulong)(data-dest))  
0x);
+   SDIO_REG_WRITE16(SDIO_SYS_ADDR_HI,(((ulong)data-dest)  16)  
0x);
+   } else {
+   SDIO_REG_WRITE16(SDIO_SYS_ADDR_LOW,((ulong)(data-src))  
0x);
+   SDIO_REG_WRITE16(SDIO_SYS_ADDR_HI,(((ulong)data-src)  16)  
0x);
+   }
+
+   SDIO_REG_WRITE16(SDIO_BLK_SIZE, data-blocksize);
+   SDIO_REG_WRITE16(SDIO_BLK_COUNT, data-blocks);
+
+   return 0;
+}
+
+static int mrvl_mmc_send_cmd (struct mmc *mmc, struct mmc_cmd *cmd, struct 
mmc_data *data)
+{
+   int timeout = 10;
+   ushort waittype = 0;
+   int err = 0 ;
+   ushort response[8], resp_indx = 0;
+   ushort resptype = 0;
+   ushort xfertype = 0;
+
+#ifdef DEBUG
+   printf(cmd [0x%x] resp_type[0x%x] arg[0x%x]\n, cmd-cmdidx, 
cmd-resp_type, cmd-cmdarg);
+#endif
+
+   /* clear status */
+   SDIO_REG_WRITE16(SDIO_NOR_INTR_STATUS, 0x);
+   SDIO_REG_WRITE16(SDIO_ERR_INTR_STATUS, 0x);
+
+   /* Checking if card is busy */
+   while ((SDIO_REG_READ16(SDIO_PRESENT_STATE0)  CARD_BUSY)) {
+   if (timeout == 0) {
+   printf(MRVL MMC: card busy!\n);
+   return -1;
+   }
+   timeout--;
+   udelay(1000);
+   }
+   
+   /* Set up for a data transfer if we have one */
+   if (data) {
+   int err;
+   err = mrvl_mmc_setup_data(data);
+   if(err)
+   return err;
+   }
+
+   /* Analyzing resptype/xfertype/waittype for the command */
+   if (cmd-resp_type  MMC_RSP_BUSY)
+   resptype |= SDIO_CMD_RSP_48BUSY;
+   else if (cmd-resp_type  MMC_RSP_136)
+   resptype |= SDIO_CMD_RSP_136;
+   else if (cmd-resp_type  MMC_RSP_PRESENT)
+   resptype |= SDIO_CMD_RSP_48;
+   else
+   resptype |= SDIO_CMD_RSP_NONE;
+
+   if (cmd-resp_type  MMC_RSP_CRC)
+   resptype |= SDIO_CMD_CHECK_CMDCRC;
+
+   if (cmd-resp_type  MMC_RSP_OPCODE)
+   resptype |= SDIO_CMD_INDX_CHECK;
+
+   if (cmd-resp_type  MMC_RSP_PRESENT) {
+   resptype |= SDIO_UNEXPECTED_RESP;
+   waittype |= SDIO_NOR_UNEXP_RSP;
+   }
+
+   if (data) {
+   resptype |= SDIO_CMD_DATA_PRESENT | SDIO_CMD_CHECK_DATACRC16;
+   xfertype |= SDIO_XFER_MODE_HW_WR_DATA_EN;
+   if (data-flags  MMC_DATA_READ) {
+   xfertype |= SDIO_XFER_MODE_TO_HOST;
+   waittype = SDIO_NOR_DMA_INI;
+   } else
+   

[U-Boot] [PATCH 0/4] Marvell SDIO/MMC driver for Sheevaplug

2012-09-21 Thread DrEagle

This serie of patch add SDIO/MMC support to Sheevaplug board

drEagle (4):
  Add Marvell SDIO/MMC driver for Kirkwood SoC
  Add SDIO/MMC support for kirkwood SoC
  Add SDIO/MMC support for Sheevaplug board
  Fix env address for Sheevaplug board

 arch/arm/include/asm/arch-kirkwood/kirkwood.h |1 +
 board/Marvell/sheevaplug/sheevaplug.c |   11 +
 drivers/mmc/Makefile  |1 +
 drivers/mmc/mrvl_mmc.c|  277 +
 include/configs/sheevaplug.h  |   17 +-
 include/mrvl_mmc.h|  191 +
 6 files changed, 495 insertions(+), 3 deletions(-)
 create mode 100644 drivers/mmc/mrvl_mmc.c
 create mode 100644 include/mrvl_mmc.h

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


[U-Boot] [PATCH 1/4] Add Marvell SDIO/MMC driver for Kirkwood SoC

2012-09-21 Thread DrEagle

Signed-off-by: Gérald Kerma ub...@doukki.net
Signed-off-by: Lior Amsalem al...@marvell.com
---
 drivers/mmc/Makefile   |1 +
 drivers/mmc/mrvl_mmc.c |  277 
 include/mrvl_mmc.h |  191 +
 3 files changed, 469 insertions(+)
 create mode 100644 drivers/mmc/mrvl_mmc.c
 create mode 100644 include/mrvl_mmc.h

diff --git a/drivers/mmc/Makefile b/drivers/mmc/Makefile
index 2b96cdc..7f3b7c1 100644
--- a/drivers/mmc/Makefile
+++ b/drivers/mmc/Makefile
@@ -37,6 +37,7 @@ COBJS-$(CONFIG_GENERIC_MMC) += mmc.o
 COBJS-$(CONFIG_GENERIC_ATMEL_MCI) += gen_atmel_mci.o
 COBJS-$(CONFIG_MMC_SPI) += mmc_spi.o
 COBJS-$(CONFIG_ARM_PL180_MMCI) += arm_pl180_mmci.o
+COBJS-$(CONFIG_MRVL_MMC) += mrvl_mmc.o
 COBJS-$(CONFIG_MV_SDHCI) += mv_sdhci.o
 COBJS-$(CONFIG_MXC_MMC) += mxcmmc.o
 COBJS-$(CONFIG_MXS_MMC) += mxsmmc.o
diff --git a/drivers/mmc/mrvl_mmc.c b/drivers/mmc/mrvl_mmc.c
new file mode 100644
index 000..8127961
--- /dev/null
+++ b/drivers/mmc/mrvl_mmc.c
@@ -0,0 +1,277 @@
+/*
+ * Driver for Marvell SDIO/MMC controller
+ *
+ * (C) Copyright 2012
+ * Marvell Semiconductor www.marvell.com
+ * Written-by: Lior Amsalem al...@marvell.com
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#include common.h
+#include malloc.h
+#include part.h
+#include mmc.h
+
+#include mrvl_mmc.h
+#define MRVL_MMC_MAKE_CMD(c, f) (((c  0xff)  8) | (f  0xff))
+
+
+static int mrvl_mmc_setup_data(struct mmc_data *data)
+{
+   if (data-flags  MMC_DATA_READ) {
+   SDIO_REG_WRITE16(SDIO_SYS_ADDR_LOW,((ulong)(data-dest))  
0x);
+   SDIO_REG_WRITE16(SDIO_SYS_ADDR_HI,(((ulong)data-dest)  16)  
0x);
+   } else {
+   SDIO_REG_WRITE16(SDIO_SYS_ADDR_LOW,((ulong)(data-src))  
0x);
+   SDIO_REG_WRITE16(SDIO_SYS_ADDR_HI,(((ulong)data-src)  16)  
0x);
+   }
+
+   SDIO_REG_WRITE16(SDIO_BLK_SIZE, data-blocksize);
+   SDIO_REG_WRITE16(SDIO_BLK_COUNT, data-blocks);
+
+   return 0;
+}
+
+static int mrvl_mmc_send_cmd (struct mmc *mmc, struct mmc_cmd *cmd, struct 
mmc_data *data)
+{
+   int timeout = 10;
+   ushort waittype = 0;
+   int err = 0 ;
+   ushort response[8], resp_indx = 0;
+   ushort resptype = 0;
+   ushort xfertype = 0;
+
+#ifdef DEBUG
+   printf(cmd [0x%x] resp_type[0x%x] arg[0x%x]\n, cmd-cmdidx, 
cmd-resp_type, cmd-cmdarg);
+#endif
+
+   /* clear status */
+   SDIO_REG_WRITE16(SDIO_NOR_INTR_STATUS, 0x);
+   SDIO_REG_WRITE16(SDIO_ERR_INTR_STATUS, 0x);
+
+   /* Checking if card is busy */
+   while ((SDIO_REG_READ16(SDIO_PRESENT_STATE0)  CARD_BUSY)) {
+   if (timeout == 0) {
+   printf(MRVL MMC: card busy!\n);
+   return -1;
+   }
+   timeout--;
+   udelay(1000);
+   }
+   
+   /* Set up for a data transfer if we have one */
+   if (data) {
+   int err;
+   err = mrvl_mmc_setup_data(data);
+   if(err)
+   return err;
+   }
+
+   /* Analyzing resptype/xfertype/waittype for the command */
+   if (cmd-resp_type  MMC_RSP_BUSY)
+   resptype |= SDIO_CMD_RSP_48BUSY;
+   else if (cmd-resp_type  MMC_RSP_136)
+   resptype |= SDIO_CMD_RSP_136;
+   else if (cmd-resp_type  MMC_RSP_PRESENT)
+   resptype |= SDIO_CMD_RSP_48;
+   else
+   resptype |= SDIO_CMD_RSP_NONE;
+
+   if (cmd-resp_type  MMC_RSP_CRC)
+   resptype |= SDIO_CMD_CHECK_CMDCRC;
+
+   if (cmd-resp_type  MMC_RSP_OPCODE)
+   resptype |= SDIO_CMD_INDX_CHECK;
+
+   if (cmd-resp_type  MMC_RSP_PRESENT) {
+   resptype |= SDIO_UNEXPECTED_RESP;
+   waittype |= SDIO_NOR_UNEXP_RSP;
+   }
+
+   if (data) {
+   resptype |= SDIO_CMD_DATA_PRESENT | SDIO_CMD_CHECK_DATACRC16;
+   xfertype |= SDIO_XFER_MODE_HW_WR_DATA_EN;
+   if (data-flags  MMC_DATA_READ) {
+   xfertype |= SDIO_XFER_MODE_TO_HOST;
+   waittype = SDIO_NOR_DMA_INI;
+   } else
+   

[U-Boot] [PATCH 2/4] Add SDIO/MMC support for kirkwood SoC

2012-09-21 Thread DrEagle

Signed-off-by: drEagle drea...@doukki.net
---
 arch/arm/include/asm/arch-kirkwood/kirkwood.h |1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/include/asm/arch-kirkwood/kirkwood.h 
b/arch/arm/include/asm/arch-kirkwood/kirkwood.h
index 47771d5..343214b 100644
--- a/arch/arm/include/asm/arch-kirkwood/kirkwood.h
+++ b/arch/arm/include/asm/arch-kirkwood/kirkwood.h
@@ -55,6 +55,7 @@
 #define KW_EGIGA0_BASE (KW_REGISTER(0x72000))
 #define KW_EGIGA1_BASE (KW_REGISTER(0x76000))
 #define KW_SATA_BASE   (KW_REGISTER(0x8))
+#define KW_SDIO_BASE   (KW_REGISTER(0x9))
 
 /* Kirkwood Sata controller has two ports */
 #define KW_SATA_PORT0_OFFSET   0x2000
-- 
1.7.10.4
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 3/4] Add SDIO/MMC support for Sheevaplug board

2012-09-21 Thread DrEagle

Signed-off-by: drEagle drea...@doukki.net
---
 board/Marvell/sheevaplug/sheevaplug.c |   11 +++
 include/configs/sheevaplug.h  |   12 
 2 files changed, 23 insertions(+)

diff --git a/board/Marvell/sheevaplug/sheevaplug.c 
b/board/Marvell/sheevaplug/sheevaplug.c
index 688d308..db64a05 100644
--- a/board/Marvell/sheevaplug/sheevaplug.c
+++ b/board/Marvell/sheevaplug/sheevaplug.c
@@ -28,6 +28,9 @@
 #include asm/arch/kirkwood.h
 #include asm/arch/mpp.h
 #include sheevaplug.h
+#ifdef CONFIG_MRVL_MMC
+#include mrvl_mmc.h
+#endif /* CONFIG_MRVL_MMC */
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -147,3 +150,11 @@ void reset_phy(void)
printf(88E1116 Initialized on %s\n, name);
 }
 #endif /* CONFIG_RESET_PHY_R */
+
+#ifdef CONFIG_MRVL_MMC
+int board_mmc_init(bd_t *bis)
+{
+   mrvl_mmc_initialize(bis);
+   return 0;
+}
+#endif /* CONFIG_MRVL_MMC */
diff --git a/include/configs/sheevaplug.h b/include/configs/sheevaplug.h
index 83dd8ff..7d710bf 100644
--- a/include/configs/sheevaplug.h
+++ b/include/configs/sheevaplug.h
@@ -47,6 +47,7 @@
 #define CONFIG_CMD_DHCP
 #define CONFIG_CMD_ENV
 #define CONFIG_CMD_MII
+#define CONFIG_CMD_MMC
 #define CONFIG_CMD_NAND
 #define CONFIG_CMD_PING
 #define CONFIG_CMD_USB
@@ -98,6 +99,17 @@
 #endif /* CONFIG_CMD_NET */
 
 /*
+ * SDIO/MMC Card Configuration
+ */
+#ifdef CONFIG_CMD_MMC
+#define CONFIG_MMC
+#define CONFIG_GENERIC_MMC
+#define CONFIG_MRVL_MMC
+#define CONFIG_SYS_MMC_BASE KW_SDIO_BASE
+#endif /* CONFIG_CMD_MMC */
+
+
+/*
  * File system
  */
 #define CONFIG_CMD_EXT2
-- 
1.7.10.4
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 4/4] Fix env address for Sheevaplug board

2012-09-21 Thread DrEagle

Signed-off-by: drEagle drea...@doukki.net
---
 include/configs/sheevaplug.h |5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/include/configs/sheevaplug.h b/include/configs/sheevaplug.h
index 7d710bf..a10e825 100644
--- a/include/configs/sheevaplug.h
+++ b/include/configs/sheevaplug.h
@@ -71,9 +71,8 @@
  * it has to be rounded to sector size
  */
 #define CONFIG_ENV_SIZE0x2 /* 128k */
-#define CONFIG_ENV_ADDR0x6
-#define CONFIG_ENV_OFFSET  0x6 /* env starts here */
-
+#define CONFIG_ENV_ADDR0x8
+#define CONFIG_ENV_OFFSET  0x8 /* env starts here */
 /*
  * Default environment variables
  */
-- 
1.7.10.4
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] Request for Kirkwood new Marvell MMC Driver mainline

2012-09-20 Thread DrEagle
I have a patch for the support of a generic MMC driver for kirkwood Soc.
I want to make some few more fix to have sheevaplugs been updated also.

Here is the complete changelog of my patch :
- Add Marvell SDIO/MMC driver for Kirkwood SoC
- Add SDIO/MMC support for Sheevaplug board
- Fix env address for Sheevaplug board
- Fix mtdparts for Sheevaplug board
- Fix mtdids for Sheevaplug board
- Add default mtdparts for Sheevaplug board
- Add default mtdids for Sheevaplug board
- Add SATA support for Sheevaplug board

Is there any guide to help for making cumulative patch, and for using
git diff to make some local branch ?

I need, I suppose, to make patch for each subject and segment my diff
into few proposal ?
- MMC Driver
- MMC support
- Fix env
...

Is there any guide for proposing patch to be mainline supported into uboot ?

Thanks in advance for the tips,

Amicalement,




signature.asc
Description: OpenPGP digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] fix IDE_BUS(dev) macro

2012-08-14 Thread DrEagle
Hi,

It works great for my IB-6220 (Dual Sata).

Without the patch, the same disk is seen twice, I have only checked
disks serial numbers :

ib62x0 = version

U-Boot 2012.07-00123-g4d3c95f-dirty (Aug 13 2012 - 11:30:58) RaidSonic
ICY BOX IB-NAS62x0
arm-linux-gnueabi-gcc (Debian 4.4.5-8) 4.4.5
GNU ld (GNU Binutils for Debian) 2.20.1.20100303
ib62x0 = ide reset

Reset IDE: Bus 0: OK Bus 1: OK
  Device 0: Model: WDC WD20EARX-00MMMB0 Firm: 80.00A80 Ser#:
WD-WCAWZ2075392
Type: Hard Disk
Supports 48-bit addressing
Capacity: 1907729.0 MB = 1863.0 GB (-387938128 x 512)
  Device 1: Model: WDC WD20EARX-00MMMB0 Firm: 80.00A80 Ser#:
WD-WCAWZ2075392
Type: Hard Disk
Supports 48-bit addressing
Capacity: 1907729.0 MB = 1863.0 GB (-387938128 x 512)
ib62x0 =

---
With the patch applied, the two disks are seen :
---
patch -p0 -i ../fix_ide.diff

File to patch: include/ide.h

ib62x0 = version

U-Boot 2012.07-00123-g4d3c95f-dirty (Aug 14 2012 - 14:22:49) RaidSonic
ICY BOX IB-NAS62x0
arm-linux-gnueabi-gcc (Debian 4.4.5-8) 4.4.5
GNU ld (GNU Binutils for Debian) 2.20.1.20100303
ib62x0 = ide reset

Reset IDE: Bus 0: OK Bus 1: OK
  Device 0: Model: WDC WD20EARX-00MMMB0 Firm: 80.00A80 Ser#:
WD-WCAWZ2075392
Type: Hard Disk
Supports 48-bit addressing
Capacity: 1907729.0 MB = 1863.0 GB (-387938128 x 512)
  Device 1: Model: WDC WD20EARX-00MMMB0 Firm: 80.00A80 Ser#:
WD-WCAWZ2083815
Type: Hard Disk
Supports 48-bit addressing
Capacity: 1907729.0 MB = 1863.0 GB (-387938128 x 512)
ib62x0 =
ib62x0 = ide device 0

IDE device 0: Model: WDC WD20EARX-00MMMB0 Firm: 80.00A80 Ser#:
WD-WCAWZ2075392
Type: Hard Disk
Supports 48-bit addressing
Capacity: 1907729.0 MB = 1863.0 GB (-387938128 x 512)
... is now current device
ib62x0 = ide device 1

IDE device 1: Model: WDC WD20EARX-00MMMB0 Firm: 80.00A80 Ser#:
WD-WCAWZ2083815
Type: Hard Disk
Supports 48-bit addressing
Capacity: 1907729.0 MB = 1863.0 GB (-387938128 x 512)
... is now current device

---
For me this patch has fixed the detection bug of ide disks.

Hope this tests may help.

Le 13/08/2012 14:27, Albert ARIBAUD a écrit :
 Hi Wolfgang,
 
 On Thu, 09 Aug 2012 22:36:33 +0200, Wolfgang Denk w...@denx.de wrote:
 Dear Albert ARIBAUD,

 In message
 cajhhwatayrt3gbzhrdcqhphrp5hbx3vd2xyuyymsled8xwe...@mail.gmail.com
 you wrote:
 Sorry Luka (and all), been tied up pretty heavily recently, had to
 adjust to find some free time again.

 I will test your patch today and post results tonight.

 What was the outcome of this?  I cannot find any further messages to
 this thread...
 
 Sorry, I was away from home for a few days with no or little Internet
 access.
 
 I wanted to test this on orion5x/edminiv2; I should be able to do this
 today in the course of regression-testing preparing an orion5x patch
 I want to submit in this window. 
 
 Best regards,

 Wolfgang Denk
 
 Amicalement,
 

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


Re: [U-Boot] [PATCH 2/2] kirkwood: ib62x0: Support flattened devicetree

2012-07-21 Thread DrEagle
Hi Simon and Luka,

Le 21/07/2012 10:03, Luka Perkov a écrit :
 On Fri, Jul 20, 2012 at 09:59:15PM +0200, Simon Baatz wrote:
 Support for the IB-NAS62x0 was added to the Linux mainline kernel
 as of 3.5-rc1 using flattened devicetree.  Change the config for
 this board accordingly.

 Signed-off-by: Simon Baatz gmbno...@gmail.com
 Cc: Luka Perkov ub...@lukaperkov.net
 Cc: Prafulla Wadaskar prafu...@marvell.com
 ---
  include/configs/ib62x0.h |4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

 diff --git a/include/configs/ib62x0.h b/include/configs/ib62x0.h
 index 85856f2..34c83a4 100644
 --- a/include/configs/ib62x0.h
 +++ b/include/configs/ib62x0.h
 @@ -37,9 +37,9 @@
  #define CONFIG_SKIP_LOWLEVEL_INIT   /* disable board lowlevel_init */
  
  /*
 - * Machine type
 + * Enable device tree support
   */
 -#define CONFIG_MACH_TYPEMACH_TYPE_NAS6210
 +#define CONFIG_OF_LIBFDT
 
 Do we need to change environment variables too? This is how I'm booting 
 OpenWrt
 with linux 3.3 now:

Is it not better to have the same mtdparts as in the original stock
firmware and in the next linux kernel ?

Then we will just need small specifics distribution patch to customize
the upstream uboot for the specifics boot params:
In Debian, we need the initrd for raid support system bootup.

It is better to have the same partition scheme in next linux kernel and
in uboot, whatever it will be.
And better to be more closer from the original one, to make end-user
upgrade process simpler.

An alternative will be to have parameters, if possible, to put uboot
distribution wide compatible.
May be a bootstrap call (bootscript call from uboot) or another tweak ?

 diff --git a/include/configs/ib62x0.h b/include/configs/ib62x0.h
 index 85856f2..b1c11fd 100644
 --- a/include/configs/ib62x0.h
 +++ b/include/configs/ib62x0.h
 @@ -87,25 +87,23 @@
   */
  #define CONFIG_BOOTCOMMAND \
 setenv bootargs ${console} ${mtdparts} ${bootargs_root};  \
 -   ubi part root;\
 -   ubifsmount root;  \
 +   ubi part rootfs;  \
 +   ubifsmount rootfs;\
 ubifsload 0x80 ${kernel}; \
 -   ubifsload 0x110 ${initrd};\
 -   bootm 0x80 0x110
 +   bootm 0x80
  
  #define CONFIG_MTDPARTS\
 mtdparts=orion_nand:  \
 0x8@0x0(uboot),   \
 0x2@0x8(uboot_env),   \
 -   -@0xa(root)\0
 +   -@0xa(rootfs)\0
  
  #define CONFIG_EXTRA_ENV_SETTINGS  \
 console=console=ttyS0,115200\0\
 mtdids=nand0=orion_nand\0 \
 mtdparts=CONFIG_MTDPARTS  \
 kernel=/boot/uImage\0 \
 -   initrd=/boot/uInitrd\0\
 -   bootargs_root=ubi.mtd=2 root=ubi0:root rootfstype=ubifs\0
 +   bootargs_root=noinitrd ubi.mtd=2 root=ubi0:rootfs rootfstype=ubifs\0
  
  /*
   * Ethernet driver configuration
 
 Regards,
 Luka

Regards,
DrEagle

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


Re: [U-Boot] [PATCH v2] kwboot: boot Marvell Kirkwood SoCs over a serial link

2012-05-09 Thread DrEagle
Hi,

Le 09/05/2012 19:21, Daniel Stodden a écrit :
 On Wed, 2012-05-09 at 08:25 -0500, David Purdy wrote:
 On Wed, May 9, 2012 at 3:00 AM, Daniel Stodden
 daniel.stod...@googlemail.com wrote:


 Have you tried to put the bootrom in the debug mode ?

 https://doukki.net/doku.php?id=wiki:tutoriels:u-boot.uart#boot_from_uart0

 Réfs :
 http://www.marvell.com/embedded-processors/kirkwood/assets/FS_88F6180_9x_6281_OpenSource.pdf

 May be it can helps to understand the 1.11 and 1.21 differences ?

 I never played with it. But according to the documentation, it's rather
 orthogonal to image upload. You get a command line interface. However, I
 see no command references in the docs.

 Might support entering it in kwboot in the future, but I don't see how
 it's would help with the protocol issues.

 Daniel



 @ Daniel: Just 2 thoughts...

 1.   (less important...) I wonder if it is possible to query the
 BootROM version via UART...  if possible, on detecting 111 @ offset
 ff3c, have it print Not Supported on V1.11 BootROM
 
 Unless s/o can point me at documentation for the debug mode, I'm not
 sure whether that's going to work smoothly. Sounds more prone to future
 breakage, as the device firmware evolves.
 
 Iff people would really like to see that supported, I'd rather suggest
 to make it some --test command. Not run ahead of the regular boot mode.
 Which then could match against a black/white list of firmware versions
 tested.

I do not know the importance that it may be have. I have done a dump
from one of my sheevaplug bootrom (v1.11) and it's big-endianness.
The GoFlex found [1] is little-endianness.

I can send the binary dump and results disasm if needed.

 2.  (more importantly) :   I am actually _just_fine__ w/ the level of
 function in your current V2.   You've already done a good service to
 those work on Kirkwood stuff, and would want to press anyone into
 fixing something that they/we didn't break and possibly can't be
 fixed.  [There may well be a reason no one has gotten anything w/ the
 V1.11 BootROM to work with UART-booting.]

 For me, your V2 already feels mature.  Its a big step forward from
 where we were.
 
 Thanks.
 
 I'll fix the select() glitch mentioned before and send out v3.
 
 Daniel
 
 
[1]http://wiki.scottn.us/goflex:start




signature.asc
Description: OpenPGP digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2] kwboot: boot Marvell Kirkwood SoCs over a serial link

2012-05-08 Thread DrEagle
Hi,

Le 08/05/2012 01:40, Daniel Stodden a écrit :
 On Sun, 2012-05-06 at 12:53 -0500, David Purdy wrote:
 On Wed, May 2, 2012 at 2:16 PM, Luka Perkov ub...@lukaperkov.net wrote:
 The kwboot program boots boards based on Marvell's Kirkwood platform
 via Xmodem over their integrated UART.

 Signed-off-by: Daniel Stodden daniel.stod...@googlemail.com
 Acked-by: Luka Perkov ub...@lukaperkov.net
 ---

 Changes from version v1:
  * fix man page
  * minor cosmetic fixes in tools/kwboot.c

 I changed things pointed out on v1 of this patch which was originally
 made by Daniel.


 @ Daniel, Luka, Prafulla, etal :

 I've tried kwboot on two of my devices, and as I was expecting:

 - it worked perfectly with the v1.21 BootROM device (a Seagate GoFlex
 Net) : Nicely done, well implemented, and the timing seems to be a
 non-issue w/ kwboot.  Other previous applications for UARTbooting have
 seemed to me to be less reliable - only booting 50% or 75% of the
 time.  I tried it with kwboot a dozen times or more and it was
 successful each time,  The -p patch-for-UART-booting option is a nice
 feature.


 - it did not seem to work w/  v1.11 BootROM devices (a Pogoplug
 V2/E02, Seagate Dockstar) {previous utilities/picocom-hacks showed the
 same behavior - the bootROM version 1.11 apparently has some
 difference/defect/shortcoming that does not allow this function to
 work as the docs suggest it should.  Too bad no one has pointed out
 exactly what the issue is, or found a patch/workaround it make this
 work on v1.11  BootROM devices.}.   NOTE: It did _not_ adversely
 affect the device otherwise.  I'd seen a post on a thread at another
 site that suggested that performing this procedure on a v1.11 device
 could corrupt the NAND - this was __not__ the case w/ my attempts
 (about a dozen trials, with UART uboot.kwb's and also using the -p
 patch option w/ NAND files.
 
 Hey.
 
 Unfortunately I only have a couple Buffalo boards and a Qnap, all
 essentially the same chip.
 
 Say, if you find the time, could you run it through strace and post the
 full output? (strace -o /tmp/kwboot.log -s 256 -T ..). 
 
 Just see where it bails. Maybe it's some issue worth trying to hack
 around.


Have you tried to put the bootrom in the debug mode ?

https://doukki.net/doku.php?id=wiki:tutoriels:u-boot.uart#boot_from_uart0

Réfs :
http://www.marvell.com/embedded-processors/kirkwood/assets/FS_88F6180_9x_6281_OpenSource.pdf

May be it can helps to understand the 1.11 and 1.21 differences ?

Amicalement,
---
Gk2
:-]

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


Re: [U-Boot] [PATCH v2] add new board nas62x0

2012-03-20 Thread DrEagle
Hi Luka,

Le 19/03/2012 16:50, Marek Vasut a écrit :
 Dear Luka Perkov,
 
 Hi Marek,

 On Sun, Mar 18, 2012 at 04:15:53PM +0100, Marek Vasut wrote:
 + * Copyright (C) 2011 G??rald Kerma drea...@doukki.net

 Can you please fix your name here?

 I think your mail agent is not displaying UTF8 characters correctly. If
 this is a problem we could change it if Gerald is ok with that. Nobody
 else had problems with this...

Okay for me.

Please, replace by ... Gerald Kerma drea...@doukki.net

Regards,
---
Gk2
:-]

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


Re: [U-Boot] [PATCH] add new board nas62x0

2012-03-16 Thread DrEagle
Hi all,

may be it can be also imported in debian-uboot package ?

more available at :
https://doukki.net/doku.php?id=wiki:notes:ib-nas6220-b

Le 16/03/2012 00:59, Luka Perkov a écrit :
 Add support for new boards RaidSonic ICY BOX NAS6210 and NAS6220 boards.
 
 Only difference between boards is number of SATA ports. By default we
 use only one SATA port. In order to use both SATA ports on NAS6220
 define CONFIG_NAS6220 in board config file.
 
 Signed-off-by: Luka Perkov ub...@lukaperkov.net
 Signed-off-by: Gerald Kerma drea...@doukki.net
 ---
 
 If you want to test the boot loader without touching nand you can boot
 u-boot using UART. In order to create UART image you need to change
 image configuration from nand to uart:
 
 sed -i 's/nand/uart/' board/Marvell/ib62x0/kwbimage.cfg
 
 To boot your kirkwood board from UART you will need this tool:
 
 http://www.solinno.co.uk/public/kwuartboot/
 http://www.solinno.co.uk/public/kwuartboot/kwuartboot-0.1.tar.gz
 
 Compile and run it like this:
 
 ./kwuartboot /dev/ttyUSB0 /path/to/u-boot.kwb
 
 And when it's finished open the console.
 
Add support for new boards RaidSonic ICY BOX NAS6210 and NAS6220 boards.

Only difference between boards is number of SATA ports. By default we
use only one SATA port. In order to use both SATA ports on NAS6220
define CONFIG_NAS6220 in board config file.

Signed-off-by: Luka Perkov ub...@lukaperkov.net
Signed-off-by: Gerald Kerma drea...@doukki.net
---

If you want to test the boot loader without touching nand you can boot
u-boot using UART. In order to create UART image you need to change
image configuration from nand to uart:

sed -i 's/nand/uart/' board/Marvell/ib62x0/kwbimage.cfg

To boot your kirkwood board from UART you will need this tool:

http://www.solinno.co.uk/public/kwuartboot/
http://www.solinno.co.uk/public/kwuartboot/kwuartboot-0.1.tar.gz

Compile and run it like this:

./kwuartboot /dev/ttyUSB0 /path/to/u-boot.kwb

And when it's finished open the console.

diff --git a/board/Marvell/ib62x0/Makefile b/board/Marvell/ib62x0/Makefile
new file mode 100644
index 000..3d82f27
--- /dev/null
+++ b/board/Marvell/ib62x0/Makefile
@@ -0,0 +1,51 @@
+#
+# (C) Copyright 2009
+# Marvell Semiconductor www.marvell.com
+# Written-by: Prafulla Wadaskar prafu...@marvell.com
+#
+# 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).o
+
+COBJS  := ib62x0.o
+
+SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
+SOBJS  := $(addprefix $(obj),$(SOBJS))
+
+$(LIB):$(obj).depend $(OBJS) $(SOBJS)
+   $(call cmd_link_o_target, $(OBJS) $(SOBJS))
+
+clean:
+   rm -f $(SOBJS) $(OBJS)
+
+distclean: clean
+   rm -f $(LIB) core *.bak .depend
+
+#
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
diff --git a/board/Marvell/ib62x0/ib62x0.c b/board/Marvell/ib62x0/ib62x0.c
new file mode 100644
index 000..2fad48d
--- /dev/null
+++ b/board/Marvell/ib62x0/ib62x0.c
@@ -0,0 +1,122 @@
+/*
+ * Copyright (C) 2011 Gérald Kerma drea...@doukki.net
+ *
+ * Written-by: Gérald Kerma drea...@doukki.net
+ *
+ * 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 common.h
+#include miiphy.h
+#include asm/arch/cpu.h
+#include asm/arch/kirkwood.h
+#include asm/arch/mpp.h

[U-Boot] Request for information : How to modify MAX SDRAM

2011-10-14 Thread DrEagle
Hi,

I'm trying to add a new architecture to uboot.
What is the process and there is a documentation ?

It's an icybox nas6220-b which is similar to sheevaplug, except for
memory size and nand limit.

wiki.nas-portal.org/index.php/IB-NAS6220-B
www.raidsonic.de/data/products/icybox/IB-NAS6220/datasheet_ib-nas6220_e.pdf

How can I limit the sheevaplug configuration memory and ram size limit ?

Cheers,
-- 
Gk2 [:-]



signature.asc
Description: OpenPGP digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Request for information : How to modify MAX SDRAM

2011-10-14 Thread DrEagle
Le 14/10/2011 10:24, DrEagle a écrit :
 Hi,
 
 I'm trying to add a new architecture to uboot.
 What is the process and there is a documentation ?
 
 It's an icybox nas6220-b which is similar to sheevaplug, except for
 memory size and nand limit.
 
 wiki.nas-portal.org/index.php/IB-NAS6220-B
 www.raidsonic.de/data/products/icybox/IB-NAS6220/datasheet_ib-nas6220_e.pdf
 
 How can I limit the sheevaplug configuration memory and ram size limit ?
 
 Cheers,

Here is the default u-boot :

 __  __  _ _
|  \/  | __ _ _    _| | |
| |\/| |/ _` | '__\ \ / / _ \ | |
| |  | | (_| | |   \ V /  __/ | |
|_|  |_|\__,_|_|\_/ \___|_|_|
 _   _   _
| | | |   | __ )  ___   ___ | |_
| | | |___|  _ \ / _ \ / _ \| __|
| |_| |___| |_) | (_) | (_) | |_
 \___/|/ \___/ \___/ \__|
 ** MARVELL BOARD: DB-88F6281A-BP LE

U-Boot 1.1.4 (Oct 12 2009 - 13:41:53) Marvell version: 3.4.16

U-Boot code: 0060 - 0067FFF0  BSS: - 006CEE60

Soc: MV88F6281 Rev 3 (DDR2)
CPU running @ 1200Mhz L2 running @ 400Mhz
SysClock = 400Mhz , TClock = 200Mhz

DRAM CAS Latency = 5 tRP = 5 tRAS = 18 tRCD=6
DRAM CS[0] base 0x   size 256MB
DRAM Total size 256MB  16bit width
Flash:  0 kB
Addresses 8M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (8M - 7M): Done
NAND:256 MB

CPU : Marvell Feroceon (Rev 1)

Streaming disabled
Write allocate disabled


USB 0: host mode
PEX 0: interface detected no Link.
Net:   egiga0 [PRIME]
Hit any key to stop autoboot:  0

-- 
Gk2 [:-]



signature.asc
Description: OpenPGP digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot