diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/ia64/sn/kernel/tiocx.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/arch/ia64/sn/kernel/tiocx.c b/arch/ia64/sn/kernel/tiocx.c index a087b274847e..8716f4d5314b 100644 --- a/arch/ia64/sn/kernel/tiocx.c +++ b/arch/ia64/sn/kernel/tiocx.c | |||
@@ -204,8 +204,8 @@ cx_device_register(nasid_t nasid, int part_num, int mfg_num, | |||
204 | cx_dev->dev.parent = NULL; | 204 | cx_dev->dev.parent = NULL; |
205 | cx_dev->dev.bus = &tiocx_bus_type; | 205 | cx_dev->dev.bus = &tiocx_bus_type; |
206 | cx_dev->dev.release = tiocx_bus_release; | 206 | cx_dev->dev.release = tiocx_bus_release; |
207 | snprintf(cx_dev->dev.bus_id, BUS_ID_SIZE, "%d.0x%x", | 207 | snprintf(cx_dev->dev.bus_id, BUS_ID_SIZE, "%d", |
208 | cx_dev->cx_id.nasid, cx_dev->cx_id.part_num); | 208 | cx_dev->cx_id.nasid); |
209 | device_register(&cx_dev->dev); | 209 | device_register(&cx_dev->dev); |
210 | get_device(&cx_dev->dev); | 210 | get_device(&cx_dev->dev); |
211 | 211 | ||
@@ -236,7 +236,6 @@ int cx_device_unregister(struct cx_dev *cx_dev) | |||
236 | */ | 236 | */ |
237 | static int cx_device_reload(struct cx_dev *cx_dev) | 237 | static int cx_device_reload(struct cx_dev *cx_dev) |
238 | { | 238 | { |
239 | device_remove_file(&cx_dev->dev, &dev_attr_cxdev_control); | ||
240 | cx_device_unregister(cx_dev); | 239 | cx_device_unregister(cx_dev); |
241 | return cx_device_register(cx_dev->cx_id.nasid, cx_dev->cx_id.part_num, | 240 | return cx_device_register(cx_dev->cx_id.nasid, cx_dev->cx_id.part_num, |
242 | cx_dev->cx_id.mfg_num, cx_dev->hubdev); | 241 | cx_dev->cx_id.mfg_num, cx_dev->hubdev); |
@@ -383,6 +382,7 @@ static int is_fpga_brick(int nasid) | |||
383 | switch (tiocx_btchar_get(nasid)) { | 382 | switch (tiocx_btchar_get(nasid)) { |
384 | case L1_BRICKTYPE_SA: | 383 | case L1_BRICKTYPE_SA: |
385 | case L1_BRICKTYPE_ATHENA: | 384 | case L1_BRICKTYPE_ATHENA: |
385 | case L1_BRICKTYPE_DAYTONA: | ||
386 | return 1; | 386 | return 1; |
387 | } | 387 | } |
388 | return 0; | 388 | return 0; |
@@ -409,7 +409,7 @@ static int tiocx_reload(struct cx_dev *cx_dev) | |||
409 | uint64_t cx_id; | 409 | uint64_t cx_id; |
410 | 410 | ||
411 | cx_id = | 411 | cx_id = |
412 | *(volatile int32_t *)(TIO_SWIN_BASE(nasid, TIOCX_CORELET) + | 412 | *(volatile uint64_t *)(TIO_SWIN_BASE(nasid, TIOCX_CORELET) + |
413 | WIDGET_ID); | 413 | WIDGET_ID); |
414 | part_num = XWIDGET_PART_NUM(cx_id); | 414 | part_num = XWIDGET_PART_NUM(cx_id); |
415 | mfg_num = XWIDGET_MFG_NUM(cx_id); | 415 | mfg_num = XWIDGET_MFG_NUM(cx_id); |
@@ -458,6 +458,10 @@ static ssize_t store_cxdev_control(struct device *dev, struct device_attribute * | |||
458 | 458 | ||
459 | switch (n) { | 459 | switch (n) { |
460 | case 1: | 460 | case 1: |
461 | tio_corelet_reset(cx_dev->cx_id.nasid, TIOCX_CORELET); | ||
462 | tiocx_reload(cx_dev); | ||
463 | break; | ||
464 | case 2: | ||
461 | tiocx_reload(cx_dev); | 465 | tiocx_reload(cx_dev); |
462 | break; | 466 | break; |
463 | case 3: | 467 | case 3: |
@@ -537,7 +541,7 @@ static void __exit tiocx_exit(void) | |||
537 | bus_unregister(&tiocx_bus_type); | 541 | bus_unregister(&tiocx_bus_type); |
538 | } | 542 | } |
539 | 543 | ||
540 | module_init(tiocx_init); | 544 | subsys_initcall(tiocx_init); |
541 | module_exit(tiocx_exit); | 545 | module_exit(tiocx_exit); |
542 | 546 | ||
543 | /************************************************************************ | 547 | /************************************************************************ |