Commit af1cdd74 authored by Griffin Kroah-Hartman's avatar Griffin Kroah-Hartman Committed by Greg Kroah-Hartman

staging: vme_user: vme_tsi148.c: Change Formatting

Adhere to Linux Kernal coding style.

Reported by checkpatch

CHECK: Alignment should match open parenthesis
Signed-off-by: default avatarGriffin Kroah-Hartman <griffin@kroah.com>
Link: https://lore.kernel.org/r/20240729130213.48941-2-griffin@kroah.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c9081e96
...@@ -751,8 +751,8 @@ static int tsi148_alloc_resource(struct vme_master_resource *image, ...@@ -751,8 +751,8 @@ static int tsi148_alloc_resource(struct vme_master_resource *image,
image->bus_resource.end = (unsigned long)size; image->bus_resource.end = (unsigned long)size;
image->bus_resource.flags = IORESOURCE_MEM; image->bus_resource.flags = IORESOURCE_MEM;
retval = pci_bus_alloc_resource(pdev->bus, retval = pci_bus_alloc_resource(pdev->bus, &image->bus_resource,
&image->bus_resource, size, 0x10000, PCIBIOS_MIN_MEM, size, 0x10000, PCIBIOS_MIN_MEM,
0, NULL, NULL); 0, NULL, NULL);
if (retval) { if (retval) {
dev_err(tsi148_bridge->parent, "Failed to allocate mem resource for window %d size 0x%lx start 0x%lx\n", dev_err(tsi148_bridge->parent, "Failed to allocate mem resource for window %d size 0x%lx start 0x%lx\n",
...@@ -796,8 +796,8 @@ static void tsi148_free_resource(struct vme_master_resource *image) ...@@ -796,8 +796,8 @@ static void tsi148_free_resource(struct vme_master_resource *image)
* Set the attributes of an outbound window. * Set the attributes of an outbound window.
*/ */
static int tsi148_master_set(struct vme_master_resource *image, int enabled, static int tsi148_master_set(struct vme_master_resource *image, int enabled,
unsigned long long vme_base, unsigned long long size, u32 aspace, unsigned long long vme_base, unsigned long long size,
u32 cycle, u32 dwidth) u32 aspace, u32 cycle, u32 dwidth)
{ {
int retval = 0; int retval = 0;
unsigned int i; unsigned int i;
...@@ -1031,8 +1031,8 @@ static int tsi148_master_set(struct vme_master_resource *image, int enabled, ...@@ -1031,8 +1031,8 @@ static int tsi148_master_set(struct vme_master_resource *image, int enabled,
* XXX Not parsing prefetch information. * XXX Not parsing prefetch information.
*/ */
static int __tsi148_master_get(struct vme_master_resource *image, int *enabled, static int __tsi148_master_get(struct vme_master_resource *image, int *enabled,
unsigned long long *vme_base, unsigned long long *size, u32 *aspace, unsigned long long *vme_base, unsigned long long *size,
u32 *cycle, u32 *dwidth) u32 *aspace, u32 *cycle, u32 *dwidth)
{ {
unsigned int i, ctl; unsigned int i, ctl;
unsigned int pci_base_low, pci_base_high; unsigned int pci_base_low, pci_base_high;
...@@ -1140,8 +1140,8 @@ static int __tsi148_master_get(struct vme_master_resource *image, int *enabled, ...@@ -1140,8 +1140,8 @@ static int __tsi148_master_get(struct vme_master_resource *image, int *enabled,
} }
static int tsi148_master_get(struct vme_master_resource *image, int *enabled, static int tsi148_master_get(struct vme_master_resource *image, int *enabled,
unsigned long long *vme_base, unsigned long long *size, u32 *aspace, unsigned long long *vme_base, unsigned long long *size,
u32 *cycle, u32 *dwidth) u32 *aspace, u32 *cycle, u32 *dwidth)
{ {
int retval; int retval;
...@@ -1342,9 +1342,8 @@ static ssize_t tsi148_master_write(struct vme_master_resource *image, void *buf, ...@@ -1342,9 +1342,8 @@ static ssize_t tsi148_master_write(struct vme_master_resource *image, void *buf,
* *
* Requires a previously configured master window, returns final value. * Requires a previously configured master window, returns final value.
*/ */
static unsigned int tsi148_master_rmw(struct vme_master_resource *image, static unsigned int tsi148_master_rmw(struct vme_master_resource *image, unsigned int mask,
unsigned int mask, unsigned int compare, unsigned int swap, unsigned int compare, unsigned int swap, loff_t offset)
loff_t offset)
{ {
unsigned long long pci_addr; unsigned long long pci_addr;
unsigned int pci_addr_high, pci_addr_low; unsigned int pci_addr_high, pci_addr_low;
...@@ -1599,8 +1598,8 @@ static int tsi148_dma_set_vme_dest_attributes(struct device *dev, __be32 *attr, ...@@ -1599,8 +1598,8 @@ static int tsi148_dma_set_vme_dest_attributes(struct device *dev, __be32 *attr,
* *
* Note: DMA engine expects the DMA descriptor to be big endian. * Note: DMA engine expects the DMA descriptor to be big endian.
*/ */
static int tsi148_dma_list_add(struct vme_dma_list *list, static int tsi148_dma_list_add(struct vme_dma_list *list, struct vme_dma_attr *src,
struct vme_dma_attr *src, struct vme_dma_attr *dest, size_t count) struct vme_dma_attr *dest, size_t count)
{ {
struct tsi148_dma_entry *entry, *prev; struct tsi148_dma_entry *entry, *prev;
u32 address_high, address_low, val; u32 address_high, address_low, val;
...@@ -1666,9 +1665,11 @@ static int tsi148_dma_list_add(struct vme_dma_list *list, ...@@ -1666,9 +1665,11 @@ static int tsi148_dma_list_add(struct vme_dma_list *list,
entry->descriptor.dsal = cpu_to_be32(address_low); entry->descriptor.dsal = cpu_to_be32(address_low);
entry->descriptor.dsat = cpu_to_be32(TSI148_LCSR_DSAT_TYP_VME); entry->descriptor.dsat = cpu_to_be32(TSI148_LCSR_DSAT_TYP_VME);
retval = tsi148_dma_set_vme_src_attributes( retval = tsi148_dma_set_vme_src_attributes(tsi148_bridge->parent,
tsi148_bridge->parent, &entry->descriptor.dsat, &entry->descriptor.dsat,
vme_attr->aspace, vme_attr->cycle, vme_attr->dwidth); vme_attr->aspace,
vme_attr->cycle,
vme_attr->dwidth);
if (retval < 0) if (retval < 0)
goto err_source; goto err_source;
break; break;
...@@ -1702,9 +1703,11 @@ static int tsi148_dma_list_add(struct vme_dma_list *list, ...@@ -1702,9 +1703,11 @@ static int tsi148_dma_list_add(struct vme_dma_list *list,
entry->descriptor.ddal = cpu_to_be32(address_low); entry->descriptor.ddal = cpu_to_be32(address_low);
entry->descriptor.ddat = cpu_to_be32(TSI148_LCSR_DDAT_TYP_VME); entry->descriptor.ddat = cpu_to_be32(TSI148_LCSR_DDAT_TYP_VME);
retval = tsi148_dma_set_vme_dest_attributes( retval = tsi148_dma_set_vme_dest_attributes(tsi148_bridge->parent,
tsi148_bridge->parent, &entry->descriptor.ddat, &entry->descriptor.ddat,
vme_attr->aspace, vme_attr->cycle, vme_attr->dwidth); vme_attr->aspace,
vme_attr->cycle,
vme_attr->dwidth);
if (retval < 0) if (retval < 0)
goto err_dest; goto err_dest;
break; break;
...@@ -2199,8 +2202,7 @@ static int tsi148_crcsr_init(struct vme_bridge *tsi148_bridge, ...@@ -2199,8 +2202,7 @@ static int tsi148_crcsr_init(struct vme_bridge *tsi148_bridge,
dev_info(tsi148_bridge->parent, "CR/CSR already enabled\n"); dev_info(tsi148_bridge->parent, "CR/CSR already enabled\n");
} else { } else {
dev_info(tsi148_bridge->parent, "Enabling CR/CSR space\n"); dev_info(tsi148_bridge->parent, "Enabling CR/CSR space\n");
iowrite32be(crat | TSI148_LCSR_CRAT_EN, iowrite32be(crat | TSI148_LCSR_CRAT_EN, bridge->base + TSI148_LCSR_CRAT);
bridge->base + TSI148_LCSR_CRAT);
} }
/* If we want flushed, error-checked writes, set up a window /* If we want flushed, error-checked writes, set up a window
...@@ -2208,9 +2210,8 @@ static int tsi148_crcsr_init(struct vme_bridge *tsi148_bridge, ...@@ -2208,9 +2210,8 @@ static int tsi148_crcsr_init(struct vme_bridge *tsi148_bridge,
* through VME writes. * through VME writes.
*/ */
if (err_chk) { if (err_chk) {
retval = tsi148_master_set(bridge->flush_image, 1, retval = tsi148_master_set(bridge->flush_image, 1, (vstat * 0x80000),
(vstat * 0x80000), 0x80000, VME_CRCSR, VME_SCT, 0x80000, VME_CRCSR, VME_SCT, VME_D16);
VME_D16);
if (retval) if (retval)
dev_err(tsi148_bridge->parent, "Configuring flush image failed\n"); dev_err(tsi148_bridge->parent, "Configuring flush image failed\n");
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment