aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/pci/controller/pcie-rcar.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/pci/controller/pcie-rcar.c b/drivers/pci/controller/pcie-rcar.c
index 3db693b4410e..6699211fdc9a 100644
--- a/drivers/pci/controller/pcie-rcar.c
+++ b/drivers/pci/controller/pcie-rcar.c
@@ -170,7 +170,7 @@ enum {
170 170
171static void rcar_rmw32(struct rcar_pcie *pcie, int where, u32 mask, u32 data) 171static void rcar_rmw32(struct rcar_pcie *pcie, int where, u32 mask, u32 data)
172{ 172{
173 int shift = 8 * (where & 3); 173 unsigned int shift = 8 * (where & 3);
174 u32 val = rcar_pci_read_reg(pcie, where & ~3); 174 u32 val = rcar_pci_read_reg(pcie, where & ~3);
175 175
176 val &= ~(mask << shift); 176 val &= ~(mask << shift);
@@ -180,7 +180,7 @@ static void rcar_rmw32(struct rcar_pcie *pcie, int where, u32 mask, u32 data)
180 180
181static u32 rcar_read_conf(struct rcar_pcie *pcie, int where) 181static u32 rcar_read_conf(struct rcar_pcie *pcie, int where)
182{ 182{
183 int shift = 8 * (where & 3); 183 unsigned int shift = 8 * (where & 3);
184 u32 val = rcar_pci_read_reg(pcie, where & ~3); 184 u32 val = rcar_pci_read_reg(pcie, where & ~3);
185 185
186 return val >> shift; 186 return val >> shift;
@@ -191,7 +191,7 @@ static int rcar_pcie_config_access(struct rcar_pcie *pcie,
191 unsigned char access_type, struct pci_bus *bus, 191 unsigned char access_type, struct pci_bus *bus,
192 unsigned int devfn, int where, u32 *data) 192 unsigned int devfn, int where, u32 *data)
193{ 193{
194 int dev, func, reg, index; 194 unsigned int dev, func, reg, index;
195 195
196 dev = PCI_SLOT(devfn); 196 dev = PCI_SLOT(devfn);
197 func = PCI_FUNC(devfn); 197 func = PCI_FUNC(devfn);
@@ -295,8 +295,9 @@ static int rcar_pcie_write_conf(struct pci_bus *bus, unsigned int devfn,
295 int where, int size, u32 val) 295 int where, int size, u32 val)
296{ 296{
297 struct rcar_pcie *pcie = bus->sysdata; 297 struct rcar_pcie *pcie = bus->sysdata;
298 int shift, ret; 298 unsigned int shift;
299 u32 data; 299 u32 data;
300 int ret;
300 301
301 ret = rcar_pcie_config_access(pcie, RCAR_PCI_ACCESS_READ, 302 ret = rcar_pcie_config_access(pcie, RCAR_PCI_ACCESS_READ,
302 bus, devfn, where, &data); 303 bus, devfn, where, &data);
@@ -506,10 +507,10 @@ static int phy_wait_for_ack(struct rcar_pcie *pcie)
506} 507}
507 508
508static void phy_write_reg(struct rcar_pcie *pcie, 509static void phy_write_reg(struct rcar_pcie *pcie,
509 unsigned int rate, unsigned int addr, 510 unsigned int rate, u32 addr,
510 unsigned int lane, unsigned int data) 511 unsigned int lane, u32 data)
511{ 512{
512 unsigned long phyaddr; 513 u32 phyaddr;
513 514
514 phyaddr = WRITE_CMD | 515 phyaddr = WRITE_CMD |
515 ((rate & 1) << RATE_POS) | 516 ((rate & 1) << RATE_POS) |
@@ -1117,7 +1118,7 @@ static int rcar_pcie_probe(struct platform_device *pdev)
1117{ 1118{
1118 struct device *dev = &pdev->dev; 1119 struct device *dev = &pdev->dev;
1119 struct rcar_pcie *pcie; 1120 struct rcar_pcie *pcie;
1120 unsigned int data; 1121 u32 data;
1121 int err; 1122 int err;
1122 int (*phy_init_fn)(struct rcar_pcie *); 1123 int (*phy_init_fn)(struct rcar_pcie *);
1123 struct pci_host_bridge *bridge; 1124 struct pci_host_bridge *bridge;