From: Cao Minh Hiep <cm-hiep@jinso.co.jp>
To: linux-sh@vger.kernel.org
Subject: Re: Can't mount QSPI-FLASH to userland on Lager
Date: Mon, 23 Mar 2015 10:02:18 +0000 [thread overview]
Message-ID: <550FE4AA.2090200@jinso.co.jp> (raw)
In-Reply-To: <550F6E10.8010907@jinso.co.jp>
[-- Attachment #1: Type: text/plain, Size: 2834 bytes --]
Hi Geert-san, Rob Herring-san.
Thank you for pointing it out.
>> Hi Rob Herring-san.
>> I'm sorry to bother you!
>>
>> I'm Hiep from Jinzai Solution (a Japanese Company).
>> We are testing Linux kernel v4.0-rc2 on Lager and Koelsch Board ( Renesas's
>> boards).
>> When we tried to test QSPI-FLASH, we can't mount the device file of
>> QSPI-FLASH on Lager.
>> (Koelsch has no problems)
> This is strange: Koelsch and Lager are very similar w.r.t. SPI.
> Are you booting the same kernel image?
> Do the qspi device nodes in both r8a7790.dtsi and r8a7791.dtsi have dma
> properties?
> Is there any significant difference in the kernel logs of koelsch and lager?
(snip)
> Which kernel version are you using?
We tested both of boards on linux v4.0-rc2. And DMA is available on two
boards.
I attached the image building history and test logs files of Lager and
Koelsch.
File1: qspi_v4.0-rc2_test_logs_on_koelsch.txt
File2: qspi_v4.0-rc2_test_logs_on_lager.txt
>> The logs is showed as below:
>> #mount /dev/mtdblock2 /mnt/
>> "EXT3-fs (mtdblock2): error: can't find ext3 filesystem on dev mtdblock2.
>> EXT4-fs (mtdblock2): VFS: Can't find ext4 filesystem
>> EXT4-fs (mtdblock2): VFS: Can't find ext4 filesystem
>> FAT-fs (mtdblock2): bogus number of reserved sectors
>> FAT-fs (mtdblock2): Can't find a valid FAT filesystem
>> FAT-fs (mtdblock2): bogus number of reserved sectors
>> FAT-fs (mtdblock2): Can't find a valid FAT filesystem
>> mount: you must specify the filesystem type"
>>
>> We found that, after removing this patch(as below),
>> QSPI-FLASH can mount on Lager very well without any problems.
>> "9064bf3 spi: spi-pxa2xx: only include mach/dma.h for legacy DMA"
>> I'd like to report it to you and please review it when you have time.
> That commit looks like a fairly innocent change to me, but you never know
> when mach/*.h is involved...
>
> Which kernel config are you using? shmobile_defconfig?
> Do you have CONFIG_SPI_PXA2XX enabled in your .config?
> It seems CONFIG_SPI_PXA2XX can be enabled if !ARCH_PXA, while
> CONFIG_SPI_PXA2XX_DMA can't. And ARCH_PXA doesn't support
> multi-platform.
I'm sorry. This is my mistake. I was wrong about this patch.
Besides that, we found an other series of patches that added between
v3.19..v4.0-rc1 as below:
"fc9e0f7 spi: Only idle the message pump in the worker kthread
0461a41 spi: Pump transfers inside calling context for spi_sync()
983aee5 spi: Check to see if the device is processing a message before
we idle
5424d43 spi: Move queue data structure initialisation to main master init"
when we tried to revert fc9e0f7 and 0461a41 then re-build image for Lager,
This problem has disappeared on Lager.
I attached the image building history and test logs files.
File: qspi_v4.0-rc2_after_reverting_patches_test_logs_on_lager.txt
Best Regards,
Cao Minh Hiep.
[-- Attachment #2: qspi_v4.0-rc2_test_logs_on_lager.txt --]
[-- Type: text/plain, Size: 2454 bytes --]
Image Building History:
jinso02@jinso02:~/WORK/linux$ git log --oneline -3
13a7a6a Linux 4.0-rc2
9128b04 drm/i915: Fix modeset state confusion in the load detect code
023a600 Merge tag 'gpio-v4.0-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio
2233 make shmobile_defconfig
2234 make menuconfig (Enabled ext3 and ext4)
2235 make -j16 uImage LOADADDR=0x40008000
2236 make r8a7790-lager.dtb
2237 vim arch/arm/boot/dts/r8a7790-lager.dts
2238 make r8a7790-lager.dtb
2239 cat arch/arm/boot/zImage arch/arm/boot/dts/r8a7790-lager.dtb > zImage.dtb
2240 mkimage -A arm -O linux -C none -T kernel -a 0x40008000 -e 0x40008000 -n 'Linux-4.0.0-rc2' -d zImage.dtb uImage.dtb
2241 sudo cp uImage.dtb /var/lib/tftpboot/Lager/
Kernel:
renesas_spi e6b10000.spi: DMA available
m25p80 spi0.0: s25fl512s (65536 Kbytes)
3 ofpart partitions found on MTD device spi0.0
Creating 3 MTD partitions on "spi0.0":
0x000000000000-0x000000040000 : "loader"
0x000000040000-0x000000440000 : "user"
0x000000440000-0x000004000000 : "flash"
renesas_spi e6b10000.spi: probed
root@localhost:~# uname -a
Linux localhost.localdomain 4.0.0-rc2 #2 SMP Mon Mar 23 17:54:15 JST 2015 armv7l armv7l armv7l GNU/Lx
root@localhost:~#
root@localhost:~# mkfs.ext3 /dev/mtdblock2
mke2fs 1.42.5 (29-Jul-2012)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
Stride=0 blocks, Stripe width=0 blocks
15296 inodes, 61184 blocks
3059 blocks (5.00%) reserved for the super user
First data block=1
Maximum filesystem blocks=62652416
8 block groups
8192 blocks per group, 8192 fragments per group
1912 inodes per group
Superblock backups stored on blocks:
8193, 24577, 40961, 57345
Allocating group tables: done
Writing inode tables: done
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information: done
root@localhost:~#
root@localhost:~# mount /dev/mtdblock2 /mnt/
EXT3-fs (mtdblock2): error: can't find ext3 filesystem on dev mtdblock2.
EXT4-fs (mtdblock2): VFS: Can't find ext4 filesystem
EXT4-fs (mtdblock2): VFS: Can't find ext4 filesystem
FAT-fs (mtdblock2): bogus number of reserved sectors
FAT-fs (mtdblock2): Can't find a valid FAT filesystem
FAT-fs (mtdblock2): bogus number of reserved sectors
FAT-fs (mtdblock2): Can't find a valid FAT filesystem
mount: you must specify the filesystem type
root@localhost:~#
[-- Attachment #3: qspi_v4.0-rc2_test_logs_on_koelsch.txt --]
[-- Type: text/plain, Size: 2198 bytes --]
Koelsch: Image Building History:
jinso02@jinso02:~/WORK/linux$ git log --oneline -3
13a7a6a Linux 4.0-rc2
9128b04 drm/i915: Fix modeset state confusion in the load detect code
023a600 Merge tag 'gpio-v4.0-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio
2269 make shmobile_defconfig
2270 make menuconfig
2271 make -j16 uImage LOADADDR=0x40008000
2272 make r8a7791-koelsch.dtb
2273 vim arch/arm/boot/dts/r8a7791-koelsch.dts
2274 make r8a7791-koelsch.dtb
2275 cat arch/arm/boot/zImage arch/arm/boot/dts/r8a7791-koelsch.dtb > zImage.dtb
2276 mkimage -A arm -O linux -C none -T kernel -a 0x40008000 -e 0x40008000 -n 'Linux-4.0.0-rc2' -d zImage.dtb uImage.dtb
2277 sudo cp uImage.dtb /var/lib/tftpboot/Koelsch/
Kernel test logs:
renesas_spi e6b10000.spi: DMA available
m25p80 spi0.0: s25fl512s (65536 Kbytes)
3 ofpart partitions found on MTD device spi0.0
Creating 3 MTD partitions on "spi0.0":
0x000000000000-0x000000080000 : "loader"
0x000000080000-0x000000600000 : "user"
0x000000600000-0x000004000000 : "flash"
renesas_spi e6b10000.spi: probed
root@localhost:~#
root@localhost:~# uname -a
Linux localhost.localdomain 4.0.0-rc2 #1 SMP Mon Mar 23 18:31:01 JST 2015 armv7l armv7l armv7l GNU/Lx
root@localhost:~#
root@localhost:~# mkfs.ext3 /dev/mtdblock2
mke2fs 1.42.5 (29-Jul-2012)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
Stride=0 blocks, Stripe width=0 blocks
14848 inodes, 59392 blocks
2969 blocks (5.00%) reserved for the super user
First data block=1
Maximum filesystem blocks=60817408
8 block groups
8192 blocks per group, 8192 fragments per group
1856 inodes per group
Superblock backups stored on blocks:
8193, 24577, 40961, 57345
Allocating group tables: done
Writing inode tables: done
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information:
done
root@localhost:~#
root@localhost:~# mount /dev/mtdblock2 /mnt/
kjournald starting. Commit interval 5 seconds
EXT3-fs (mtdblock2): using internal journal
EXT3-fs (mtdblock2): mounted filesystem with ordered data mode
root@localhost:~#
[-- Attachment #4: qspi_v4.0-rc2_after_reverting_patches_test_logs_on_lager.txt --]
[-- Type: text/plain, Size: 2658 bytes --]
V4.0-rc2 after reverting patches image building history:
jinso02@jinso02:~/WORK/linux$ git revert fc9e0f7
[linux-v4.0-rc2 9452ebb] Revert "spi: Only idle the message pump in the worker kthread"
1 file changed, 6 insertions(+), 26 deletions(-)
jinso02@jinso02:~/WORK/linux$ git revert 0461a41
[linux-v4.0-rc2 3b5327b] Revert "spi: Pump transfers inside calling context for spi_sync()"
2 files changed, 8 insertions(+), 60 deletions(-)
jinso02@jinso02:~/WORK/linux$
jinso02@jinso02:~/WORK/linux$ git log --oneline -3
3b5327b Revert "spi: Pump transfers inside calling context for spi_sync()"
9452ebb Revert "spi: Only idle the message pump in the worker kthread"
13a7a6a Linux 4.0-rc2
jinso02@jinso02:~/WORK/linux$...
jinso02@jinso02:~/WORK/linux$history
2248 make distclean
2249 rm zImage.dtb uImage.dtb
2250 ls
2251 make shmobile_defconfig
2252 make menuconfig (Enabled ext3 and ext4)
2253 make -j16 uImage LOADADDR=0x40008000
2254 make r8a7790-lager.dtb
2255 cat arch/arm/boot/zImage arch/arm/boot/dts/r8a7790-lager.dtb > zImage.dtb
2256 mkimage -A arm -O linux -C none -T kernel -a 0x40008000 -e 0x40008000 -n 'Linux-4.0.0-rc2-00002-g3b5327b-d' -d zImage.dtb uImage.dtb
2257 sudo cp uImage.dtb /var/lib/tftpboot/Lager/
Kernel test logs:
renesas_spi e6b10000.spi: DMA available
m25p80 spi0.0: s25fl512s (65536 Kbytes)
3 ofpart partitions found on MTD device spi0.0
Creating 3 MTD partitions on "spi0.0":
0x000000000000-0x000000040000 : "loader"
0x000000040000-0x000000440000 : "user"
0x000000440000-0x000004000000 : "flash"
renesas_spi e6b10000.spi: probed
root@localhost:~# uname -a
Linux localhost.localdomain 4.0.0-rc2-00002-g3b5327b-dirty #1 SMP Mon Mar 23 18:12:15 JST 2015 armv7x
root@localhost:~#
root@localhost:~# mkfs.ext3 /dev/mtdblock2
mke2fs 1.42.5 (29-Jul-2012)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
Stride=0 blocks, Stripe width=0 blocks
15296 inodes, 61184 blocks
3059 blocks (5.00%) reserved for the super user
First data block=1
Maximum filesystem blocks=62652416
8 block groups
8192 blocks per group, 8192 fragments per group
1912 inodes per group
Superblock backups stored on blocks:
8193, 24577, 40961, 57345
Allocating group tables: done
Writing inode tables: done
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information: done
root@localhost:~# mount /dev/mtdblock2 /mnt/
kjournald starting. Commit interval 5 seconds
EXT3-fs (mtdblock2): using internal journal
EXT3-fs (mtdblock2): mounted filesystem with ordered data mode
root@localhost:~#
next prev parent reply other threads:[~2015-03-23 10:02 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-23 1:36 Can't mount QSPI-FLASH to userland on Lager Cao Minh Hiep
2015-03-23 1:59 ` Geert Uytterhoeven
2015-03-23 10:02 ` Cao Minh Hiep [this message]
2015-03-23 16:27 ` Mark Brown
2015-03-24 15:42 ` Geert Uytterhoeven
2015-03-24 16:24 ` Mark Brown
2015-03-24 16:27 ` Mark Brown
2015-03-25 0:55 ` Cao Minh Hiep
2015-03-25 1:14 ` Cao Minh Hiep
2015-03-25 4:42 ` Mark Brown
2015-03-25 4:54 ` Geert Uytterhoeven
2015-03-25 5:02 ` Mark Brown
2015-03-25 16:32 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=550FE4AA.2090200@jinso.co.jp \
--to=cm-hiep@jinso.co.jp \
--cc=linux-sh@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox