Hi All,
I was trying use sata interface in ls1021atwr board for sdk 1.7, but it is showing sata command not found. Could someone help me how to enable/add the sata command in u-boot ?
Is there any macros should be added or any patch to be applied ?
Here is the u-boot log,
U-Boot 2014.07+ls1+g659b6a2 (Jun 09 2015 - 05:54:30)
CPU: Freescale LayerScape LS1021E, Version: 1.0, (0x87081110)
Clock Configuration:
CPU0(ARMV7):1000 MHz,
Bus:300 MHz, DDR:800 MHz (1600 MT/s data rate),
Reset Configuration Word (RCW):
00000000: 0608000a 00000000 00000000 00000000
00000010: 70000000 00007900 e0025a00 21046000
00000020: 00000000 00000000 00000000 00038000
00000030: 00080000 48007340 00000000 00000000
Board: LS1021ATWR
CPLD: V2.3
PCBA: V4.0
VBank: 0
I2C: ready
DRAM: 1 GiB
Using SERDES1 Protocol: 112 (0x70)
Firmware 'Microcode version 0.0.0 for T1040 r1.0' for 1040 V1.0
QE: uploading microcode 'Microcode for T1040 r1.0'
Flash: 128 MiB
MMC: FSL_SDHC: 0
EEPROM: CRC mismatch (d28e9fc5 != ffffffff)
PCIe1: Root Complex x1 gen1, regs @ 0x3400000
01:00.0 - 14e4:43a0 - Network controller
PCIe1: Bus 00 - 01
PCIe2: Root Complex no link, regs @ 0x3500000
In: serial
Out: serial
Err: serial
SATA link 0 timeout.
AHCI 0001.0300 1 slots 1 ports ? Gbps 0x1 impl SATA mode
flags: 64bit ncq pm clo only pmp fbss pio slum part ccc
scanning bus for devices...
Found 0 device(s).
Net: eTSEC2 is in sgmii mode.
eTSEC1 [PRIME], eTSEC2, eTSEC3
Hit any key to stop autoboot: 0
=>
=> sata init
Unknown command 'sata' - try 'help'
Please help me to resolve this issue..
Thank you in advance :smileyhappy:
已解决! 转到解答。
Need to rebuild Linux kernel with:
1. In Kernel menuconfig Device drivers->Serial ATA and Parallel ATA
[*] SATA Port Multiplier support
<*> AHCI SATA support
<*> Freescale 3.0Gbps SATA support
2. In Kernel menuconfig Device drivers->SCSI device support-> <*> SCSI disk support
3. In Kernel menuconfig File systems->
<*> Second extended fs support
<*> Ext3 journalling file system support
Partition Types ->
[*] Advanced partition selection
[*] PC BIOS (MSDOS partition tables) support
Native Language Support ->
(iso8859-1) Default NLS Option
<*> Codepage 437 (United States, Canada)
<*> NLS ISO 8859-1 (Latin 1; Western European Languages)
Hello Vignesh R,
Please check whether the following information could help you.
U-Boot 2014.07+ls1+g659b6a2 (Mar 10 2015 - 10:30:21)
CPU: Freescale LayerScape LS1021E, Version: 1.0, (0x87081110)
Clock Configuration:
CPU0(ARMV7):1000 MHz,
Bus:300 MHz, DDR:800 MHz (1600 MT/s data rate),
Reset Configuration Word (RCW):
00000000: 0608000a 00000000 00000000 00000000
00000010: 70000000 00007900 e0025a00 21046000
00000020: 00000000 00000000 00000000 00038000
00000030: 00080000 48007340 00000000 00000000
Board: LS1021ATWR
CPLD: V2.3
PCBA: V4.0
VBank: 0
I2C: ready
DRAM: 1 GiB
Using SERDES1 Protocol: 112 (0x70)
Firmware 'Microcode version 0.0.0 for T1040 r1.0' for 1040 V1.0
QE: uploading microcode 'Microcode for T1040 r1.0'
Flash: 128 MiB
MMC: FSL_SDHC: 0
EEPROM: NXID v1
PCIe1: Root Complex no link, regs @ 0x3400000
PCIe2: Root Complex no link, regs @ 0x3500000
In: serial
Out: serial
Err: serial
Target spinup took 0 ms.
AHCI 0001.0300 1 slots 1 ports ? Gbps 0x1 impl SATA mode
flags: 64bit ncq pm clo only pmp fbss pio slum part ccc
scanning bus for devices...
Device 0: (0:0) Vendor: ATA Prod.: ST3160815AS Rev: 4.AD
Type: Hard Disk
Capacity: 152587.8 MB = 149.0 GB (312500000 x 512)
Type: Hard Disk
Capacity: 152587.8 MB = 149.0 GB (312500000 x 512)
Found 1 device(s).
Net: eTSEC2 is in sgmii mode.
eTSEC1, eTSEC2 [PRIME], eTSEC3
=>
=> scsi info
SCSI dev. 0: (0:0) Vendor: ATA Prod.: ST3160815AS Rev: 4.AD
Type: Hard Disk
Capacity: 152587.8 MB = 149.0 GB (312500000 x 512)
=> scsi rescan
Reset SCSI
scanning bus for devices...
Device 0: (0:0) Vendor: ATA Prod.: ST3160815AS Rev: 4.AD
Type: Hard Disk
Capacity: 152587.8 MB = 149.0 GB (312500000 x 512)
Found 1 device(s).
=> scsi
scsi - SCSI sub-system
Usage:
scsi reset - reset SCSI controller
scsi info - show available SCSI devices
scsi scan - (re-)scan SCSI bus
scsi device [dev] - show or set current device
scsi part [dev] - print partition table of one or all SCSI devices
scsi device [dev] - show or set current device
scsi part [dev] - print partition table of one or all SCSI devices
scsi read addr blk# cnt - read `cnt' blocks starting at block `blk#'
to memory address `addr'
scsi write addr blk# cnt - write `cnt' blocks starting at block
`blk#' from memory address `addr'
=> scsi device 0
SCSI device 0:
Device 0: (0:0) Vendor: ATA Prod.: ST3160815AS Rev: 4.AD
Type: Hard Disk
Capacity: 152587.8 MB = 149.0 GB (312500000 x 512)
... is now current device
=> scsi device 0:1
SCSI device 0:
Device 0: (0:0) Vendor: ATA Prod.: ST3160815AS Rev: 4.AD
Type: Hard Disk
Capacity: 152587.8 MB = 149.0 GB (312500000 x 512)
... is now current device
=> scsi part 1
## Unknown partition table
=> scsi part 0
Partition Map for SCSI device 0 -- Partition Type: DOS
Part Start Sector Num Sectors UUID Type
1 2048 312497952 a288bb3e-01 83
=> scsi read 81000000 32 10
SCSI read: device 0 block # 50, count 16 ... timeout exit!
16 blocks read: OK
Have a great day,
Yiping
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Need to rebuild Linux kernel with:
1. In Kernel menuconfig Device drivers->Serial ATA and Parallel ATA
[*] SATA Port Multiplier support
<*> AHCI SATA support
<*> Freescale 3.0Gbps SATA support
2. In Kernel menuconfig Device drivers->SCSI device support-> <*> SCSI disk support
3. In Kernel menuconfig File systems->
<*> Second extended fs support
<*> Ext3 journalling file system support
Partition Types ->
[*] Advanced partition selection
[*] PC BIOS (MSDOS partition tables) support
Native Language Support ->
(iso8859-1) Default NLS Option
<*> Codepage 437 (United States, Canada)
<*> NLS ISO 8859-1 (Latin 1; Western European Languages)
Hi Art,
Thanks, now I'm able to detect hard disk in kernel. Now can you help me how to add SATA command in the u-boot. I have added SATA command in u-boot by adding some macros in ls1021atwr.h and config_cmd_all.h file from the u-boot source file. But I can able to use only sata command. Not able to use sata init , read, write etc. What could be the reason and solution for this issue.?
Hi Art,
Thanks,
With scsi scan i was able to detect the hard disk in u-boot, but in kernel i was not able to access the disk. what should be done to detect the device in kernel ?
and also please let me know how to add sata command in u-boot ..