diff options
9 files changed, 25 insertions, 24 deletions
diff --git a/Documentation/devicetree/bindings/fpga/altera-fpga2sdram-bridge.txt b/Documentation/devicetree/bindings/fpga/altera-fpga2sdram-bridge.txt index 817a8d4bf903..5dd0ff0f7b4e 100644 --- a/Documentation/devicetree/bindings/fpga/altera-fpga2sdram-bridge.txt +++ b/Documentation/devicetree/bindings/fpga/altera-fpga2sdram-bridge.txt | |||
@@ -3,10 +3,7 @@ Altera FPGA To SDRAM Bridge Driver | |||
3 | Required properties: | 3 | Required properties: |
4 | - compatible : Should contain "altr,socfpga-fpga2sdram-bridge" | 4 | - compatible : Should contain "altr,socfpga-fpga2sdram-bridge" |
5 | 5 | ||
6 | Optional properties: | 6 | See Documentation/devicetree/bindings/fpga/fpga-bridge.txt for generic bindings. |
7 | - bridge-enable : 0 if driver should disable bridge at startup | ||
8 | 1 if driver should enable bridge at startup | ||
9 | Default is to leave bridge in current state. | ||
10 | 7 | ||
11 | Example: | 8 | Example: |
12 | fpga_bridge3: fpga-bridge@ffc25080 { | 9 | fpga_bridge3: fpga-bridge@ffc25080 { |
diff --git a/Documentation/devicetree/bindings/fpga/altera-freeze-bridge.txt b/Documentation/devicetree/bindings/fpga/altera-freeze-bridge.txt index f8e288c71b2d..8b26fbcff3c6 100644 --- a/Documentation/devicetree/bindings/fpga/altera-freeze-bridge.txt +++ b/Documentation/devicetree/bindings/fpga/altera-freeze-bridge.txt | |||
@@ -10,10 +10,7 @@ Required properties: | |||
10 | - compatible : Should contain "altr,freeze-bridge-controller" | 10 | - compatible : Should contain "altr,freeze-bridge-controller" |
11 | - regs : base address and size for freeze bridge module | 11 | - regs : base address and size for freeze bridge module |
12 | 12 | ||
13 | Optional properties: | 13 | See Documentation/devicetree/bindings/fpga/fpga-bridge.txt for generic bindings. |
14 | - bridge-enable : 0 if driver should disable bridge at startup | ||
15 | 1 if driver should enable bridge at startup | ||
16 | Default is to leave bridge in current state. | ||
17 | 14 | ||
18 | Example: | 15 | Example: |
19 | freeze-controller@100000450 { | 16 | freeze-controller@100000450 { |
diff --git a/Documentation/devicetree/bindings/fpga/altera-hps2fpga-bridge.txt b/Documentation/devicetree/bindings/fpga/altera-hps2fpga-bridge.txt index 6406f9337eeb..68cce3945b10 100644 --- a/Documentation/devicetree/bindings/fpga/altera-hps2fpga-bridge.txt +++ b/Documentation/devicetree/bindings/fpga/altera-hps2fpga-bridge.txt | |||
@@ -9,10 +9,7 @@ Required properties: | |||
9 | - resets : Phandle and reset specifier for this bridge's reset | 9 | - resets : Phandle and reset specifier for this bridge's reset |
10 | - clocks : Clocks used by this module. | 10 | - clocks : Clocks used by this module. |
11 | 11 | ||
12 | Optional properties: | 12 | See Documentation/devicetree/bindings/fpga/fpga-bridge.txt for generic bindings. |
13 | - bridge-enable : 0 if driver should disable bridge at startup. | ||
14 | 1 if driver should enable bridge at startup. | ||
15 | Default is to leave bridge in its current state. | ||
16 | 13 | ||
17 | Example: | 14 | Example: |
18 | fpga_bridge0: fpga-bridge@ff400000 { | 15 | fpga_bridge0: fpga-bridge@ff400000 { |
diff --git a/Documentation/devicetree/bindings/fpga/fpga-bridge.txt b/Documentation/devicetree/bindings/fpga/fpga-bridge.txt new file mode 100644 index 000000000000..72e06917288a --- /dev/null +++ b/Documentation/devicetree/bindings/fpga/fpga-bridge.txt | |||
@@ -0,0 +1,13 @@ | |||
1 | FPGA Bridge Device Tree Binding | ||
2 | |||
3 | Optional properties: | ||
4 | - bridge-enable : 0 if driver should disable bridge at startup | ||
5 | 1 if driver should enable bridge at startup | ||
6 | Default is to leave bridge in current state. | ||
7 | |||
8 | Example: | ||
9 | fpga_bridge3: fpga-bridge@ffc25080 { | ||
10 | compatible = "altr,socfpga-fpga2sdram-bridge"; | ||
11 | reg = <0xffc25080 0x4>; | ||
12 | bridge-enable = <0>; | ||
13 | }; | ||
diff --git a/Documentation/devicetree/bindings/fpga/xilinx-pr-decoupler.txt b/Documentation/devicetree/bindings/fpga/xilinx-pr-decoupler.txt index 8dcfba926bc7..4284d293fa61 100644 --- a/Documentation/devicetree/bindings/fpga/xilinx-pr-decoupler.txt +++ b/Documentation/devicetree/bindings/fpga/xilinx-pr-decoupler.txt | |||
@@ -18,12 +18,8 @@ Required properties: | |||
18 | - clocks : input clock to IP | 18 | - clocks : input clock to IP |
19 | - clock-names : should contain "aclk" | 19 | - clock-names : should contain "aclk" |
20 | 20 | ||
21 | Optional properties: | 21 | See Documentation/devicetree/bindings/fpga/fpga-region.txt and |
22 | - bridge-enable : 0 if driver should disable bridge at startup | 22 | Documentation/devicetree/bindings/fpga/fpga-bridge.txt for generic bindings. |
23 | 1 if driver should enable bridge at startup | ||
24 | Default is to leave bridge in current state. | ||
25 | |||
26 | See Documentation/devicetree/bindings/fpga/fpga-region.txt for generic bindings. | ||
27 | 23 | ||
28 | Example: | 24 | Example: |
29 | fpga-bridge@100000450 { | 25 | fpga-bridge@100000450 { |
diff --git a/drivers/fpga/altera-cvp.c b/drivers/fpga/altera-cvp.c index 770915fb97f9..53b963071c7b 100644 --- a/drivers/fpga/altera-cvp.c +++ b/drivers/fpga/altera-cvp.c | |||
@@ -57,7 +57,8 @@ struct altera_cvp_conf { | |||
57 | struct fpga_manager *mgr; | 57 | struct fpga_manager *mgr; |
58 | struct pci_dev *pci_dev; | 58 | struct pci_dev *pci_dev; |
59 | void __iomem *map; | 59 | void __iomem *map; |
60 | void (*write_data)(struct altera_cvp_conf *, u32); | 60 | void (*write_data)(struct altera_cvp_conf *conf, |
61 | u32 data); | ||
61 | char mgr_name[64]; | 62 | char mgr_name[64]; |
62 | u8 numclks; | 63 | u8 numclks; |
63 | }; | 64 | }; |
diff --git a/drivers/fpga/altera-pr-ip-core-plat.c b/drivers/fpga/altera-pr-ip-core-plat.c index b293d83143f1..99b9cc0e70f0 100644 --- a/drivers/fpga/altera-pr-ip-core-plat.c +++ b/drivers/fpga/altera-pr-ip-core-plat.c | |||
@@ -32,7 +32,9 @@ static int alt_pr_platform_remove(struct platform_device *pdev) | |||
32 | { | 32 | { |
33 | struct device *dev = &pdev->dev; | 33 | struct device *dev = &pdev->dev; |
34 | 34 | ||
35 | return alt_pr_unregister(dev); | 35 | alt_pr_unregister(dev); |
36 | |||
37 | return 0; | ||
36 | } | 38 | } |
37 | 39 | ||
38 | static const struct of_device_id alt_pr_of_match[] = { | 40 | static const struct of_device_id alt_pr_of_match[] = { |
diff --git a/drivers/fpga/altera-pr-ip-core.c b/drivers/fpga/altera-pr-ip-core.c index a7a3bf0b5202..2cf25fd5e897 100644 --- a/drivers/fpga/altera-pr-ip-core.c +++ b/drivers/fpga/altera-pr-ip-core.c | |||
@@ -201,15 +201,13 @@ int alt_pr_register(struct device *dev, void __iomem *reg_base) | |||
201 | } | 201 | } |
202 | EXPORT_SYMBOL_GPL(alt_pr_register); | 202 | EXPORT_SYMBOL_GPL(alt_pr_register); |
203 | 203 | ||
204 | int alt_pr_unregister(struct device *dev) | 204 | void alt_pr_unregister(struct device *dev) |
205 | { | 205 | { |
206 | struct fpga_manager *mgr = dev_get_drvdata(dev); | 206 | struct fpga_manager *mgr = dev_get_drvdata(dev); |
207 | 207 | ||
208 | dev_dbg(dev, "%s\n", __func__); | 208 | dev_dbg(dev, "%s\n", __func__); |
209 | 209 | ||
210 | fpga_mgr_unregister(mgr); | 210 | fpga_mgr_unregister(mgr); |
211 | |||
212 | return 0; | ||
213 | } | 211 | } |
214 | EXPORT_SYMBOL_GPL(alt_pr_unregister); | 212 | EXPORT_SYMBOL_GPL(alt_pr_unregister); |
215 | 213 | ||
diff --git a/include/linux/fpga/altera-pr-ip-core.h b/include/linux/fpga/altera-pr-ip-core.h index 7d4664730d60..0b08ac20ab16 100644 --- a/include/linux/fpga/altera-pr-ip-core.h +++ b/include/linux/fpga/altera-pr-ip-core.h | |||
@@ -13,6 +13,6 @@ | |||
13 | #include <linux/io.h> | 13 | #include <linux/io.h> |
14 | 14 | ||
15 | int alt_pr_register(struct device *dev, void __iomem *reg_base); | 15 | int alt_pr_register(struct device *dev, void __iomem *reg_base); |
16 | int alt_pr_unregister(struct device *dev); | 16 | void alt_pr_unregister(struct device *dev); |
17 | 17 | ||
18 | #endif /* _ALT_PR_IP_CORE_H */ | 18 | #endif /* _ALT_PR_IP_CORE_H */ |