Re: [U-Boot] [PATCH 0/4] sf: Accessing > 16MBytes flashes in existing 3-byte addr mode.

2013-05-25 Thread Jagan Teki
On Sat, Feb 23, 2013 at 5:08 PM, Jagannadha Sutradharudu Teki
 wrote:
> The current implementation in spi_flash supports 3-byte address mode
> due to this up to 16MB amount of flash is able to access for those
> flashes which has an actual size of > 16MB.
>
> List of flashes:
> S25FL256S
> N25Q256
> N25Q256A
> W25Q256(not yet mainlined)
>
> extended/bank address register contains an information to access the
> 4th byte addressing hence the flashes which has > 16MB can be accessible.
>
> extended/bank address read/write commands in spansion & winbond/stmicro
> are different, currently I have added support for spansion.
>
> if the user is giving an offset > 0x100 for read/write/erase commands
> the implementation will subtract the offset from 0x100 and then enable the
> extended/bank address register.
>
> [pseudo]
> if (offset > 0x100) {
> offset -= 0x100;
> enable the ext/bank addr register
> } else
> disable the ext/bank addr register
>
>
> Thanks,
> Jagan.
>
> Jagannadha Sutradharudu Teki (4):
>   sf: Add extended address register writing support
>   sf: Add extended address register reading support
>   sf: Add extended address access support
>   sf: winbond: Add support for W25Q256
>
>  drivers/mtd/spi/spi_flash.c  |  145 
> ++
>  drivers/mtd/spi/spi_flash_internal.h |   18 
>  drivers/mtd/spi/winbond.c|5 +
>  3 files changed, 168 insertions(+), 0 deletions(-)
>
> --
> 1.7.4

Thanks for your contribution for new feature setup.
Could you please send the v2 for these > 16MB flash support patch set.

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


Re: [U-Boot] [PATCH 4/4] sf: winbond: Add support for W25Q256

2013-05-25 Thread Jagan Teki
On Sat, Feb 23, 2013 at 5:09 PM, Jagannadha Sutradharudu Teki
 wrote:
> Add support for Winbond W25Q256 SPI flash.
>
> Signed-off-by: Jagannadha Sutradharudu Teki 
> ---
>  drivers/mtd/spi/winbond.c |5 +
>  1 files changed, 5 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/mtd/spi/winbond.c b/drivers/mtd/spi/winbond.c
> index 4418302..ceec0cb 100644
> --- a/drivers/mtd/spi/winbond.c
> +++ b/drivers/mtd/spi/winbond.c
> @@ -63,6 +63,11 @@ static const struct winbond_spi_flash_params 
> winbond_spi_flash_table[] = {
> .name   = "W25Q128",
> },
> {
> +   .id = 0x4019,
> +   .nr_blocks  = 512,
> +   .name   = "W25Q256",
> +   },
> +   {
> .id = 0x5014,
> .nr_blocks  = 128,
> .name   = "W25Q80",
> --
> 1.7.4

Reviewed-by: Jagannadha Sutradharudu Teki 

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


Re: [U-Boot] [PATCH] sf: spansion: Add support for S25FL128S

2013-05-25 Thread Jagan Teki
On Tue, Feb 5, 2013 at 8:22 AM, Xie Xiaobo  wrote:
> SPANSION recommend S25FL128S supersedes S25FL129P, and the two flash
> memory have the same device ID and Memory architecture. So they can
> use the same config parameters.
>
> Signed-off-by: Xie Xiaobo 
> ---
>  drivers/mtd/spi/spansion.c |2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/mtd/spi/spansion.c b/drivers/mtd/spi/spansion.c
> index 32b76e0..d617170 100644
> --- a/drivers/mtd/spi/spansion.c
> +++ b/drivers/mtd/spi/spansion.c
> @@ -94,7 +94,7 @@ static const struct spansion_spi_flash_params 
> spansion_spi_flash_table[] = {
> .idcode2 = 0x4d01,
> .pages_per_sector = 256,
> .nr_sectors = 256,
> -   .name = "S25FL129P_64K",
> +   .name = "S25FL129P_64K/S25FL128S",

Update the name for S25FL128S as S25FL128S_64K has ext' id 0x4d01
indicates 64k-sector arch'.
Please send a v2 for this

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


Re: [U-Boot] Please pull u-boot-mpc85xx.git

2013-05-25 Thread Tom Rini
On Fri, May 24, 2013 at 05:17:48PM -0500, Andy Fleming wrote:

> The following changes since commit 53237afe5b64abe7b17fbfed958f3dc83f503ffa:
> 
>   cmd_mem: fix cp command (2013-05-24 10:38:08 -0400)
> 
> are available in the git repository at:
> 
>   git://www.denx.de/git/u-boot-mpc85xx.git master
> 
> for you to fetch changes up to a71d45d706a5b51c348160163b6c159632273fed:
> 
>   powerpc/mpc85xx: Clear L1 D-cache lock (2013-05-24 16:54:14 -0500)
> 
> 
> Ed Swarthout (2):
>   powerpc/qixis: add clock measurement registers
>   powerpc/t4qds: use clock measurement for sysclk and ddr clock
> 
> James Yang (2):
>   Enable L2 cache parity/ECC error checking
>   Add e6500 L2 replacement policy selection
> 
> Poonam Aggrwal (1):
>   powerpc/B4: Merge B4420 and B4860 in config_mpc85xx.h
> 
> Ruchika Gupta (1):
>   SECURE BOOT - Removed deletion of TLB entries code
> 
> Shaohui Xie (6):
>   net/phy: fix select line for TN80xx
>   T4240/ramboot: enable PBL tool for T4240
>   powerpc/p5040: enable NAND, SD, SPI boot support
>   powerpc/p5040: enable PBL tool support
>   powerpc/p2041: fix serdes reference clock frequency display for PC board
>   powerpc/p5040: fix mdio mux for 10G port
> 
> Shaveta Leekha (2):
>   powerpc/b4860: fix for Serdes connectivity to SFP's
>   powerpc/b4860qds: Add LAW Target ID and Create LAW entry for Maple
> 
> Shengzhou Liu (1):
>   powerpc/t4240qds: fix PHY reset timeout issue
> 
> Stephen George (1):
>   board/t4240qds, b4860qds: LAW/TLB for DCSR set to size 32M
> 
> Suresh Gupta (1):
>   Enable XAUI interface for B4860QDS
> 
> Xie Xiaobo (1):
>   sf: spansion: Add support for S25FL128S
> 
> York Sun (10):
>   common: Update cmd_bdinfo for PPC
>   powerpc/t4240qds: Add board detail for bdinfo command
>   powerpc/mpc85xx: check if core is disabled for showing status
>   powerpc/t4240qds: Add VDD override
>   powerpc/T4160: Merge T4160 and T4240 in config_mpc85xx.h
>   powerpc/mpc8xxx: Add T1040 and variant SoCs
>   powerpc/chassis2: Change core numbering scheme
>   powerpc/mpc8xxx: Allow DDR overclock
>   powerpc/t4qds: Add SW7[4] in the DIP switch display
>   powerpc/mpc85xx: Clear L1 D-cache lock
> 
>  arch/powerpc/cpu/mpc85xx/Makefile  |3 +
>  arch/powerpc/cpu/mpc85xx/cpu_init.c|2 +-
>  arch/powerpc/cpu/mpc85xx/cpu_init_early.c  |7 -
>  arch/powerpc/cpu/mpc85xx/mp.c  |2 +
>  arch/powerpc/cpu/mpc85xx/release.S |   41 +++--
>  arch/powerpc/cpu/mpc85xx/speed.c   |   20 +--
>  arch/powerpc/cpu/mpc85xx/start.S   |4 +-
>  arch/powerpc/cpu/mpc85xx/t1040_ids.c   |  135 +++
>  arch/powerpc/cpu/mpc85xx/t1040_serdes.c|   93 +++
>  arch/powerpc/cpu/mpc8xxx/cpu.c |   59 ++-
>  .../cpu/mpc8xxx/ddr/lc_common_dimm_params.c|2 -
>  arch/powerpc/include/asm/config_mpc85xx.h  |   98 +--
>  arch/powerpc/include/asm/fsl_law.h |2 +
>  arch/powerpc/include/asm/fsl_secure_boot.h |   10 --
>  arch/powerpc/include/asm/fsl_serdes.h  |8 +
>  arch/powerpc/include/asm/immap_85xx.h  |   29 ++--
>  arch/powerpc/include/asm/processor.h   |   17 ++
>  board/freescale/b4860qds/b4860qds.c|6 +-
>  board/freescale/b4860qds/b4860qds_crossbar_con.h   |   31 ++--
>  board/freescale/b4860qds/eth_b4860qds.c|   35 
>  board/freescale/b4860qds/law.c |6 +-
>  board/freescale/b4860qds/tlb.c |2 +-
>  board/freescale/common/qixis.h |6 +-
>  board/freescale/corenet_ds/eth_superhydra.c|8 +-
>  board/freescale/corenet_ds/rcw_p5040ds.cfg |   11 ++
>  board/freescale/p2041rdb/p2041rdb.c|   11 ++
>  board/freescale/t4qds/eth.c|   19 ++-
>  board/freescale/t4qds/law.c|3 +-
>  board/freescale/t4qds/t4_pbi.cfg   |   36 
>  board/freescale/t4qds/t4_rcw.cfg   |7 +
>  board/freescale/t4qds/t4qds.c  |  172 
> +++-
>  board/freescale/t4qds/tlb.c|2 +-
>  boards.cfg |3 +
>  common/cmd_bdinfo.c|5 +
>  doc/README.b4860qds|4 +-
>  doc/README.t4240qds|   26 ++-
>  drivers/mtd/spi/spansion.c |2 +-
>  drivers/net/fm/b4860.c |6 +-
>  drivers/net/phy/teranetics.c   |   16 +-
>  include/configs/B4860QDS.h |   16 +-
>  include/configs/corenet_ds.h 

Re: [U-Boot] [PATCH] SF: Add Spansion S25FL064P IDs

2013-05-25 Thread Jagan Teki
On Mon, Feb 4, 2013 at 11:30 PM, Marek Vasut  wrote:
> Hi,
>
> was this ever applied? I see SPI flash patches are completely ignored.
>
>> This is a S25FL064A successor. It supports up to 104MHz bus
>> speed.
>>
>> Signed-off-by: Marek Vasut 
>> Cc: Heiko Schocher 
>> Cc: Mike Frysinger 
>> Cc: Scott Wood 
>> Cc: Wolfgang Denk 
>> ---
>>  drivers/mtd/spi/spansion.c |7 +++
>>  1 file changed, 7 insertions(+)
>>
>> diff --git a/drivers/mtd/spi/spansion.c b/drivers/mtd/spi/spansion.c
>> index 9a114ac..faf4414 100644
>> --- a/drivers/mtd/spi/spansion.c
>> +++ b/drivers/mtd/spi/spansion.c
>> @@ -90,6 +90,13 @@ static const struct spansion_spi_flash_params
>> spansion_spi_flash_table[] = { .name = "S25FL032P",
>>   },
>>   {
>> + .idcode1 = 0x0216,
>> + .idcode2 = 0x4d00,
>> + .pages_per_sector = 256,
>> + .nr_sectors = 128,
>> + .name = "S25FL064P",
>> + },
>> + {
>>   .idcode1 = 0x2018,
>>   .idcode2 = 0x4d01,
>>   .pages_per_sector = 256,
>
> Best regards,
> Marek Vasut
> ___
> U-Boot mailing list
> U-Boot@lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot

Reviewed-by: Jagannadha Sutradharudu Teki 

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


Re: [U-Boot] [PATCH v2] sf: winbond: Add support for W25PXX SPI flash

2013-05-25 Thread Jagan Teki
On Fri, May 24, 2013 at 6:39 AM, Kuo-Jung Su  wrote:
> From: Kuo-Jung Su 
>
> Add support for Winbond's W25PXX SPI flash.
> These devices is used on Faraday A369 evaluation board.
>
> Signed-off-by: Kuo-Jung Su 
> CC: Jagan Teki 
> CC: Tom Rini 
> ---
> Changes for v2:
>- Update commit message header
>- Add commit message body
>
>  drivers/mtd/spi/winbond.c |   17 -
>  1 file changed, 16 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mtd/spi/winbond.c b/drivers/mtd/spi/winbond.c
> index 2716209..2a27837 100644
> --- a/drivers/mtd/spi/winbond.c
> +++ b/drivers/mtd/spi/winbond.c
> @@ -18,6 +18,21 @@ struct winbond_spi_flash_params {
>
>  static const struct winbond_spi_flash_params winbond_spi_flash_table[] = {
> {
> +   .id = 0x2014,
> +   .nr_blocks  = 16,
> +   .name   = "W25P80",
> +   },
> +   {
> +   .id = 0x2015,
> +   .nr_blocks  = 32,
> +   .name   = "W25P16",
> +   },
> +   {
> +   .id = 0x2016,
> +   .nr_blocks  = 64,
> +   .name   = "W25P32",
> +   },
> +   {
> .id = 0x3013,
> .nr_blocks  = 8,
> .name   = "W25X40",
> @@ -104,7 +119,7 @@ struct spi_flash *spi_flash_probe_winbond(struct 
> spi_slave *spi, u8 *idcode)
> }
>
> flash->page_size = 256;
> -   flash->sector_size = 4096;
> +   flash->sector_size = (idcode[1] == 0x20) ? 65536 : 4096;
> flash->size = 4096 * 16 * params->nr_blocks;
>
> return flash;
> --
> 1.7.9.5
>

Reviewed-by: Jagannadha Sutradharudu Teki 

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


[U-Boot] Micron eMMC problem on sabre SD like card

2013-05-25 Thread jean-francois simon
Hi,
We have a new design that is based on Freescale SABRE SD card.
We see that accesses made to the eMMC (Micron MTFC64GJVDN-4M ) are not working.
We have placed the eMMC on SD3 (SD4 on Sabre SD). We want to use it in
8bit bus width, DDR, fast speed.
The very first command sent to the device hangs. The hang happens in
this function, when the mmc driver is waiting for an interrupt to
occur:


drivers/mmc/fsl_esdhc.c::esdhc_send_cmd()
..snip
   /* Send the command */
esdhc_write32(®s->cmdarg, cmd->cmdarg);
   #if defined(CONFIG_FSL_USDHC)
esdhc_write32(®s->mixctrl,
(esdhc_read32(®s->mixctrl) & 0xFF80) | (xfertyp & 0x7F));
esdhc_write32(®s->xfertyp, xfertyp & 0x);
#else
esdhc_write32(®s->xfertyp, xfertyp);
#endif

/* Mask all irqs */
esdhc_write32(®s->irqsigen, 0);

/* Wait for the command to complete */
while (!(esdhc_read32(®s->irqstat) & (IRQSTAT_CC |
IRQSTAT_CTOE)))<<


We have based our u-boot on the official tree, not the Freescale 2009
tree. I can see that the mmc drivers are somewhat different.

This must be obvious since it happens on the first access, but I am
not sure where to look.

Thanks a lot,  ;


-- 
___
jean-francois simon  - www.themis.com
ph: +33 (0)4 76 14 77 85
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] buildman: Allow make flags to be specified for each board

2013-05-25 Thread Simon Glass
There are a few make options such as BUILD_TAG which can be provided when
building U-Boot. Provide a way for buildman to pass these flags to make
also.

The flags should be in a [make-flags] section and arranged by target name
(the 'target' column in boards.cfg. See the README for more details.

Signed-off-by: Simon Glass 
---
 tools/buildman/README   | 22 +
 tools/buildman/bsettings.py |  3 --
 tools/buildman/builder.py   |  1 +
 tools/buildman/buildman.py  | 13 
 tools/buildman/toolchain.py | 79 +++--
 5 files changed, 113 insertions(+), 5 deletions(-)

diff --git a/tools/buildman/README b/tools/buildman/README
index 7221007..281bdbe 100644
--- a/tools/buildman/README
+++ b/tools/buildman/README
@@ -645,6 +645,28 @@ It is common when refactoring code for the rodata to 
decrease as the text size
 increases, and vice versa.
 
 
+Providing 'make' flags
+==
+
+U-Boot's build system supports a few flags (such as BUILD_TAG) which affect
+the build product. These flags can be specified in the buildman settings
+file. They can also be useful when building U-Boot against other open source
+software.
+
+[make-flags]
+at91-boards=ENABLE_AT91_TEST=1
+snapper9260=${at91-boards} BUILD_TAG=442
+snapper9g45=${at91-boards} BUILD_TAG=443
+
+This will use 'make ENABLE_AT91_TEST=1 BUILD_TAG=442' for snapper9260
+and 'make ENABLE_AT91_TEST=1 BUILD_TAG=442' for snapper9g45. A special
+variable ${target} is available to access the target name (snapper9260 and
+snapper9g20 in this case). Variables are resolved recursively.
+
+It is expected that any variables added are dealt with in U-Boot's
+config.mk file and documented in the README.
+
+
 Other options
 =
 
diff --git a/tools/buildman/bsettings.py b/tools/buildman/bsettings.py
index 7e66c63..6ca7b1e 100644
--- a/tools/buildman/bsettings.py
+++ b/tools/buildman/bsettings.py
@@ -52,9 +52,6 @@ def GetItems(section):
 return settings.items(section)
 except ConfigParser.NoSectionError as e:
 print e
-print ("Warning: No tool chains - please add a [toolchain] section "
-"to your buildman config file %s. See README for details" %
-config_fname)
 return []
 except:
 raise
diff --git a/tools/buildman/builder.py b/tools/buildman/builder.py
index e426442..b1a4d5a 100644
--- a/tools/buildman/builder.py
+++ b/tools/buildman/builder.py
@@ -269,6 +269,7 @@ class BuilderThread(threading.Thread):
 args.extend(['-j', str(self.builder.num_jobs)])
 config_args = ['%s_config' % brd.target]
 config_out = ''
+args.extend(self.builder.toolchains.GetMakeArguments(brd))
 
 # If we need to reconfigure, do that now
 if do_config:
diff --git a/tools/buildman/buildman.py b/tools/buildman/buildman.py
index 7b05d0f..1e80c8a 100755
--- a/tools/buildman/buildman.py
+++ b/tools/buildman/buildman.py
@@ -48,6 +48,19 @@ import toolchain
 
 def RunTests():
 import test
+import doctest
+
+result = unittest.TestResult()
+for module in ['toolchain']:
+suite = doctest.DocTestSuite(module)
+suite.run(result)
+
+# TODO: Surely we can just 'print' result?
+print result
+for test, err in result.errors:
+print err
+for test, err in result.failures:
+print err
 
 sys.argv = [sys.argv[0]]
 suite = unittest.TestLoader().loadTestsFromTestCase(test.TestBuild)
diff --git a/tools/buildman/toolchain.py b/tools/buildman/toolchain.py
index e0a6970..9804dfc 100644
--- a/tools/buildman/toolchain.py
+++ b/tools/buildman/toolchain.py
@@ -19,6 +19,7 @@
 # MA 02111-1307 USA
 #
 
+import re
 import glob
 import os
 
@@ -113,12 +114,18 @@ class Toolchains:
 def __init__(self):
 self.toolchains = {}
 self.paths = []
-for name, value in bsettings.GetItems('toolchain'):
+toolchains = bsettings.GetItems('toolchain')
+if not toolchains:
+print ("Warning: No tool chains - please add a [toolchain] section"
+ " to your buildman config file %s. See README for details" %
+ config_fname)
+
+for name, value in toolchains:
 if '*' in value:
 self.paths += glob.glob(value)
 else:
 self.paths.append(value)
-
+self._make_flags = dict(bsettings.GetItems('make-flags'))
 
 def Add(self, fname, test=True, verbose=False):
 """Add a toolchain to our list
@@ -183,3 +190,71 @@ class Toolchains:
 if not arch in self.toolchains:
 raise ValueError, ("No tool chain found for arch '%s'" % arch)
 return self.toolchains[arch]
+
+def ResolveReferences(self, var_dict, args):
+"""Resolve variable references in a string
+
+This converts ${blah} within the string to the value of blah.
+This function works recu