aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-04-16 14:53:32 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2015-04-16 14:53:32 -0400
commitd19d5efd8c8840aa4f38a6dfbfe500d8cc27de46 (patch)
tree2e2f4f57de790c7de2ccd6d1afbec8695b2c7a46 /sound
parent34c9a0ffc75ad25b6a60f61e27c4a4b1189b8085 (diff)
parent2fe0753d49402aee325cc39c476b46fd51a8afec (diff)
Merge tag 'powerpc-4.1-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mpe/linux
Pull powerpc updates from Michael Ellerman: - Numerous minor fixes, cleanups etc. - More EEH work from Gavin to remove its dependency on device_nodes. - Memory hotplug implemented entirely in the kernel from Nathan Fontenot. - Removal of redundant CONFIG_PPC_OF by Kevin Hao. - Rewrite of VPHN parsing logic & tests from Greg Kurz. - A fix from Nish Aravamudan to reduce memory usage by clamping nodes_possible_map. - Support for pstore on powernv from Hari Bathini. - Removal of old powerpc specific byte swap routines by David Gibson. - Fix from Vasant Hegde to prevent the flash driver telling you it was flashing your firmware when it wasn't. - Patch from Ben Herrenschmidt to add an OPAL heartbeat driver. - Fix for an oops causing get/put_cpu_var() imbalance in perf by Jan Stancek. - Some fixes for migration from Tyrel Datwyler. - A new syscall to switch the cpu endian by Michael Ellerman. - Large series from Wei Yang to implement SRIOV, reviewed and acked by Bjorn. - A fix for the OPAL sensor driver from Cédric Le Goater. - Fixes to get STRICT_MM_TYPECHECKS building again by Michael Ellerman. - Large series from Daniel Axtens to make our PCI hooks per PHB rather than per machine. - Small patch from Sam Bobroff to explicitly abort non-suspended transactions on syscalls, plus a test to exercise it. - Numerous reworks and fixes for the 24x7 PMU from Sukadev Bhattiprolu. - Small patch to enable the hard lockup detector from Anton Blanchard. - Fix from Dave Olson for missing L2 cache information on some CPUs. - Some fixes from Michael Ellerman to get Cell machines booting again. - Freescale updates from Scott: Highlights include BMan device tree nodes, an MSI erratum workaround, a couple minor performance improvements, config updates, and misc fixes/cleanup. * tag 'powerpc-4.1-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mpe/linux: (196 commits) powerpc/powermac: Fix build error seen with powermac smp builds powerpc/pseries: Fix compile of memory hotplug without CONFIG_MEMORY_HOTREMOVE powerpc: Remove PPC32 code from pseries specific find_and_init_phbs() powerpc/cell: Fix iommu breakage caused by controller_ops change powerpc/eeh: Fix crash in eeh_add_device_early() on Cell powerpc/perf: Cap 64bit userspace backtraces to PERF_MAX_STACK_DEPTH powerpc/perf/hv-24x7: Fail 24x7 initcall if create_events_from_catalog() fails powerpc/pseries: Correct memory hotplug locking powerpc: Fix missing L2 cache size in /sys/devices/system/cpu powerpc: Add ppc64 hard lockup detector support oprofile: Disable oprofile NMI timer on ppc64 powerpc/perf/hv-24x7: Add missing put_cpu_var() powerpc/perf/hv-24x7: Break up single_24x7_request powerpc/perf/hv-24x7: Define update_event_count() powerpc/perf/hv-24x7: Whitespace cleanup powerpc/perf/hv-24x7: Define add_event_to_24x7_request() powerpc/perf/hv-24x7: Rename hv_24x7_event_update powerpc/perf/hv-24x7: Move debug prints to separate function powerpc/perf/hv-24x7: Drop event_24x7_request() powerpc/perf/hv-24x7: Use pr_devel() to log message ... Conflicts: tools/testing/selftests/powerpc/Makefile tools/testing/selftests/powerpc/tm/Makefile
Diffstat (limited to 'sound')
-rw-r--r--sound/ppc/pmac.c58
1 files changed, 29 insertions, 29 deletions
diff --git a/sound/ppc/pmac.c b/sound/ppc/pmac.c
index 13146d701413..0095a80a997f 100644
--- a/sound/ppc/pmac.c
+++ b/sound/ppc/pmac.c
@@ -240,7 +240,7 @@ static int snd_pmac_pcm_prepare(struct snd_pmac *chip, struct pmac_stream *rec,
240 */ 240 */
241 spin_lock_irq(&chip->reg_lock); 241 spin_lock_irq(&chip->reg_lock);
242 snd_pmac_dma_stop(rec); 242 snd_pmac_dma_stop(rec);
243 st_le16(&chip->extra_dma.cmds->command, DBDMA_STOP); 243 chip->extra_dma.cmds->command = cpu_to_le16(DBDMA_STOP);
244 snd_pmac_dma_set_command(rec, &chip->extra_dma); 244 snd_pmac_dma_set_command(rec, &chip->extra_dma);
245 snd_pmac_dma_run(rec, RUN); 245 snd_pmac_dma_run(rec, RUN);
246 spin_unlock_irq(&chip->reg_lock); 246 spin_unlock_irq(&chip->reg_lock);
@@ -251,15 +251,15 @@ static int snd_pmac_pcm_prepare(struct snd_pmac *chip, struct pmac_stream *rec,
251 */ 251 */
252 offset = runtime->dma_addr; 252 offset = runtime->dma_addr;
253 for (i = 0, cp = rec->cmd.cmds; i < rec->nperiods; i++, cp++) { 253 for (i = 0, cp = rec->cmd.cmds; i < rec->nperiods; i++, cp++) {
254 st_le32(&cp->phy_addr, offset); 254 cp->phy_addr = cpu_to_le32(offset);
255 st_le16(&cp->req_count, rec->period_size); 255 cp->req_count = cpu_to_le16(rec->period_size);
256 /*st_le16(&cp->res_count, 0);*/ 256 /*cp->res_count = cpu_to_le16(0);*/
257 st_le16(&cp->xfer_status, 0); 257 cp->xfer_status = cpu_to_le16(0);
258 offset += rec->period_size; 258 offset += rec->period_size;
259 } 259 }
260 /* make loop */ 260 /* make loop */
261 st_le16(&cp->command, DBDMA_NOP + BR_ALWAYS); 261 cp->command = cpu_to_le16(DBDMA_NOP + BR_ALWAYS);
262 st_le32(&cp->cmd_dep, rec->cmd.addr); 262 cp->cmd_dep = cpu_to_le32(rec->cmd.addr);
263 263
264 snd_pmac_dma_stop(rec); 264 snd_pmac_dma_stop(rec);
265 snd_pmac_dma_set_command(rec, &rec->cmd); 265 snd_pmac_dma_set_command(rec, &rec->cmd);
@@ -328,7 +328,7 @@ static snd_pcm_uframes_t snd_pmac_pcm_pointer(struct snd_pmac *chip,
328#if 1 /* hmm.. how can we get the current dma pointer?? */ 328#if 1 /* hmm.. how can we get the current dma pointer?? */
329 int stat; 329 int stat;
330 volatile struct dbdma_cmd __iomem *cp = &rec->cmd.cmds[rec->cur_period]; 330 volatile struct dbdma_cmd __iomem *cp = &rec->cmd.cmds[rec->cur_period];
331 stat = ld_le16(&cp->xfer_status); 331 stat = le16_to_cpu(cp->xfer_status);
332 if (stat & (ACTIVE|DEAD)) { 332 if (stat & (ACTIVE|DEAD)) {
333 count = in_le16(&cp->res_count); 333 count = in_le16(&cp->res_count);
334 if (count) 334 if (count)
@@ -427,26 +427,26 @@ static inline void snd_pmac_pcm_dead_xfer(struct pmac_stream *rec,
427 memcpy((void *)emergency_dbdma.cmds, (void *)cp, 427 memcpy((void *)emergency_dbdma.cmds, (void *)cp,
428 sizeof(struct dbdma_cmd)); 428 sizeof(struct dbdma_cmd));
429 emergency_in_use = 1; 429 emergency_in_use = 1;
430 st_le16(&cp->xfer_status, 0); 430 cp->xfer_status = cpu_to_le16(0);
431 st_le16(&cp->req_count, rec->period_size); 431 cp->req_count = cpu_to_le16(rec->period_size);
432 cp = emergency_dbdma.cmds; 432 cp = emergency_dbdma.cmds;
433 } 433 }
434 434
435 /* now bump the values to reflect the amount 435 /* now bump the values to reflect the amount
436 we haven't yet shifted */ 436 we haven't yet shifted */
437 req = ld_le16(&cp->req_count); 437 req = le16_to_cpu(cp->req_count);
438 res = ld_le16(&cp->res_count); 438 res = le16_to_cpu(cp->res_count);
439 phy = ld_le32(&cp->phy_addr); 439 phy = le32_to_cpu(cp->phy_addr);
440 phy += (req - res); 440 phy += (req - res);
441 st_le16(&cp->req_count, res); 441 cp->req_count = cpu_to_le16(res);
442 st_le16(&cp->res_count, 0); 442 cp->res_count = cpu_to_le16(0);
443 st_le16(&cp->xfer_status, 0); 443 cp->xfer_status = cpu_to_le16(0);
444 st_le32(&cp->phy_addr, phy); 444 cp->phy_addr = cpu_to_le32(phy);
445 445
446 st_le32(&cp->cmd_dep, rec->cmd.addr 446 cp->cmd_dep = cpu_to_le32(rec->cmd.addr
447 + sizeof(struct dbdma_cmd)*((rec->cur_period+1)%rec->nperiods)); 447 + sizeof(struct dbdma_cmd)*((rec->cur_period+1)%rec->nperiods));
448 448
449 st_le16(&cp->command, OUTPUT_MORE | BR_ALWAYS | INTR_ALWAYS); 449 cp->command = cpu_to_le16(OUTPUT_MORE | BR_ALWAYS | INTR_ALWAYS);
450 450
451 /* point at our patched up command block */ 451 /* point at our patched up command block */
452 out_le32(&rec->dma->cmdptr, emergency_dbdma.addr); 452 out_le32(&rec->dma->cmdptr, emergency_dbdma.addr);
@@ -475,7 +475,7 @@ static void snd_pmac_pcm_update(struct snd_pmac *chip, struct pmac_stream *rec)
475 else 475 else
476 cp = &rec->cmd.cmds[rec->cur_period]; 476 cp = &rec->cmd.cmds[rec->cur_period];
477 477
478 stat = ld_le16(&cp->xfer_status); 478 stat = le16_to_cpu(cp->xfer_status);
479 479
480 if (stat & DEAD) { 480 if (stat & DEAD) {
481 snd_pmac_pcm_dead_xfer(rec, cp); 481 snd_pmac_pcm_dead_xfer(rec, cp);
@@ -489,9 +489,9 @@ static void snd_pmac_pcm_update(struct snd_pmac *chip, struct pmac_stream *rec)
489 break; 489 break;
490 490
491 /*printk(KERN_DEBUG "update frag %d\n", rec->cur_period);*/ 491 /*printk(KERN_DEBUG "update frag %d\n", rec->cur_period);*/
492 st_le16(&cp->xfer_status, 0); 492 cp->xfer_status = cpu_to_le16(0);
493 st_le16(&cp->req_count, rec->period_size); 493 cp->req_count = cpu_to_le16(rec->period_size);
494 /*st_le16(&cp->res_count, 0);*/ 494 /*cp->res_count = cpu_to_le16(0);*/
495 rec->cur_period++; 495 rec->cur_period++;
496 if (rec->cur_period >= rec->nperiods) { 496 if (rec->cur_period >= rec->nperiods) {
497 rec->cur_period = 0; 497 rec->cur_period = 0;
@@ -760,11 +760,11 @@ void snd_pmac_beep_dma_start(struct snd_pmac *chip, int bytes, unsigned long add
760 struct pmac_stream *rec = &chip->playback; 760 struct pmac_stream *rec = &chip->playback;
761 761
762 snd_pmac_dma_stop(rec); 762 snd_pmac_dma_stop(rec);
763 st_le16(&chip->extra_dma.cmds->req_count, bytes); 763 chip->extra_dma.cmds->req_count = cpu_to_le16(bytes);
764 st_le16(&chip->extra_dma.cmds->xfer_status, 0); 764 chip->extra_dma.cmds->xfer_status = cpu_to_le16(0);
765 st_le32(&chip->extra_dma.cmds->cmd_dep, chip->extra_dma.addr); 765 chip->extra_dma.cmds->cmd_dep = cpu_to_le32(chip->extra_dma.addr);
766 st_le32(&chip->extra_dma.cmds->phy_addr, addr); 766 chip->extra_dma.cmds->phy_addr = cpu_to_le32(addr);
767 st_le16(&chip->extra_dma.cmds->command, OUTPUT_MORE + BR_ALWAYS); 767 chip->extra_dma.cmds->command = cpu_to_le16(OUTPUT_MORE + BR_ALWAYS);
768 out_le32(&chip->awacs->control, 768 out_le32(&chip->awacs->control,
769 (in_le32(&chip->awacs->control) & ~0x1f00) 769 (in_le32(&chip->awacs->control) & ~0x1f00)
770 | (speed << 8)); 770 | (speed << 8));
@@ -776,7 +776,7 @@ void snd_pmac_beep_dma_start(struct snd_pmac *chip, int bytes, unsigned long add
776void snd_pmac_beep_dma_stop(struct snd_pmac *chip) 776void snd_pmac_beep_dma_stop(struct snd_pmac *chip)
777{ 777{
778 snd_pmac_dma_stop(&chip->playback); 778 snd_pmac_dma_stop(&chip->playback);
779 st_le16(&chip->extra_dma.cmds->command, DBDMA_STOP); 779 chip->extra_dma.cmds->command = cpu_to_le16(DBDMA_STOP);
780 snd_pmac_pcm_set_format(chip); /* reset format */ 780 snd_pmac_pcm_set_format(chip); /* reset format */
781} 781}
782 782