diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-07 10:40:55 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-07 10:40:55 -0400 |
commit | 44d84afa834b799560d7dbe47250ad7557f5ca2f (patch) | |
tree | d18b90078503c956d32f9f0c6524bc43ece96b25 /drivers | |
parent | f8201abcb2badce7eaa6a3715f9a228cfd88a453 (diff) | |
parent | 11b55da700eb77905f1c2dde3a0cbeedc665a753 (diff) |
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (28 commits)
powerpc: Fix oops when loading modules
powerpc: Wire up preadv and pwritev
powerpc/ftrace: Fix printf format warning
powerpc/ftrace: Fix #if that should be #ifdef
powerpc: Fix ptrace compat wrapper for FPU register access
powerpc: Print information about mapping hw irqs to virtual irqs
powerpc: Correct dependency of KEXEC
powerpc: Disable VSX or current process in giveup_fpu/altivec
powerpc/pseries: Enable relay in pseries_defconfig
powerpc/pseries: Fix ibm,client-architecture comment
powerpc/pseries: Scan for all events in rtasd
powerpc/pseries: Add dispatch dispersion statistics
powerpc: Clean up some prom printouts
powerpc: Print progress of ibm,client-architecture method
powerpc: Remove duplicated #include's
powerpc/pmac: Fix internal modem IRQ on Wallstreet PowerBook
powerpc/wdrtas: Update wdrtas_get_interval to use rtas_data_buf
fsl-diu-fb: Pass the proper device for dma mapping routines
powerpc/pq2fads: Update device tree for use with device-tree-aware u-boot.
cpm_uart: Disable CPM udbg when re-initing CPM uart, even if not the console.
...
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/serial/cpm_uart/cpm_uart_core.c | 14 | ||||
-rw-r--r-- | drivers/serial/pmac_zilog.c | 15 | ||||
-rw-r--r-- | drivers/video/fsl-diu-fb.c | 34 | ||||
-rw-r--r-- | drivers/watchdog/wdrtas.c | 13 |
4 files changed, 54 insertions, 22 deletions
diff --git a/drivers/serial/cpm_uart/cpm_uart_core.c b/drivers/serial/cpm_uart/cpm_uart_core.c index 5c6ef51da274..f8df0681e160 100644 --- a/drivers/serial/cpm_uart/cpm_uart_core.c +++ b/drivers/serial/cpm_uart/cpm_uart_core.c | |||
@@ -1106,6 +1106,10 @@ static int cpm_uart_init_port(struct device_node *np, | |||
1106 | for (i = 0; i < NUM_GPIOS; i++) | 1106 | for (i = 0; i < NUM_GPIOS; i++) |
1107 | pinfo->gpios[i] = of_get_gpio(np, i); | 1107 | pinfo->gpios[i] = of_get_gpio(np, i); |
1108 | 1108 | ||
1109 | #ifdef CONFIG_PPC_EARLY_DEBUG_CPM | ||
1110 | udbg_putc = NULL; | ||
1111 | #endif | ||
1112 | |||
1109 | return cpm_uart_request_port(&pinfo->port); | 1113 | return cpm_uart_request_port(&pinfo->port); |
1110 | 1114 | ||
1111 | out_pram: | 1115 | out_pram: |
@@ -1255,10 +1259,6 @@ static int __init cpm_uart_console_setup(struct console *co, char *options) | |||
1255 | baud = 9600; | 1259 | baud = 9600; |
1256 | } | 1260 | } |
1257 | 1261 | ||
1258 | #ifdef CONFIG_PPC_EARLY_DEBUG_CPM | ||
1259 | udbg_putc = NULL; | ||
1260 | #endif | ||
1261 | |||
1262 | if (IS_SMC(pinfo)) { | 1262 | if (IS_SMC(pinfo)) { |
1263 | out_be16(&pinfo->smcup->smc_brkcr, 0); | 1263 | out_be16(&pinfo->smcup->smc_brkcr, 0); |
1264 | cpm_line_cr_cmd(pinfo, CPM_CR_STOP_TX); | 1264 | cpm_line_cr_cmd(pinfo, CPM_CR_STOP_TX); |
@@ -1339,13 +1339,13 @@ static int __devinit cpm_uart_probe(struct of_device *ofdev, | |||
1339 | 1339 | ||
1340 | dev_set_drvdata(&ofdev->dev, pinfo); | 1340 | dev_set_drvdata(&ofdev->dev, pinfo); |
1341 | 1341 | ||
1342 | /* initialize the device pointer for the port */ | ||
1343 | pinfo->port.dev = &ofdev->dev; | ||
1344 | |||
1342 | ret = cpm_uart_init_port(ofdev->node, pinfo); | 1345 | ret = cpm_uart_init_port(ofdev->node, pinfo); |
1343 | if (ret) | 1346 | if (ret) |
1344 | return ret; | 1347 | return ret; |
1345 | 1348 | ||
1346 | /* initialize the device pointer for the port */ | ||
1347 | pinfo->port.dev = &ofdev->dev; | ||
1348 | |||
1349 | return uart_add_one_port(&cpm_reg, &pinfo->port); | 1349 | return uart_add_one_port(&cpm_reg, &pinfo->port); |
1350 | } | 1350 | } |
1351 | 1351 | ||
diff --git a/drivers/serial/pmac_zilog.c b/drivers/serial/pmac_zilog.c index ad3488504010..9c1243fbd512 100644 --- a/drivers/serial/pmac_zilog.c +++ b/drivers/serial/pmac_zilog.c | |||
@@ -1538,6 +1538,21 @@ no_dma: | |||
1538 | uap->port.type = PORT_PMAC_ZILOG; | 1538 | uap->port.type = PORT_PMAC_ZILOG; |
1539 | uap->port.flags = 0; | 1539 | uap->port.flags = 0; |
1540 | 1540 | ||
1541 | /* | ||
1542 | * Fixup for the port on Gatwick for which the device-tree has | ||
1543 | * missing interrupts. Normally, the macio_dev would contain | ||
1544 | * fixed up interrupt info, but we use the device-tree directly | ||
1545 | * here due to early probing so we need the fixup too. | ||
1546 | */ | ||
1547 | if (uap->port.irq == NO_IRQ && | ||
1548 | np->parent && np->parent->parent && | ||
1549 | of_device_is_compatible(np->parent->parent, "gatwick")) { | ||
1550 | /* IRQs on gatwick are offset by 64 */ | ||
1551 | uap->port.irq = irq_create_mapping(NULL, 64 + 15); | ||
1552 | uap->tx_dma_irq = irq_create_mapping(NULL, 64 + 4); | ||
1553 | uap->rx_dma_irq = irq_create_mapping(NULL, 64 + 5); | ||
1554 | } | ||
1555 | |||
1541 | /* Setup some valid baud rate information in the register | 1556 | /* Setup some valid baud rate information in the register |
1542 | * shadows so we don't write crap there before baud rate is | 1557 | * shadows so we don't write crap there before baud rate is |
1543 | * first initialized. | 1558 | * first initialized. |
diff --git a/drivers/video/fsl-diu-fb.c b/drivers/video/fsl-diu-fb.c index fb51197d1c98..f153c581cbd7 100644 --- a/drivers/video/fsl-diu-fb.c +++ b/drivers/video/fsl-diu-fb.c | |||
@@ -1352,14 +1352,15 @@ static int fsl_diu_resume(struct of_device *ofdev) | |||
1352 | #endif /* CONFIG_PM */ | 1352 | #endif /* CONFIG_PM */ |
1353 | 1353 | ||
1354 | /* Align to 64-bit(8-byte), 32-byte, etc. */ | 1354 | /* Align to 64-bit(8-byte), 32-byte, etc. */ |
1355 | static int allocate_buf(struct diu_addr *buf, u32 size, u32 bytes_align) | 1355 | static int allocate_buf(struct device *dev, struct diu_addr *buf, u32 size, |
1356 | u32 bytes_align) | ||
1356 | { | 1357 | { |
1357 | u32 offset, ssize; | 1358 | u32 offset, ssize; |
1358 | u32 mask; | 1359 | u32 mask; |
1359 | dma_addr_t paddr = 0; | 1360 | dma_addr_t paddr = 0; |
1360 | 1361 | ||
1361 | ssize = size + bytes_align; | 1362 | ssize = size + bytes_align; |
1362 | buf->vaddr = dma_alloc_coherent(NULL, ssize, &paddr, GFP_DMA | | 1363 | buf->vaddr = dma_alloc_coherent(dev, ssize, &paddr, GFP_DMA | |
1363 | __GFP_ZERO); | 1364 | __GFP_ZERO); |
1364 | if (!buf->vaddr) | 1365 | if (!buf->vaddr) |
1365 | return -ENOMEM; | 1366 | return -ENOMEM; |
@@ -1376,9 +1377,10 @@ static int allocate_buf(struct diu_addr *buf, u32 size, u32 bytes_align) | |||
1376 | return 0; | 1377 | return 0; |
1377 | } | 1378 | } |
1378 | 1379 | ||
1379 | static void free_buf(struct diu_addr *buf, u32 size, u32 bytes_align) | 1380 | static void free_buf(struct device *dev, struct diu_addr *buf, u32 size, |
1381 | u32 bytes_align) | ||
1380 | { | 1382 | { |
1381 | dma_free_coherent(NULL, size + bytes_align, | 1383 | dma_free_coherent(dev, size + bytes_align, |
1382 | buf->vaddr, (buf->paddr - buf->offset)); | 1384 | buf->vaddr, (buf->paddr - buf->offset)); |
1383 | return; | 1385 | return; |
1384 | } | 1386 | } |
@@ -1476,17 +1478,19 @@ static int __devinit fsl_diu_probe(struct of_device *ofdev, | |||
1476 | machine_data->monitor_port = monitor_port; | 1478 | machine_data->monitor_port = monitor_port; |
1477 | 1479 | ||
1478 | /* Area descriptor memory pool aligns to 64-bit boundary */ | 1480 | /* Area descriptor memory pool aligns to 64-bit boundary */ |
1479 | if (allocate_buf(&pool.ad, sizeof(struct diu_ad) * FSL_AOI_NUM, 8)) | 1481 | if (allocate_buf(&ofdev->dev, &pool.ad, |
1482 | sizeof(struct diu_ad) * FSL_AOI_NUM, 8)) | ||
1480 | return -ENOMEM; | 1483 | return -ENOMEM; |
1481 | 1484 | ||
1482 | /* Get memory for Gamma Table - 32-byte aligned memory */ | 1485 | /* Get memory for Gamma Table - 32-byte aligned memory */ |
1483 | if (allocate_buf(&pool.gamma, 768, 32)) { | 1486 | if (allocate_buf(&ofdev->dev, &pool.gamma, 768, 32)) { |
1484 | ret = -ENOMEM; | 1487 | ret = -ENOMEM; |
1485 | goto error; | 1488 | goto error; |
1486 | } | 1489 | } |
1487 | 1490 | ||
1488 | /* For performance, cursor bitmap buffer aligns to 32-byte boundary */ | 1491 | /* For performance, cursor bitmap buffer aligns to 32-byte boundary */ |
1489 | if (allocate_buf(&pool.cursor, MAX_CURS * MAX_CURS * 2, 32)) { | 1492 | if (allocate_buf(&ofdev->dev, &pool.cursor, MAX_CURS * MAX_CURS * 2, |
1493 | 32)) { | ||
1490 | ret = -ENOMEM; | 1494 | ret = -ENOMEM; |
1491 | goto error; | 1495 | goto error; |
1492 | } | 1496 | } |
@@ -1554,11 +1558,13 @@ error: | |||
1554 | i > 0; i--) | 1558 | i > 0; i--) |
1555 | uninstall_fb(machine_data->fsl_diu_info[i - 1]); | 1559 | uninstall_fb(machine_data->fsl_diu_info[i - 1]); |
1556 | if (pool.ad.vaddr) | 1560 | if (pool.ad.vaddr) |
1557 | free_buf(&pool.ad, sizeof(struct diu_ad) * FSL_AOI_NUM, 8); | 1561 | free_buf(&ofdev->dev, &pool.ad, |
1562 | sizeof(struct diu_ad) * FSL_AOI_NUM, 8); | ||
1558 | if (pool.gamma.vaddr) | 1563 | if (pool.gamma.vaddr) |
1559 | free_buf(&pool.gamma, 768, 32); | 1564 | free_buf(&ofdev->dev, &pool.gamma, 768, 32); |
1560 | if (pool.cursor.vaddr) | 1565 | if (pool.cursor.vaddr) |
1561 | free_buf(&pool.cursor, MAX_CURS * MAX_CURS * 2, 32); | 1566 | free_buf(&ofdev->dev, &pool.cursor, MAX_CURS * MAX_CURS * 2, |
1567 | 32); | ||
1562 | if (machine_data->dummy_aoi_virt) | 1568 | if (machine_data->dummy_aoi_virt) |
1563 | fsl_diu_free(machine_data->dummy_aoi_virt, 64); | 1569 | fsl_diu_free(machine_data->dummy_aoi_virt, 64); |
1564 | iounmap(dr.diu_reg); | 1570 | iounmap(dr.diu_reg); |
@@ -1584,11 +1590,13 @@ static int fsl_diu_remove(struct of_device *ofdev) | |||
1584 | for (i = ARRAY_SIZE(machine_data->fsl_diu_info); i > 0; i--) | 1590 | for (i = ARRAY_SIZE(machine_data->fsl_diu_info); i > 0; i--) |
1585 | uninstall_fb(machine_data->fsl_diu_info[i - 1]); | 1591 | uninstall_fb(machine_data->fsl_diu_info[i - 1]); |
1586 | if (pool.ad.vaddr) | 1592 | if (pool.ad.vaddr) |
1587 | free_buf(&pool.ad, sizeof(struct diu_ad) * FSL_AOI_NUM, 8); | 1593 | free_buf(&ofdev->dev, &pool.ad, |
1594 | sizeof(struct diu_ad) * FSL_AOI_NUM, 8); | ||
1588 | if (pool.gamma.vaddr) | 1595 | if (pool.gamma.vaddr) |
1589 | free_buf(&pool.gamma, 768, 32); | 1596 | free_buf(&ofdev->dev, &pool.gamma, 768, 32); |
1590 | if (pool.cursor.vaddr) | 1597 | if (pool.cursor.vaddr) |
1591 | free_buf(&pool.cursor, MAX_CURS * MAX_CURS * 2, 32); | 1598 | free_buf(&ofdev->dev, &pool.cursor, MAX_CURS * MAX_CURS * 2, |
1599 | 32); | ||
1592 | if (machine_data->dummy_aoi_virt) | 1600 | if (machine_data->dummy_aoi_virt) |
1593 | fsl_diu_free(machine_data->dummy_aoi_virt, 64); | 1601 | fsl_diu_free(machine_data->dummy_aoi_virt, 64); |
1594 | iounmap(dr.diu_reg); | 1602 | iounmap(dr.diu_reg); |
diff --git a/drivers/watchdog/wdrtas.c b/drivers/watchdog/wdrtas.c index 5d3b1a8e28b0..a38fa4907c92 100644 --- a/drivers/watchdog/wdrtas.c +++ b/drivers/watchdog/wdrtas.c | |||
@@ -106,6 +106,8 @@ static int wdrtas_set_interval(int interval) | |||
106 | return result; | 106 | return result; |
107 | } | 107 | } |
108 | 108 | ||
109 | #define WDRTAS_SP_SPI_LEN 4 | ||
110 | |||
109 | /** | 111 | /** |
110 | * wdrtas_get_interval - returns the current watchdog interval | 112 | * wdrtas_get_interval - returns the current watchdog interval |
111 | * @fallback_value: value (in seconds) to use, if the RTAS call fails | 113 | * @fallback_value: value (in seconds) to use, if the RTAS call fails |
@@ -119,10 +121,17 @@ static int wdrtas_set_interval(int interval) | |||
119 | static int wdrtas_get_interval(int fallback_value) | 121 | static int wdrtas_get_interval(int fallback_value) |
120 | { | 122 | { |
121 | long result; | 123 | long result; |
122 | char value[4]; | 124 | char value[WDRTAS_SP_SPI_LEN]; |
123 | 125 | ||
126 | spin_lock(&rtas_data_buf_lock); | ||
127 | memset(rtas_data_buf, 0, WDRTAS_SP_SPI_LEN); | ||
124 | result = rtas_call(wdrtas_token_get_sp, 3, 1, NULL, | 128 | result = rtas_call(wdrtas_token_get_sp, 3, 1, NULL, |
125 | WDRTAS_SP_SPI, (void *)__pa(&value), 4); | 129 | WDRTAS_SP_SPI, __pa(rtas_data_buf), |
130 | WDRTAS_SP_SPI_LEN); | ||
131 | |||
132 | memcpy(value, rtas_data_buf, WDRTAS_SP_SPI_LEN); | ||
133 | spin_unlock(&rtas_data_buf_lock); | ||
134 | |||
126 | if (value[0] != 0 || value[1] != 2 || value[3] != 0 || result < 0) { | 135 | if (value[0] != 0 || value[1] != 2 || value[3] != 0 || result < 0) { |
127 | printk(KERN_WARNING "wdrtas: could not get sp_spi watchdog " | 136 | printk(KERN_WARNING "wdrtas: could not get sp_spi watchdog " |
128 | "timeout (%li). Continuing\n", result); | 137 | "timeout (%li). Continuing\n", result); |