Lines Matching +full:ahci +full:- +full:port
1 // SPDX-License-Identifier: GPL-2.0-only
3 * AMD Seattle AHCI SATA driver
8 * based on the AHCI SATA platform driver by Jeff Garzik and Anton Vorontsov
20 #include "ahci.h"
28 * 28...8 RW OD6.2...OD0.0 (3bits per port, 1 bit per LED)
31 * 3:0 RO Number of ports (0 means no port supported)
41 #define DRV_NAME "ahci-seattle"
81 struct ahci_host_priv *hpriv = ap->host->private_data; in seattle_transmit_led_message()
82 struct ahci_port_priv *pp = ap->private_data; in seattle_transmit_led_message()
83 struct seattle_plat_data *plat_data = hpriv->plat_data; in seattle_transmit_led_message()
92 return -EINVAL; in seattle_transmit_led_message()
93 emp = &pp->em_priv[pmp]; in seattle_transmit_led_message()
95 val = ioread32(plat_data->sgpio_ctrl); in seattle_transmit_led_message()
97 val |= 1 << ACTIVITY_BIT_POS((ap->port_no)); in seattle_transmit_led_message()
99 val &= ~(1 << ACTIVITY_BIT_POS((ap->port_no))); in seattle_transmit_led_message()
102 val |= 1 << LOCATE_BIT_POS((ap->port_no)); in seattle_transmit_led_message()
104 val &= ~(1 << LOCATE_BIT_POS((ap->port_no))); in seattle_transmit_led_message()
107 val |= 1 << FAULT_BIT_POS((ap->port_no)); in seattle_transmit_led_message()
109 val &= ~(1 << FAULT_BIT_POS((ap->port_no))); in seattle_transmit_led_message()
111 iowrite32(val, plat_data->sgpio_ctrl); in seattle_transmit_led_message()
113 spin_lock_irqsave(ap->lock, flags); in seattle_transmit_led_message()
115 /* save off new led state for port/slot */ in seattle_transmit_led_message()
116 emp->led_state = state; in seattle_transmit_led_message()
118 spin_unlock_irqrestore(ap->lock, flags); in seattle_transmit_led_message()
126 struct device *dev = &pdev->dev; in ahci_seattle_get_port_info()
134 plat_data->sgpio_ctrl = devm_platform_ioremap_resource(pdev, 1); in ahci_seattle_get_port_info()
135 if (IS_ERR(plat_data->sgpio_ctrl)) in ahci_seattle_get_port_info()
138 val = ioread32(plat_data->sgpio_ctrl); in ahci_seattle_get_port_info()
143 hpriv->em_loc = 0; in ahci_seattle_get_port_info()
144 hpriv->em_buf_sz = 4; in ahci_seattle_get_port_info()
145 hpriv->em_msg_type = EM_MSG_TYPE_LED; in ahci_seattle_get_port_info()
146 hpriv->plat_data = plat_data; in ahci_seattle_get_port_info()
197 MODULE_DESCRIPTION("Seattle AHCI SATA platform driver");