Skip to content

Commit 7997628

Browse files
author
Dinh Nguyen
committed
FogBugz #178793: Upgrade socfpga to v3.13
spi-dw-mmio: commit[1e0d191] removes free_irq socfpga: commit[dc81058] removes of_clk_init fpga-mgr & fgpa-bridge: * INIT_COMPLETION -> reinit_completion * use dev_groups for adding attributes to class spi-cadence-qspi.c - add code to set maxburst to 1 for qspi, so that burst patch will work properly. socfpga_cyclone5.dtsi: s/snps,max-mtu/max-frame-size Signed-off-by: Graham Moore <[email protected]> Signed-off-by: Alan Tull <[email protected]> Signed-off-by: Dinh Nguyen <[email protected]>
1 parent 4f849a3 commit 7997628

File tree

7 files changed

+39
-15
lines changed

7 files changed

+39
-15
lines changed

arch/arm/boot/dts/socfpga_cyclone5.dtsi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,6 @@
185185
txc-skew-ps = <2600>;
186186
rxdv-skew-ps = <0>;
187187
rxc-skew-ps = <2000>;
188-
snps,max-mtu = <3800>;
188+
max-frame-size = <3800>;
189189
status = "okay";
190190
};

arch/arm/mach-socfpga/socfpga.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,8 +275,6 @@ static void __init socfpga_init_irq(void)
275275
{
276276
irqchip_init();
277277
socfpga_sysmgr_init();
278-
279-
of_clk_init(NULL);
280278
}
281279

282280
static void socfpga_cyclone5_restart(enum reboot_mode mode, const char *cmd)

drivers/fpga/fpga-mgr.c

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,22 @@ static ssize_t fpga_mgr_status_show(struct device *dev,
5757
return mgr->mops->status(mgr, buf);
5858
}
5959

60-
static struct device_attribute fpga_mgr_attrs[] = {
61-
__ATTR(name, S_IRUGO, fpga_mgr_name_show, NULL),
62-
__ATTR(status, S_IRUGO, fpga_mgr_status_show, NULL),
63-
__ATTR_NULL
60+
static DEVICE_ATTR(name, S_IRUGO, fpga_mgr_name_show, NULL);
61+
static DEVICE_ATTR(status, S_IRUGO, fpga_mgr_status_show, NULL);
62+
63+
static struct attribute *fpga_mgr_attrs[] = {
64+
&dev_attr_name.attr,
65+
&dev_attr_status.attr,
66+
NULL,
67+
};
68+
69+
static const struct attribute_group fpga_mgr_group = {
70+
.attrs = fpga_mgr_attrs,
71+
};
72+
73+
const struct attribute_group *fpga_mgr_groups[] = {
74+
&fpga_mgr_group,
75+
NULL,
6476
};
6577

6678
static int fpga_mgr_get_new_minor(struct fpga_manager *mgr, int request_nr)
@@ -219,7 +231,7 @@ static int __init fpga_mgr_dev_init(void)
219231
if (IS_ERR(fpga_mgr_class))
220232
return PTR_ERR(fpga_mgr_class);
221233

222-
fpga_mgr_class->dev_attrs = fpga_mgr_attrs;
234+
fpga_mgr_class->dev_groups = fpga_mgr_groups;
223235

224236
ret = alloc_chrdev_region(&fpga_mgr_dev, 0, FPGA_MAX_MINORS, "fpga");
225237
if (ret) {

drivers/fpga/fpga-mgrs/altera.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ static int alt_fpga_wait_for_config_done(struct fpga_manager *mgr)
259259
int timeout, ret = 0;
260260

261261
alt_fpga_disable_irqs(mgr);
262-
INIT_COMPLETION(mgr->status_complete);
262+
reinit_completion(&mgr->status_complete);
263263
alt_fpga_enable_irqs(mgr, ALT_FPGAMGR_MON_CONF_DONE);
264264

265265
timeout = wait_for_completion_interruptible_timeout(

drivers/misc/fpga-bridge/fpga-bridge.c

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,21 @@ static ssize_t fpga_bridge_enable_set(struct device *dev,
6565
return count;
6666
}
6767

68-
static struct device_attribute fpga_bridge_attrs[] = {
69-
__ATTR(enable, S_IRUGO | S_IWUSR, fpga_bridge_enable_show, fpga_bridge_enable_set),
70-
__ATTR_NULL
68+
static DEVICE_ATTR(enable, S_IRUGO | S_IWUSR, fpga_bridge_enable_show,
69+
fpga_bridge_enable_set);
70+
71+
static struct attribute *fpga_bridge_attrs[] = {
72+
&dev_attr_enable.attr,
73+
NULL,
74+
};
75+
76+
static const struct attribute_group fpga_bridge_group = {
77+
.attrs = fpga_bridge_attrs,
78+
};
79+
80+
const struct attribute_group *fpga_bridge_groups[] = {
81+
&fpga_bridge_group,
82+
NULL,
7183
};
7284

7385
static int fpga_bridge_alloc_id(struct fpga_bridge *bridge, int request_nr)
@@ -198,7 +210,7 @@ static int __init fpga_bridge_dev_init(void)
198210
if (IS_ERR(fpga_bridge_class))
199211
return PTR_ERR(fpga_bridge_class);
200212

201-
fpga_bridge_class->dev_attrs = fpga_bridge_attrs;
213+
fpga_bridge_class->dev_groups = fpga_bridge_groups;
202214

203215
return 0;
204216
}

drivers/spi/spi-cadence-qspi-apb.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -442,12 +442,14 @@ static int cadence_qspi_apb_dma_start(
442442
dmaconf.direction = DMA_DEV_TO_MEM;
443443
dmaconf.src_addr = pdata->qspi_ahb_phy;
444444
dmaconf.src_addr_width = 4;
445+
dmaconf.src_maxburst = 1;
445446
} else {
446447
dmachan = cadence_qspi->txchan;
447448
data_direction = DMA_TO_DEVICE;
448449
dmaconf.direction = DMA_MEM_TO_DEV;
449450
dmaconf.dst_addr = pdata->qspi_ahb_phy;
450451
dmaconf.dst_addr_width = 4;
452+
dmaconf.dst_maxburst = 1;
451453
}
452454

453455
/* map the buffer address */

drivers/spi/spi-dw-mmio.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,14 @@ static int dw_spi_mmio_probe(struct platform_device *pdev)
9090
if(of_property_read_u32(pdev->dev.of_node, "num-chipselect", &prop)) {
9191
ret = -ENXIO;
9292
dev_err(&pdev->dev, "couldn't determine num-chipselect\n");
93-
goto err_irq;
93+
goto err_unmap;
9494
}
9595
dws->num_cs = prop;
9696

9797
if(of_property_read_u32(pdev->dev.of_node, "bus-num", &prop)) {
9898
ret = -ENXIO;
9999
dev_err(&pdev->dev, "couldn't determine bus-num\n");
100-
goto err_irq;
100+
goto err_unmap;
101101
}
102102
dws->bus_num = prop;
103103
#else

0 commit comments

Comments
 (0)