mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-17 10:18:38 +00:00
83d290c56f
When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com>
41 lines
1.1 KiB
C
41 lines
1.1 KiB
C
// SPDX-License-Identifier: GPL-2.0+
|
|
/*
|
|
* Copyright 2015 Freescale Semiconductor, Inc.
|
|
*/
|
|
#include <common.h>
|
|
#include <asm/io.h>
|
|
#include <asm/arch/immap_ls102xa.h>
|
|
#include <ahci.h>
|
|
#include <scsi.h>
|
|
|
|
/* port register default value */
|
|
#define AHCI_PORT_PHY_1_CFG 0xa003fffe
|
|
#define AHCI_PORT_PHY_2_CFG 0x28183414
|
|
#define AHCI_PORT_PHY_3_CFG 0x0e080e06
|
|
#define AHCI_PORT_PHY_4_CFG 0x064a080b
|
|
#define AHCI_PORT_PHY_5_CFG 0x2aa86470
|
|
#define AHCI_PORT_TRANS_CFG 0x08000029
|
|
|
|
#define SATA_ECC_REG_ADDR 0x20220520
|
|
#define SATA_ECC_DISABLE 0x00020000
|
|
|
|
int ls1021a_sata_init(void)
|
|
{
|
|
struct ccsr_ahci __iomem *ccsr_ahci = (void *)AHCI_BASE_ADDR;
|
|
|
|
#ifdef CONFIG_SYS_FSL_ERRATUM_A008407
|
|
out_le32((void *)SATA_ECC_REG_ADDR, SATA_ECC_DISABLE);
|
|
#endif
|
|
|
|
out_le32(&ccsr_ahci->ppcfg, AHCI_PORT_PHY_1_CFG);
|
|
out_le32(&ccsr_ahci->pp2c, AHCI_PORT_PHY_2_CFG);
|
|
out_le32(&ccsr_ahci->pp3c, AHCI_PORT_PHY_3_CFG);
|
|
out_le32(&ccsr_ahci->pp4c, AHCI_PORT_PHY_4_CFG);
|
|
out_le32(&ccsr_ahci->pp5c, AHCI_PORT_PHY_5_CFG);
|
|
out_le32(&ccsr_ahci->ptc, AHCI_PORT_TRANS_CFG);
|
|
|
|
ahci_init((void __iomem *)AHCI_BASE_ADDR);
|
|
scsi_scan(false);
|
|
|
|
return 0;
|
|
}
|