]> git.sur5r.net Git - u-boot/blob - drivers/ata/ahci_mvebu.c
ata: ahci_mvebu: a8040 a0: remove bad port register offsets workarounds
[u-boot] / drivers / ata / ahci_mvebu.c
1 // SPDX-License-Identifier: GPL-2.0+
2 /*
3  * Copyright (C) 2016 Stefan Roese <sr@denx.de>
4  */
5
6 #include <common.h>
7 #include <ahci.h>
8 #include <dm.h>
9
10 /*
11  * Dummy implementation that can be overwritten by a board
12  * specific function
13  */
14 __weak int board_ahci_enable(void)
15 {
16         return 0;
17 }
18
19 static int mvebu_ahci_probe(struct udevice *dev)
20 {
21         /*
22          * Board specific SATA / AHCI enable code, e.g. enable the
23          * AHCI power or deassert reset
24          */
25         board_ahci_enable();
26
27         ahci_init(devfdt_get_addr_ptr(dev));
28
29         return 0;
30 }
31
32 static const struct udevice_id mvebu_ahci_ids[] = {
33         { .compatible = "marvell,armada-3700-ahci" },
34         { .compatible = "marvell,armada-8k-ahci" },
35         { }
36 };
37
38 U_BOOT_DRIVER(ahci_mvebu_drv) = {
39         .name           = "ahci_mvebu",
40         .id             = UCLASS_AHCI,
41         .of_match       = mvebu_ahci_ids,
42         .probe          = mvebu_ahci_probe,
43 };