Re: [U-Boot] [PATCH v3 1/3] spi: spi_flash: Dont set quad enable for micron in all cases

2016-10-20 Thread S Durga Prasad Paladugu
Hi Jagan,

On Wed, Jul 27, 2016 at 3:26 PM, Jagan Teki 
wrote:

> On 27 July 2016 at 14:31, Siva Durga Prasad Paladugu
>  wrote:
> > Hi Jagan,
> >
> >> -Original Message-
> >> From: Jagan Teki [mailto:jagannadh.t...@gmail.com]
> >> Sent: Wednesday, July 27, 2016 1:24 PM
> >> To: Siva Durga Prasad Paladugu 
> >> Cc: u-boot@lists.denx.de; Michal Simek ; Siva Durga
> >> Prasad Paladugu 
> >> Subject: Re: [PATCH v3 1/3] spi: spi_flash: Dont set quad enable for
> micron in all
> >> cases
> >>
> >> On 19 July 2016 at 14:40, Siva Durga Prasad Paladugu
> >>  wrote:
> >> > Dont set quad enable for micron devices in all cases Setting the quad
> >> > enable bit in micron expects all other commands like register reads on
> >> > quad lines which may not be supported by some controllers. Hence, dont
> >> > set the quad enable if controller driver sets the no_all_quad.
> >>
> >> Sorry, I'm not fond of controller hacks, please try for any other
> solution and
> >> even planning to remove existing ones.
> > Definitely there should be a way to mention about controller
> capabilities to the
> > Framework. As of now I can see this is only way. Do you have any other
> > Suggested way which is already in place.
> > I can see that Linux mainline has already removed Micron quad enable
> functionality with this patch. Probably because of same kind of reason
> > https://github.com/torvalds/linux/commit/3b5394a3ccffbfa1d1d448d4874285
> 3a862822c4
>
> The reason to remov this support from Linux is different than this,
> and u-boot have support for quad write ie not supported by Linux.
>

We can still have quad write with out quad enable bit set for micron
as it supports quad page program in extended spi(command on single and data
on 4 lines).
The issue for me is when the quad enable bit was set for micron, it expects
everything on
four lines even for register reads.

Thanks,
Siva


> --
> Jagan.
> ___
> 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 2/3] spi: zynqmp_qspi: Add QSPI driver support for ZynqMP

2016-10-20 Thread S Durga Prasad Paladugu
Hi Jagan,

On Wed, Jul 27, 2016 at 1:28 PM, Jagan Teki 
wrote:

> On 19 July 2016 at 14:40, Siva Durga Prasad Paladugu
>  wrote:
> > This adds QSPI driver support for ZynqMP platform
> > This driver supports all spi flash commands in
> > qspi single mode.
> >
> > Signed-off-by: Siva Durga Prasad Paladugu 
> > ---
> > Changes for v3:
> > - None
> > Changes for v2:
> > - set no_all_quad as zynqmp qspi
> >   controller doesnt support it
> > ---
> >  drivers/spi/Kconfig   |   9 +
> >  drivers/spi/Makefile  |   1 +
> >  drivers/spi/zynqmp_qspi.c | 705 ++
> 
> >  3 files changed, 715 insertions(+)
> >  create mode 100644 drivers/spi/zynqmp_qspi.c
> >
> > diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig
> > index aca385d..6814ff9 100644
> > --- a/drivers/spi/Kconfig
> > +++ b/drivers/spi/Kconfig
> > @@ -172,6 +172,15 @@ config ZYNQ_QSPI
> >   Zynq QSPI IP core. This IP is used to connect the flash in
> >   4-bit qspi, 8-bit dual stacked and shared 4-bit dual parallel.
> >
> > +config ZYNQMP_QSPI
> > +   bool "ZynqMP QSPI driver"
> > +   depends on ARCH_ZYNQMP
> > +   help
> > + Enable the ZynqMP Quad-SPI (QSPI) driver. This driver can be
> > + used to access the SPI NOR flash on platforms embedding this
> > + ZynqMP QSPI IP core. This IP is used to connect the flash in
> > + 4-bit qspi, 8-bit dual stacked and shared 4-bit dual parallel.
>
> If this is the case, spi couldn't be the correct place to handle nor
> dualness.
>

But i see zynq also added here. If this not the correct place could you
please point me
to where this should go.

Regards,
Siva


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


[U-Boot] ext4write issue.

2015-05-25 Thread S Durga Prasad Paladugu
Hi all,

I am having an ext4write issue on zynq, which fails when i am trying to
write a file to ext4 formatted SD card. here is the log below.

zynq-uboot ext4ls mmc 0:2
DIR   1024 .
DIR   1024 ..
DIR   1024 lost+found
zynq-uboot
zynq-uboot
zynq-uboot ext4write mmc 0:2 0x4000 /bar.txt 10
File System is consistent
sdhci_send_command: MMC: 0 busy timeout increasing to: 200 ms.
sdhci_send_command: MMC: 0 busy timeout increasing to: 400 ms.
sdhci_send_command: MMC: 0 busy timeout increasing to: 800 ms.
sdhci_send_command: MMC: 0 busy timeout increasing to: 1600 ms.
sdhci_send_command: MMC: 0 busy timeout increasing to: 3200 ms.
sdhci_send_command: MMC: 0 busy timeout.
sdhci_send_command: MMC: 0 busy timeout.
sdhci_send_command: MMC: 0 busy timeout.
sdhci_send_command: MMC: 0 busy timeout.
sdhci_send_command: MMC: 0 busy timeout.
sdhci_send_command: MMC: 0 busy timeout.
sdhci_send_command: MMC: 0 busy timeout.
 ** ext4fs_devread read error - block
sdhci_send_command: MMC: 0 busy timeout.
sdhci_send_command: MMC: 0 busy timeout.
 ** ext4fs_devread read error - block
Error in getting the block group descriptor table
sdhci_send_command: MMC: 0 busy timeout.
sdhci_send_command: MMC: 0 busy timeout.
 ** ext2fs_devread() read error **
sdhci_send_command: MMC: 0 busy timeout.
 ** ext4fs_devread read error - block
sdhci_send_command: MMC: 0 busy timeout.
sdhci_send_command: MMC: 0 busy timeout.
 ** ext4fs_devread read error - block
sdhci_send_command: MMC: 0 busy timeout.
error in File System init
** Error ext4fs_write() **
zynq-uboot
sdhci_send_command: MMC: 0 busy timeout.
** Can't read partition table on 0:0 **
** Invalid partition 2 **
zynq-uboot  ext4ls mmc 0:2
sdhci_send_command: MMC: 0 busy timeout.
** Can't read partition table on 0:0 **
** Invalid partition 2 **
zynq-uboot

I further debugged and found that the same is working with single block
write commands instead of multi block write commands. Here is the diff of
the changes i made to make it single block write.

 drivers/mmc/mmc_write.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mmc/mmc_write.c b/drivers/mmc/mmc_write.c
index aa2fdef..269d233 100644
--- a/drivers/mmc/mmc_write.c
+++ b/drivers/mmc/mmc_write.c
@@ -167,7 +167,7 @@ ulong mmc_bwrite(int dev_num, lbaint_t start, lbaint_t
blkcnt, const void *src)
  return 0;

  do {
- cur = (blocks_todo  mmc-b_max) ?  mmc-b_max : blocks_todo;
+ cur = 1;
  if (mmc_write_blocks(mmc, start, cur, src) != cur)
  return 0;
  blocks_todo -= cur;
-- 

Does any one faced same kind of issue? Can any one of you have an idea on
what could be the issue in this case or any further inputs on this will be
helpful.

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


[U-Boot] Fat filesystem format support in u-boot

2015-04-26 Thread S Durga Prasad Paladugu
Hi All,

I want to know whether we have FAT file system formatting support in u-boot?
I would like to format my SD card from u-boot.

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


[U-Boot] Fat filesystem format support in u-boot

2015-04-24 Thread S Durga Prasad Paladugu
Hi All,

I just want to know whether we have FAT file system formatting support in
u-boot?
I would like to format my SD card from u-boot.

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


[U-Boot] Questions on lthor usage

2014-08-26 Thread S Durga Prasad Paladugu
Hi,

I have a query on lthor usage.

How do i specify the altsetting while sending the lthor download from host.
In dfu we are specifying that with -a  altnum/altname. I have alt setting
to copy the linux images(uImage.devicetree and ramdisk) to DDR at
prescribed locations in my device side. Also if i am downloading these
files what option should i use at host side(this is not tar.gz and pitfile).

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


[U-Boot] thor integration with ci_udc

2014-08-13 Thread S Durga Prasad Paladugu
Hi,

Does anyone tested by integrating thor functionality with the ci_udc driver
instead of samsung s3c_udc_otg? I am trying to do the same on my zynq board
then the enumeration was successful but not able to download the file using
lthor.
Any other inputs on this would be fine.

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


Re: [U-Boot] thor integration with ci_udc

2014-08-13 Thread S Durga Prasad Paladugu
Hi Stephen,

Thanks for your reply. I used your patches after 2014.07 and able to test
the DFU successfully using ci_udc,but not thor it looks like that  it needs
some patches to work for thor.

Regards,
DP


On Wed, Aug 13, 2014 at 9:38 PM, Stephen Warren swar...@wwwdotorg.org
wrote:

 On 08/13/2014 04:58 AM, S Durga Prasad Paladugu wrote:

 Hi,

 Does anyone tested by integrating thor functionality with the ci_udc
 driver
 instead of samsung s3c_udc_otg? I am trying to do the same on my zynq
 board
 then the enumeration was successful but not able to download the file
 using
 lthor.
 Any other inputs on this would be fine.


 I haven't used the Thor protocol, but I have used both USB mass storage
 (UMS) and Device Firmware Upgrade (DFU) with success on an NVIDIA Tegra
 system. DFU at least required some patches that have been merged after
 v2014.07, but I think that was all to the DFU stack, not ci_udc itself.

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


Re: [U-Boot] dfu download issue with ci_udc

2014-07-24 Thread S Durga Prasad Paladugu
Hi,

I did the following modification in ci_udc driver  for handling the DFU
Dwonalod request with zpl and it worked for me and i am not sure whether it
would be the real fix for it(that 0x21 is DFU download request with zero
packet length), just sent for reference.

diff --git a/drivers/usb/gadget/ci_udc.c b/drivers/usb/gadget/ci_udc.c
index 4cd19c3..64a6662 100644
--- a/drivers/usb/gadget/ci_udc.c
+++ b/drivers/usb/gadget/ci_udc.c
@@ -581,7 +581,10 @@ static void handle_setup(void)
/* 0 length - no Data Stage. Flip dir for Status Stage */
DBG(%s: 0 length: flip ep0 dir for Status Stage\n,
__func__);
flip_ep0_direction();
-   controller.ep0_data_phase = false;
+   if (r.bRequestType == 0x21)
+   controller.ep0_data_phase = true;
+   else
+   controller.ep0_data_phase = false;
}

list_del_init(ci_req-queue);


Regards,
DP


On Thu, Jul 24, 2014 at 9:52 AM, S Durga Prasad Paladugu 
durgaprasad.p...@gmail.com wrote:

 Hi Wolfgang,

 I am using mainline 2014.1 git version but integrated that with the latest
 ci_udc driver changes and trying to test it on zynq board.I integrated the
 latest ci_udc as it has fixes related to the dfu. Previously with 2014.1
 its not working at all and timing out at host while trying to download so i
 integrated with latest driver then download was sucessfull at host side but
 at device side its not copying dfu buf to actual interface(its ram address
 in my case).This is because the zpl at the end of the dfu download not
 working as expected.

 Regards,
 DP


 On Thu, Jul 24, 2014 at 2:16 AM, Wolfgang Denk w...@denx.de wrote:

 Dear S Durga Prasad Paladugu,

 In message CAAhU36hRQ_AgOR6bodRz-8pcLb2hkVW-ztrKVX48yFkcEWS=
 h...@mail.gmail.com you wrote:
 
  I am trying to download the file from dfu-utilities(version 0.7) and
 using
  the ci_udc at device side. After all the data was sent from the host,
 the
 ...

 What is your exact U-Boot verosion (git commit ID), and which exact
 board are you testing on?

 Best regards,

 Wolfgang Denk

 --
 DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
 HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
 Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
 A day without sunshine is like night.



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


[U-Boot] dfu download issue with ci_udc

2014-07-23 Thread S Durga Prasad Paladugu
Hi,

I am trying to download the file from dfu-utilities(version 0.7) and using
the ci_udc at device side. After all the data was sent from the host, the
dfu utilities sent the zpl packet but at the device side the dfu_write is
not getting invoked for zero packet length and hence causing the data not
to be copied to actual interface(ram/mmc/nand). I pasted here the debug log
for the zpl for reference.


*handle setup CLEAR_FEATURE, 21, 1 index 0 value 3 length 0*
*handle_setup: Set ep0 to OUT for Data Stage*
*handle_setup: 0 length: flip ep0 dir for Status Stage*
*flip_ep0_direction: Flipping ep0 to IN*
*non-core control req21.01 v0003 i l0*
*w_value: 0x3 len: 0x0*
*req_type: 0x20 ctrl-bRequest: 0x1 f_dfu-dfu_state: 0x5*
*ept0 in pre-queue req 3f5284a8, buffer 3f528580*
*ept0 in queue len 0, req 3f5284a8, buffer 3f528580*
*ept0 in req 3f5284a8, complete 0*


 My question here is does any one has tested the dfu download using ci_udc
and what could be reason for this behavior?

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


Re: [U-Boot] dfu download issue with ci_udc

2014-07-23 Thread S Durga Prasad Paladugu
Hi Wolfgang,

I am using mainline 2014.1 git version but integrated that with the latest
ci_udc driver changes and trying to test it on zynq board.I integrated the
latest ci_udc as it has fixes related to the dfu. Previously with 2014.1
its not working at all and timing out at host while trying to download so i
integrated with latest driver then download was sucessfull at host side but
at device side its not copying dfu buf to actual interface(its ram address
in my case).This is because the zpl at the end of the dfu download not
working as expected.

Regards,
DP


On Thu, Jul 24, 2014 at 2:16 AM, Wolfgang Denk w...@denx.de wrote:

 Dear S Durga Prasad Paladugu,

 In message CAAhU36hRQ_AgOR6bodRz-8pcLb2hkVW-ztrKVX48yFkcEWS=
 h...@mail.gmail.com you wrote:
 
  I am trying to download the file from dfu-utilities(version 0.7) and
 using
  the ci_udc at device side. After all the data was sent from the host, the
 ...

 What is your exact U-Boot verosion (git commit ID), and which exact
 board are you testing on?

 Best regards,

 Wolfgang Denk

 --
 DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
 HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
 Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
 A day without sunshine is like night.

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


[U-Boot] u-boot elf generation for arm64

2014-06-30 Thread S Durga Prasad Paladugu
Hi,

I compiled the u-boot for arm64 and got two elf files(u-boot and
u-boot.elf). I just want to know what is the difference between these two
files?

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


[U-Boot] Query on u-boot

2014-03-23 Thread S Durga Prasad Paladugu
Hi,

I have a below query on u-boot bootup.

When UBOOT does not detect NOR flash during bootup it throws up an error
message that indicates that  uboot did not detect NOR flash and stops
there.
But when uboot does not detect QSPI flash it just gives a warning message
that uboot
sf_probe_failed, and comes to the uboot prompt.

Why is this behavior different for NOR flash and QSPI flash.


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


Re: [U-Boot] [PATCH] fpga: zynqpl: Fixed bug in alignment routine

2014-03-18 Thread S Durga Prasad Paladugu
Hi Eli,


On Sun, Mar 16, 2014 at 2:10 AM, Eli Billauer eli.billa...@gmail.comwrote:

 The aligned buffer is always with a higher address, so copying should run
 from the end of the buffer to the beginning, and not the other way around.

 Signed-off-by: Eli Billauer eli.billa...@gmail.com
 ---
  drivers/fpga/zynqpl.c |5 +++--
  1 files changed, 3 insertions(+), 2 deletions(-)

 diff --git a/drivers/fpga/zynqpl.c b/drivers/fpga/zynqpl.c
 index 160abc7..2888131 100644
 --- a/drivers/fpga/zynqpl.c
 +++ b/drivers/fpga/zynqpl.c
 @@ -173,7 +173,8 @@ int zynq_load(Xilinx_desc *desc, const void *buf,
 size_t bsize)
  {
 unsigned long ts; /* Timestamp */
 u32 partialbit = 0;
 -   u32 i, control, isr_status, status, swap, diff;
 +   u32 control, isr_status, status, swap, diff;
 +   int i;
 u32 *buf_start;

 /* Detect if we are going working with partial or full bitstream */
 @@ -206,7 +207,7 @@ int zynq_load(Xilinx_desc *desc, const void *buf,
 size_t bsize)
 printf(%s: Align buffer at %x to %x(swap %d)\n, __func__,
(u32)buf_start, (u32)new_buf, swap);

 -   for (i = 0; i  (bsize/4); i++)
 +   for (i = (bsize/4)-1; i = 0 ; i--)
 new_buf[i] = load_word(buf_start[i], swap);

This looks like not correct because if you look at the code above this, it
always ensuring that the new aligned buffer start is in front of the actual
buffer. That is for example if actual buff start is at 0x6C, then it
provides new buf aligned at 0x00 and copying word by word from 0x6C to 0x00.

 But here if you do copy word by word from the end, it will end up in
corrupting the actual data.(For example if our buff len is some 0x100 the
you are trying to copy from 0x16c to 0x100 which will corrupt the actual
data at 0x100).


Regards,

DP


 swap = SWAP_DONE;
 --
 1.7.2.3

 ___
 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