diff options
author | Michal Simek <michal.simek@xilinx.com> | 2013-06-03 06:13:18 -0400 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2013-06-26 06:31:29 -0400 |
commit | 5130af35bf34e7b57e86c7f72c08b8c68adbb425 (patch) | |
tree | f05e877518db376864724f28a3710c3cb8bf8692 | |
parent | ec05e7a8aaf5fd73a64d28fc9f28384ea247cc1c (diff) |
video: xilinxfb: Rename PLB_ACCESS_FLAG to BUS_ACCESS_FLAG
Using only PLB name is wrong for a long time because
the same access functions are also used for AXI.
s/PLB/BUS/g
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
-rw-r--r-- | drivers/video/xilinxfb.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/drivers/video/xilinxfb.c b/drivers/video/xilinxfb.c index c9b442b928e5..d94c99280144 100644 --- a/drivers/video/xilinxfb.c +++ b/drivers/video/xilinxfb.c | |||
@@ -44,7 +44,7 @@ | |||
44 | 44 | ||
45 | 45 | ||
46 | /* | 46 | /* |
47 | * Xilinx calls it "PLB TFT LCD Controller" though it can also be used for | 47 | * Xilinx calls it "TFT LCD Controller" though it can also be used for |
48 | * the VGA port on the Xilinx ML40x board. This is a hardware display | 48 | * the VGA port on the Xilinx ML40x board. This is a hardware display |
49 | * controller for a 640x480 resolution TFT or VGA screen. | 49 | * controller for a 640x480 resolution TFT or VGA screen. |
50 | * | 50 | * |
@@ -54,11 +54,11 @@ | |||
54 | * don't start thinking about scrolling). The second allows the LCD to | 54 | * don't start thinking about scrolling). The second allows the LCD to |
55 | * be turned on or off as well as rotated 180 degrees. | 55 | * be turned on or off as well as rotated 180 degrees. |
56 | * | 56 | * |
57 | * In case of direct PLB access the second control register will be at | 57 | * In case of direct BUS access the second control register will be at |
58 | * an offset of 4 as compared to the DCR access where the offset is 1 | 58 | * an offset of 4 as compared to the DCR access where the offset is 1 |
59 | * i.e. REG_CTRL. So this is taken care in the function | 59 | * i.e. REG_CTRL. So this is taken care in the function |
60 | * xilinx_fb_out32 where it left shifts the offset 2 times in case of | 60 | * xilinx_fb_out32 where it left shifts the offset 2 times in case of |
61 | * direct PLB access. | 61 | * direct BUS access. |
62 | */ | 62 | */ |
63 | #define NUM_REGS 2 | 63 | #define NUM_REGS 2 |
64 | #define REG_FB_ADDR 0 | 64 | #define REG_FB_ADDR 0 |
@@ -116,7 +116,7 @@ static struct fb_var_screeninfo xilinx_fb_var = { | |||
116 | }; | 116 | }; |
117 | 117 | ||
118 | 118 | ||
119 | #define PLB_ACCESS_FLAG 0x1 /* 1 = PLB, 0 = DCR */ | 119 | #define BUS_ACCESS_FLAG 0x1 /* 1 = BUS, 0 = DCR */ |
120 | 120 | ||
121 | struct xilinxfb_drvdata { | 121 | struct xilinxfb_drvdata { |
122 | 122 | ||
@@ -146,14 +146,14 @@ struct xilinxfb_drvdata { | |||
146 | container_of(_info, struct xilinxfb_drvdata, info) | 146 | container_of(_info, struct xilinxfb_drvdata, info) |
147 | 147 | ||
148 | /* | 148 | /* |
149 | * The XPS TFT Controller can be accessed through PLB or DCR interface. | 149 | * The XPS TFT Controller can be accessed through BUS or DCR interface. |
150 | * To perform the read/write on the registers we need to check on | 150 | * To perform the read/write on the registers we need to check on |
151 | * which bus its connected and call the appropriate write API. | 151 | * which bus its connected and call the appropriate write API. |
152 | */ | 152 | */ |
153 | static void xilinx_fb_out32(struct xilinxfb_drvdata *drvdata, u32 offset, | 153 | static void xilinx_fb_out32(struct xilinxfb_drvdata *drvdata, u32 offset, |
154 | u32 val) | 154 | u32 val) |
155 | { | 155 | { |
156 | if (drvdata->flags & PLB_ACCESS_FLAG) | 156 | if (drvdata->flags & BUS_ACCESS_FLAG) |
157 | out_be32(drvdata->regs + (offset << 2), val); | 157 | out_be32(drvdata->regs + (offset << 2), val); |
158 | #ifdef CONFIG_PPC_DCR | 158 | #ifdef CONFIG_PPC_DCR |
159 | else | 159 | else |
@@ -235,10 +235,10 @@ static int xilinxfb_assign(struct device *dev, | |||
235 | int rc; | 235 | int rc; |
236 | int fbsize = pdata->xvirt * pdata->yvirt * BYTES_PER_PIXEL; | 236 | int fbsize = pdata->xvirt * pdata->yvirt * BYTES_PER_PIXEL; |
237 | 237 | ||
238 | if (drvdata->flags & PLB_ACCESS_FLAG) { | 238 | if (drvdata->flags & BUS_ACCESS_FLAG) { |
239 | /* | 239 | /* |
240 | * Map the control registers in if the controller | 240 | * Map the control registers in if the controller |
241 | * is on direct PLB interface. | 241 | * is on direct BUS interface. |
242 | */ | 242 | */ |
243 | if (!request_mem_region(physaddr, 8, DRIVER_NAME)) { | 243 | if (!request_mem_region(physaddr, 8, DRIVER_NAME)) { |
244 | dev_err(dev, "Couldn't lock memory region at 0x%08lX\n", | 244 | dev_err(dev, "Couldn't lock memory region at 0x%08lX\n", |
@@ -270,7 +270,7 @@ static int xilinxfb_assign(struct device *dev, | |||
270 | if (!drvdata->fb_virt) { | 270 | if (!drvdata->fb_virt) { |
271 | dev_err(dev, "Could not allocate frame buffer memory\n"); | 271 | dev_err(dev, "Could not allocate frame buffer memory\n"); |
272 | rc = -ENOMEM; | 272 | rc = -ENOMEM; |
273 | if (drvdata->flags & PLB_ACCESS_FLAG) | 273 | if (drvdata->flags & BUS_ACCESS_FLAG) |
274 | goto err_fbmem; | 274 | goto err_fbmem; |
275 | else | 275 | else |
276 | goto err_region; | 276 | goto err_region; |
@@ -323,7 +323,7 @@ static int xilinxfb_assign(struct device *dev, | |||
323 | goto err_regfb; | 323 | goto err_regfb; |
324 | } | 324 | } |
325 | 325 | ||
326 | if (drvdata->flags & PLB_ACCESS_FLAG) { | 326 | if (drvdata->flags & BUS_ACCESS_FLAG) { |
327 | /* Put a banner in the log (for DEBUG) */ | 327 | /* Put a banner in the log (for DEBUG) */ |
328 | dev_dbg(dev, "regs: phys=%lx, virt=%p\n", physaddr, | 328 | dev_dbg(dev, "regs: phys=%lx, virt=%p\n", physaddr, |
329 | drvdata->regs); | 329 | drvdata->regs); |
@@ -348,11 +348,11 @@ err_cmap: | |||
348 | xilinx_fb_out32(drvdata, REG_CTRL, 0); | 348 | xilinx_fb_out32(drvdata, REG_CTRL, 0); |
349 | 349 | ||
350 | err_fbmem: | 350 | err_fbmem: |
351 | if (drvdata->flags & PLB_ACCESS_FLAG) | 351 | if (drvdata->flags & BUS_ACCESS_FLAG) |
352 | iounmap(drvdata->regs); | 352 | iounmap(drvdata->regs); |
353 | 353 | ||
354 | err_map: | 354 | err_map: |
355 | if (drvdata->flags & PLB_ACCESS_FLAG) | 355 | if (drvdata->flags & BUS_ACCESS_FLAG) |
356 | release_mem_region(physaddr, 8); | 356 | release_mem_region(physaddr, 8); |
357 | 357 | ||
358 | err_region: | 358 | err_region: |
@@ -384,7 +384,7 @@ static int xilinxfb_release(struct device *dev) | |||
384 | xilinx_fb_out32(drvdata, REG_CTRL, 0); | 384 | xilinx_fb_out32(drvdata, REG_CTRL, 0); |
385 | 385 | ||
386 | /* Release the resources, as allocated based on interface */ | 386 | /* Release the resources, as allocated based on interface */ |
387 | if (drvdata->flags & PLB_ACCESS_FLAG) { | 387 | if (drvdata->flags & BUS_ACCESS_FLAG) { |
388 | iounmap(drvdata->regs); | 388 | iounmap(drvdata->regs); |
389 | release_mem_region(drvdata->regs_phys, 8); | 389 | release_mem_region(drvdata->regs_phys, 8); |
390 | } | 390 | } |
@@ -423,18 +423,18 @@ static int xilinxfb_of_probe(struct platform_device *op) | |||
423 | } | 423 | } |
424 | 424 | ||
425 | /* | 425 | /* |
426 | * To check whether the core is connected directly to DCR or PLB | 426 | * To check whether the core is connected directly to DCR or BUS |
427 | * interface and initialize the tft_access accordingly. | 427 | * interface and initialize the tft_access accordingly. |
428 | */ | 428 | */ |
429 | of_property_read_u32(op->dev.of_node, "xlnx,dcr-splb-slave-if", | 429 | of_property_read_u32(op->dev.of_node, "xlnx,dcr-splb-slave-if", |
430 | &tft_access); | 430 | &tft_access); |
431 | 431 | ||
432 | /* | 432 | /* |
433 | * Fill the resource structure if its direct PLB interface | 433 | * Fill the resource structure if its direct BUS interface |
434 | * otherwise fill the dcr_host structure. | 434 | * otherwise fill the dcr_host structure. |
435 | */ | 435 | */ |
436 | if (tft_access) { | 436 | if (tft_access) { |
437 | drvdata->flags |= PLB_ACCESS_FLAG; | 437 | drvdata->flags |= BUS_ACCESS_FLAG; |
438 | rc = of_address_to_resource(op->dev.of_node, 0, &res); | 438 | rc = of_address_to_resource(op->dev.of_node, 0, &res); |
439 | if (rc) { | 439 | if (rc) { |
440 | dev_err(&op->dev, "invalid address\n"); | 440 | dev_err(&op->dev, "invalid address\n"); |