All of lore.kernel.org
 help / color / mirror / Atom feed
* Enable SIL Image 3124/3132 PCI/SATA converter on IMX6SX for UBOOT
@ 2020-01-09 16:36 Brenke, Maik
  0 siblings, 0 replies; only message in thread
From: Brenke, Maik @ 2020-01-09 16:36 UTC (permalink / raw)
  To: u-boot


Dear ladys and gentleman,


according the setup in [setup] I want to enable the SIL Image 3124/3132 PCI/SATA converter in UBOOT (u-boot-2018.03) on an IMX6SX CPU.

I tested the implementation and the setup via the Linux Kernel (see Kernel config in [kernel config] in Linux (see lspci [kernel]). After I enabled PCI in UBOOT I got the working result according [UBOOT].

But the SATA implementation (see complete config [defconfig]) failed during compilation of UBOOT with "arch/arm/mach-imx/mx6/clock.c:1015:32: error: 'MXC_CCM_CCGR5_SATA_MASK' undeclared (first use in this function); did you mean 'MXC_CCM_CCGR5_SAI1_MASK'?".


Is it possible to only read from an attached SSD on the SIL Image 31xx PCI/SATA converter via PCI in UBOOT?



P.s.: There are different warnings and notes during compilation (see [warnings]).


[setup]:
| imx6sx (UBOOT) | <---PCI---> | Silicon Image 3124/3132 SATA | <--- SATA ---> | SSD |


[kernel config]:
# enable pci in kernel                  (PCI support)
#  enable express support               (PCI Express Port Bus support)
#  PCI host controller drivers          (Freescale i.MX6 PCIe controller)
# enable sata driver in kernel          (Serial ATA and Parallel ATA drivers)
# enable PCI-SATA interface in kernel:
AHCI SATA support
Platform AHCI SATA support
…
Silicon Image 3124/3132 SATA support
# enable pci in device-tree             (#define CONFIG_EFUSA9X_PCIE)


[kernel]:
$ lspci
00:00.0 Class 0604: 16c3:abcd
01:00.0 Class 0106: 1b21:0612


[UBOOT]:
PCI:
  00:01.0     - 16c3:abcd - Bridge device
   01:00.0    - 1b21:0612 - Mass storage controller

efusA9X # pci
Scanning PCI devices on bus 0
BusDevFun  VendorId   DeviceId   Device Class       Sub-Class
_____________________________________________________________
00.01.00   0x16c3     0xabcd     Build before PCI Rev2.0 0x00


[defconfig]:
$ diff -us configs/fsimx6sx_efus_defconfig .config | grep ^+
+++ .config 2020-01-09 16:30:41.073863186 +0100
+CONFIG_AHCI=y
+CONFIG_CMD_PCI=y
+CONFIG_CMD_SATA=y
+CONFIG_SATA=y
+CONFIG_LIBATA=y
+CONFIG_AHCI_PCI=y
+# CONFIG_SATA_CEVA is not set
+# CONFIG_DWC_AHCI is not set
+CONFIG_SATA_SIL=y
+CONFIG_BLK=y
+# CONFIG_NVME is not set
+CONFIG_PCI=y
+# CONFIG_DM_PCI is not set
+# CONFIG_PCI_PNP is not set
+CONFIG_DM_SCSI=y



[warnings]:
$ make clean all
…
include/generated/autoconf.h:99: note: this is the location of the previous definition
 #define CONFIG_PCI 1

  CC      arch/arm/mach-imx/i2c-mxv7.o
In file included from include/config.h:6,
                 from include/common.h:21,
                 from arch/arm/mach-imx/i2c-mxv7.c:6:
include/configs/fsimx6sx.h:296: warning: "CONFIG_PCI" redefined
 #define CONFIG_PCI

…

In file included from ././include/linux/kconfig.h:4,
                 from <command-line>:
include/generated/autoconf.h:99: note: this is the location of the previous definition
 #define CONFIG_PCI 1

In file included from arch/arm/mach-imx/mx6/clock.c:9:
arch/arm/mach-imx/mx6/clock.c: In function 'ungate_sata_clock':
arch/arm/mach-imx/mx6/clock.c:1001:32: error: 'MXC_CCM_CCGR5_SATA_MASK' undeclared (first use in this function); did you mean 'MXC_CCM_CCGR5_SAI1_MASK'?
  setbits_le32(&imx_ccm->CCGR5, MXC_CCM_CCGR5_SATA_MASK);
                                ^~~~~~~~~~~~~~~~~~~~~~~
./arch/arm/include/asm/io.h:49:61: note: in definition of macro '__arch_putl'
 #define __arch_putl(v,a)  (*(volatile unsigned int *)(a) = (v))
                                                             ^
./arch/arm/include/asm/io.h:146:35: note: in expansion of macro '__raw_writel'
 #define out_arch(type,endian,a,v) __raw_write##type(cpu_to_##endian(v),a)
                                   ^~~~~~~~~~~
include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__cpu_to_le32'
 #define cpu_to_le32 __cpu_to_le32
                     ^~~~~~~~~~~~~
./arch/arm/include/asm/io.h:150:23: note: in expansion of macro 'out_arch'
 #define out_le32(a,v) out_arch(l,le32,a,v)
                       ^~~~~~~~
./arch/arm/include/asm/io.h:170:2: note: in expansion of macro 'out_le32'
  out_##type((addr), in_##type(addr) | (set))
  ^~~~
./arch/arm/include/asm/io.h:180:33: note: in expansion of macro 'setbits'
 #define setbits_le32(addr, set) setbits(le32, addr, set)
                                 ^~~~~~~
arch/arm/mach-imx/mx6/clock.c:1001:2: note: in expansion of macro 'setbits_le32'
  setbits_le32(&imx_ccm->CCGR5, MXC_CCM_CCGR5_SATA_MASK);
  ^~~~~~~~~~~~
arch/arm/mach-imx/mx6/clock.c:1001:32: note: each undeclared identifier is reported only once for each function it appears in
  setbits_le32(&imx_ccm->CCGR5, MXC_CCM_CCGR5_SATA_MASK);
                                ^~~~~~~~~~~~~~~~~~~~~~~
./arch/arm/include/asm/io.h:49:61: note: in definition of macro '__arch_putl'
 #define __arch_putl(v,a)  (*(volatile unsigned int *)(a) = (v))
                                                             ^
./arch/arm/include/asm/io.h:146:35: note: in expansion of macro '__raw_writel'
 #define out_arch(type,endian,a,v) __raw_write##type(cpu_to_##endian(v),a)
                                   ^~~~~~~~~~~
include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__cpu_to_le32'
 #define cpu_to_le32 __cpu_to_le32
                     ^~~~~~~~~~~~~
./arch/arm/include/asm/io.h:150:23: note: in expansion of macro 'out_arch'
 #define out_le32(a,v) out_arch(l,le32,a,v)
                       ^~~~~~~~
./arch/arm/include/asm/io.h:170:2: note: in expansion of macro 'out_le32'
  out_##type((addr), in_##type(addr) | (set))
  ^~~~
./arch/arm/include/asm/io.h:180:33: note: in expansion of macro 'setbits'
 #define setbits_le32(addr, set) setbits(le32, addr, set)
                                 ^~~~~~~
arch/arm/mach-imx/mx6/clock.c:1001:2: note: in expansion of macro 'setbits_le32'
  setbits_le32(&imx_ccm->CCGR5, MXC_CCM_CCGR5_SATA_MASK);
  ^~~~~~~~~~~~
arch/arm/mach-imx/mx6/clock.c: In function 'disable_sata_clock':
arch/arm/mach-imx/mx6/clock.c:1015:32: error: 'MXC_CCM_CCGR5_SATA_MASK' undeclared (first use in this function); did you mean 'MXC_CCM_CCGR5_SAI1_MASK'?
  clrbits_le32(&imx_ccm->CCGR5, MXC_CCM_CCGR5_SATA_MASK);
                                ^~~~~~~~~~~~~~~~~~~~~~~
./arch/arm/include/asm/io.h:49:61: note: in definition of macro '__arch_putl'
 #define __arch_putl(v,a)  (*(volatile unsigned int *)(a) = (v))
                                                             ^
./arch/arm/include/asm/io.h:146:35: note: in expansion of macro '__raw_writel'
 #define out_arch(type,endian,a,v) __raw_write##type(cpu_to_##endian(v),a)
                                   ^~~~~~~~~~~
include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__cpu_to_le32'
 #define cpu_to_le32 __cpu_to_le32
                     ^~~~~~~~~~~~~
./arch/arm/include/asm/io.h:150:23: note: in expansion of macro 'out_arch'
 #define out_le32(a,v) out_arch(l,le32,a,v)
                       ^~~~~~~~
./arch/arm/include/asm/io.h:167:2: note: in expansion of macro 'out_le32'
  out_##type((addr), in_##type(addr) & ~(clear))
  ^~~~
./arch/arm/include/asm/io.h:179:35: note: in expansion of macro 'clrbits'
 #define clrbits_le32(addr, clear) clrbits(le32, addr, clear)
                                   ^~~~~~~
arch/arm/mach-imx/mx6/clock.c:1015:2: note: in expansion of macro 'clrbits_le32'
  clrbits_le32(&imx_ccm->CCGR5, MXC_CCM_CCGR5_SATA_MASK);
  ^~~~~~~~~~~~
make[2]: *** [arch/arm/mach-imx/mx6/clock.o] Fehler 1
scripts/Makefile.build:280: die Regel für Ziel „arch/arm/mach-imx/mx6/clock.o“ scheiterte
scripts/Makefile.build:425: die Regel für Ziel „arch/arm/mach-imx/mx6“ scheiterte
make[1]: *** [arch/arm/mach-imx/mx6] Fehler 2
Makefile:1343: die Regel für Ziel „arch/arm/mach-imx“ scheiterte
make: *** [arch/arm/mach-imx] Fehler 2


Mit freundlichen Grüßen / Best regards

Maik Brenke
Embedded Linux Developer

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-01-09 16:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-09 16:36 Enable SIL Image 3124/3132 PCI/SATA converter on IMX6SX for UBOOT Brenke, Maik

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.