diff options
Diffstat (limited to 'board/scalys/grapeboard/grapeboard.c')
-rw-r--r-- | board/scalys/grapeboard/grapeboard.c | 48 |
1 files changed, 10 insertions, 38 deletions
diff --git a/board/scalys/grapeboard/grapeboard.c b/board/scalys/grapeboard/grapeboard.c index eade1bd..a0c0a9e 100644 --- a/board/scalys/grapeboard/grapeboard.c +++ b/board/scalys/grapeboard/grapeboard.c @@ -42,6 +42,7 @@ int checkboard(void) int ret; #endif int m2_config = 0; + int serdes_cfg = get_serdes_protocol(); puts("Board: Grape board\n"); @@ -63,28 +64,26 @@ int checkboard(void) /* Configure USB hub */ usb_hx3_hub_init(); - /* Scanning for M.2 module */ + /* Check for an M.2 module */ clrbits_be32(&pgpio->gpdir, (M2_CFG0 | M2_CFG1 | M2_CFG2 | M2_CFG3)); m2_config = (in_be32(&pgpio->gpdat) & (M2_CFG0 | M2_CFG1 | M2_CFG2 | M2_CFG3)); switch(m2_config >> 17) { case 0: - printf("M.2: SATA SSD module found on M.2 port\n"); -#if defined(CONFIG_SERDES_D_TO_PCIE) && defined(CONFIG_PBL_IMAGE) - printf("Warning: SERDES has not been configured in RCW for SATA!\n"); -#endif + printf("M.2: SATA SSD module found\n"); + if (serdes_cfg & 0x5) + printf("Warning: SERDES has not been configured in RCW for SATA!\n"); break; case 1: - printf("M.2: PCIe SSD module found on M.2 port\n"); -#if defined(CONFIG_SERDES_D_TO_SATA) && defined(CONFIG_PBL_IMAGE) - printf("Warning: SERDES has not been configured in RCW for PCIe!\n"); -#endif + printf("M.2: PCIe SSD module found\n"); + if (serdes_cfg & 0x8) + printf("Warning: SERDES has not been configured in RCW for PCIe!\n"); break; case 0xf: - printf("M.2: No module detected on M.2 port\n"); + printf("M.2: No module detected\n"); break; default: - printf("M.2: A module has been detected on M.2 port(TODO: add module type)\n"); + printf("M.2: A module has been detected (TODO: add module type and support)\n"); break; } @@ -93,8 +92,6 @@ int checkboard(void) int misc_init_r(void) { - - return 0; } @@ -162,31 +159,6 @@ int board_init(void) return 0; } -int esdhc_status_fixup(void *blob, const char *compat) -{ - /*char esdhc0_path[] = "/soc/esdhc@1560000";*/ - - return 0; -} - -void scsi_init(void) -{ -#if defined(CONFIG_SCSI_AHCI_PLAT) && defined(CONFIG_SERDES_D_TO_SATA) - struct ccsr_ahci __iomem *ccsr_ahci = (void *)CONFIG_SYS_SATA; - - /* Disable SATA ECC */ - out_le32((void *)CONFIG_SYS_DCSR_DCFG_ADDR + 0x520, 0x80000000); - out_le32(&ccsr_ahci->ppcfg, AHCI_PORT_PHY_1_CFG); - out_le32(&ccsr_ahci->ptc, AHCI_PORT_TRANS_CFG); - out_le32(&ccsr_ahci->axicc, AHCI_PORT_AXICC_CFG); - - ahci_init((void __iomem *)CONFIG_SYS_SATA); - scsi_scan(0); -#else - printf("Disabled\n"); -#endif -} - int ft_board_setup(void *blob, bd_t *bd) { arch_fixup_fdt(blob); |