[pci] Update drivers to use pci_ioremap()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2020-09-24 21:45:03 +01:00
parent 371af4eef2
commit eecb75ba48
47 changed files with 85 additions and 71 deletions
+9 -6
View File
@@ -2059,7 +2059,8 @@ static int arbel_start_firmware ( struct arbel *arbel ) {
eq_set_ci_base_addr =
( ( (uint64_t) MLX_GET ( &fw, eq_set_ci_base_addr_h ) << 32 ) |
( (uint64_t) MLX_GET ( &fw, eq_set_ci_base_addr_l ) ) );
arbel->eq_ci_doorbells = ioremap ( eq_set_ci_base_addr, 0x200 );
arbel->eq_ci_doorbells = pci_ioremap ( arbel->pci, eq_set_ci_base_addr,
0x200 );
/* Enable locally-attached memory. Ignore failure; there may
* be no attached memory.
@@ -3025,6 +3026,8 @@ static void arbel_free ( struct arbel *arbel ) {
static int arbel_probe ( struct pci_device *pci ) {
struct arbel *arbel;
struct ib_device *ibdev;
unsigned long config;
unsigned long uar;
int i;
int rc;
@@ -3041,11 +3044,11 @@ static int arbel_probe ( struct pci_device *pci ) {
adjust_pci_device ( pci );
/* Map PCI BARs */
arbel->config = ioremap ( pci_bar_start ( pci, ARBEL_PCI_CONFIG_BAR ),
ARBEL_PCI_CONFIG_BAR_SIZE );
arbel->uar = ioremap ( ( pci_bar_start ( pci, ARBEL_PCI_UAR_BAR ) +
ARBEL_PCI_UAR_IDX * ARBEL_PCI_UAR_SIZE ),
ARBEL_PCI_UAR_SIZE );
config = pci_bar_start ( pci, ARBEL_PCI_CONFIG_BAR );
arbel->config = pci_ioremap ( pci, config, ARBEL_PCI_CONFIG_BAR_SIZE );
uar = ( pci_bar_start ( pci, ARBEL_PCI_UAR_BAR ) +
ARBEL_PCI_UAR_IDX * ARBEL_PCI_UAR_SIZE );
arbel->uar = pci_ioremap ( pci, uar, ARBEL_PCI_UAR_SIZE );
/* Allocate Infiniband devices */
for ( i = 0 ; i < ARBEL_NUM_PORTS ; i++ ) {
+1 -1
View File
@@ -1461,7 +1461,7 @@ static int flexboot_nodnic_alloc_uar ( struct flexboot_nodnic *flexboot_nodnic )
return -EINVAL;
}
uar->phys = ( pci_bar_start ( pci, FLEXBOOT_NODNIC_HCA_BAR ) + (mlx_uint32)uar->offset );
uar->virt = ( void * )( ioremap ( uar->phys, FLEXBOOT_NODNIC_PAGE_SIZE ) );
uar->virt = ( void * )( pci_ioremap ( pci, uar->phys, FLEXBOOT_NODNIC_PAGE_SIZE ) );
return status;
}
+3 -3
View File
@@ -693,7 +693,7 @@ static inline int golan_alloc_uar(struct golan *golan)
uar->index = be32_to_cpu(out->uarn) & 0xffffff;
uar->phys = (pci_bar_start(golan->pci, GOLAN_HCA_BAR) + (uar->index << GOLAN_PAGE_SHIFT));
uar->virt = (void *)(ioremap(uar->phys, GOLAN_PAGE_SIZE));
uar->virt = (void *)(pci_ioremap(golan->pci, uar->phys, GOLAN_PAGE_SIZE));
DBGC( golan , "%s: UAR allocated with index 0x%x\n", __FUNCTION__, uar->index);
return 0;
@@ -922,8 +922,8 @@ static inline void golan_pci_init(struct golan *golan)
adjust_pci_device ( pci );
/* Get HCA BAR */
golan->iseg = ioremap ( pci_bar_start ( pci, GOLAN_HCA_BAR),
GOLAN_PCI_CONFIG_BAR_SIZE );
golan->iseg = pci_ioremap ( pci, pci_bar_start ( pci, GOLAN_HCA_BAR),
GOLAN_PCI_CONFIG_BAR_SIZE );
}
static inline struct golan *golan_alloc()
+12 -6
View File
@@ -3782,6 +3782,8 @@ static int hermon_probe ( struct pci_device *pci ) {
struct ib_device *ibdev;
struct net_device *netdev;
struct hermon_port *port;
unsigned long config;
unsigned long uar;
unsigned int i;
int rc;
@@ -3798,10 +3800,12 @@ static int hermon_probe ( struct pci_device *pci ) {
adjust_pci_device ( pci );
/* Map PCI BARs */
hermon->config = ioremap ( pci_bar_start ( pci, HERMON_PCI_CONFIG_BAR ),
HERMON_PCI_CONFIG_BAR_SIZE );
hermon->uar = ioremap ( pci_bar_start ( pci, HERMON_PCI_UAR_BAR ),
HERMON_UAR_NON_EQ_PAGE * HERMON_PAGE_SIZE );
config = pci_bar_start ( pci, HERMON_PCI_CONFIG_BAR );
hermon->config = pci_ioremap ( pci, config,
HERMON_PCI_CONFIG_BAR_SIZE );
uar = pci_bar_start ( pci, HERMON_PCI_UAR_BAR );
hermon->uar = pci_ioremap ( pci, uar,
HERMON_UAR_NON_EQ_PAGE * HERMON_PAGE_SIZE );
/* Reset device */
hermon_reset ( hermon );
@@ -3937,6 +3941,7 @@ static void hermon_remove ( struct pci_device *pci ) {
*/
static int hermon_bofm_probe ( struct pci_device *pci ) {
struct hermon *hermon;
unsigned long config;
int rc;
/* Allocate Hermon device */
@@ -3952,8 +3957,9 @@ static int hermon_bofm_probe ( struct pci_device *pci ) {
adjust_pci_device ( pci );
/* Map PCI BAR */
hermon->config = ioremap ( pci_bar_start ( pci, HERMON_PCI_CONFIG_BAR ),
HERMON_PCI_CONFIG_BAR_SIZE );
config = pci_bar_start ( pci, HERMON_PCI_CONFIG_BAR );
hermon->config = pci_ioremap ( pci, config,
HERMON_PCI_CONFIG_BAR_SIZE );
/* Initialise BOFM device */
bofm_init ( &hermon->bofm, pci, &hermon_bofm_operations );
+1 -1
View File
@@ -2335,7 +2335,7 @@ static int linda_probe ( struct pci_device *pci ) {
adjust_pci_device ( pci );
/* Map PCI BARs */
linda->regs = ioremap ( pci->membase, LINDA_BAR0_SIZE );
linda->regs = pci_ioremap ( pci, pci->membase, LINDA_BAR0_SIZE );
DBGC2 ( linda, "Linda %p has BAR at %08lx\n", linda, pci->membase );
/* Print some general data */
@@ -115,7 +115,7 @@ mlx_pci_init_priv(
mlx_status status = MLX_SUCCESS;
adjust_pci_device ( utils->pci );
#ifdef DEVICE_CX3
utils->config = ioremap ( pci_bar_start ( utils->pci, PCI_BASE_ADDRESS_0),
utils->config = pci_ioremap ( utils->pci, pci_bar_start ( utils->pci, PCI_BASE_ADDRESS_0),
0x100000 );
#endif
return status;
+1 -1
View File
@@ -2297,7 +2297,7 @@ static int qib7322_probe ( struct pci_device *pci ) {
adjust_pci_device ( pci );
/* Map PCI BARs */
qib7322->regs = ioremap ( pci->membase, QIB7322_BAR0_SIZE );
qib7322->regs = pci_ioremap ( pci, pci->membase, QIB7322_BAR0_SIZE );
DBGC2 ( qib7322, "QIB7322 %p has BAR at %08lx\n",
qib7322, pci->membase );