aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorAlexander Viro <viro@parcelfarce.linux.theplanet.co.uk>2004-11-27 00:24:18 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-11-27 00:24:18 -0800
commit969baba1ad6f78e8e3fb6156d554bc0896aa85c0 (patch)
tree00d4c0a2bab9fbc808ebbc9098df937b5ba879a6 /sound
parent2f03b37506a65f04ef9eb045c2b5763bb1fa7511 (diff)
downloadhistory-969baba1ad6f78e8e3fb6156d554bc0896aa85c0.tar.gz
[PATCH] pmac sound iomem annotations
Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/oss/dmasound/dmasound_awacs.c34
-rw-r--r--sound/ppc/pmac.c27
-rw-r--r--sound/ppc/pmac.h10
3 files changed, 33 insertions, 38 deletions
diff --git a/sound/oss/dmasound/dmasound_awacs.c b/sound/oss/dmasound/dmasound_awacs.c
index a76352597c2a91..89f52a7d466a1d 100644
--- a/sound/oss/dmasound/dmasound_awacs.c
+++ b/sound/oss/dmasound/dmasound_awacs.c
@@ -118,9 +118,9 @@
* Interrupt numbers and addresses, & info obtained from the device tree.
*/
static int awacs_irq, awacs_tx_irq, awacs_rx_irq;
-static volatile struct awacs_regs *awacs;
-static volatile u32 *i2s;
-static volatile struct dbdma_regs *awacs_txdma, *awacs_rxdma;
+static volatile struct awacs_regs __iomem *awacs;
+static volatile u32 __iomem *i2s;
+static volatile struct dbdma_regs __iomem *awacs_txdma, *awacs_rxdma;
static int awacs_rate_index;
static int awacs_subframe;
static struct device_node* awacs_node;
@@ -146,8 +146,8 @@ static int has_ziva;
/* for earlier powerbooks which need fiddling with mac-io to enable
* cd etc.
*/
-static unsigned char *latch_base;
-static unsigned char *macio_base;
+static unsigned char __iomem *latch_base;
+static unsigned char __iomem *macio_base;
/*
* Space for the DBDMA command blocks.
@@ -661,11 +661,11 @@ static void PMacIrqCleanup(void)
free_irq(awacs_rx_irq, NULL);
if (awacs)
- iounmap((void *)awacs);
+ iounmap(awacs);
if (i2s)
- iounmap((void *)i2s);
- iounmap((void *)awacs_txdma);
- iounmap((void *)awacs_rxdma);
+ iounmap(i2s);
+ iounmap(awacs_txdma);
+ iounmap(awacs_rxdma);
release_OF_resource(awacs_node, 0);
release_OF_resource(awacs_node, 1);
@@ -2915,14 +2915,11 @@ printk("dmasound_pmac: couldn't find a Codec we can handle\n");
/* all OF versions I've seen use this value */
if (i2s_node)
- i2s = (u32 *)ioremap(io->addrs[0].address, 0x1000);
+ i2s = ioremap(io->addrs[0].address, 0x1000);
else
- awacs = (volatile struct awacs_regs *)
- ioremap(io->addrs[0].address, 0x1000);
- awacs_txdma = (volatile struct dbdma_regs *)
- ioremap(io->addrs[1].address, 0x100);
- awacs_rxdma = (volatile struct dbdma_regs *)
- ioremap(io->addrs[2].address, 0x100);
+ awacs = ioremap(io->addrs[0].address, 0x1000);
+ awacs_txdma = ioremap(io->addrs[1].address, 0x100);
+ awacs_rxdma = ioremap(io->addrs[2].address, 0x100);
/* first of all make sure that the chip is powered up....*/
pmac_call_feature(PMAC_FTR_SOUND_CHIP_ENABLE, io, 0, 1);
@@ -3075,7 +3072,7 @@ printk("dmasound_pmac: Awacs/Screamer Codec Mfct: %d Rev %d\n", mfg, rev);
* sound input. The 0x100 enables the SCSI bus
* terminator power.
*/
- latch_base = (unsigned char *) ioremap (0xf301a000, 0x1000);
+ latch_base = ioremap (0xf301a000, 0x1000);
in_8(latch_base + 0x190);
} else if (is_pbook_g3) {
@@ -3084,8 +3081,7 @@ printk("dmasound_pmac: Awacs/Screamer Codec Mfct: %d Rev %d\n", mfg, rev);
for (mio = io->parent; mio; mio = mio->parent) {
if (strcmp(mio->name, "mac-io") == 0
&& mio->n_addrs > 0) {
- macio_base = (unsigned char *) ioremap
- (mio->addrs[0].address, 0x40);
+ macio_base = ioremap(mio->addrs[0].address, 0x40);
break;
}
}
diff --git a/sound/ppc/pmac.c b/sound/ppc/pmac.c
index 3e44a6a7d1494a..e9596dffa9ee42 100644
--- a/sound/ppc/pmac.c
+++ b/sound/ppc/pmac.c
@@ -64,7 +64,7 @@ static int snd_pmac_dbdma_alloc(pmac_dbdma_t *rec, int size)
return -ENOMEM;
rec->size = size;
memset(rec->space, 0, sizeof(struct dbdma_cmd) * (size + 1));
- rec->cmds = (void*)DBDMA_ALIGN(rec->space);
+ rec->cmds = (void __iomem *)DBDMA_ALIGN(rec->space);
rec->addr = virt_to_bus(rec->cmds);
return 0;
}
@@ -200,7 +200,7 @@ inline static void snd_pmac_dma_run(pmac_stream_t *rec, int status)
static int snd_pmac_pcm_prepare(pmac_t *chip, pmac_stream_t *rec, snd_pcm_substream_t *subs)
{
int i;
- volatile struct dbdma_cmd *cp;
+ volatile struct dbdma_cmd __iomem *cp;
snd_pcm_runtime_t *runtime = subs->runtime;
int rate_index;
long offset;
@@ -263,7 +263,7 @@ static int snd_pmac_pcm_prepare(pmac_t *chip, pmac_stream_t *rec, snd_pcm_substr
static int snd_pmac_pcm_trigger(pmac_t *chip, pmac_stream_t *rec,
snd_pcm_substream_t *subs, int cmd)
{
- volatile struct dbdma_cmd *cp;
+ volatile struct dbdma_cmd __iomem *cp;
int i, command;
switch (cmd) {
@@ -314,7 +314,7 @@ static snd_pcm_uframes_t snd_pmac_pcm_pointer(pmac_t *chip, pmac_stream_t *rec,
#if 1 /* hmm.. how can we get the current dma pointer?? */
int stat;
- volatile struct dbdma_cmd *cp = &rec->cmd.cmds[rec->cur_period];
+ volatile struct dbdma_cmd __iomem *cp = &rec->cmd.cmds[rec->cur_period];
stat = ld_le16(&cp->xfer_status);
if (stat & (ACTIVE|DEAD)) {
count = in_le16(&cp->res_count);
@@ -379,7 +379,7 @@ static snd_pcm_uframes_t snd_pmac_capture_pointer(snd_pcm_substream_t *subs)
*/
static void snd_pmac_pcm_update(pmac_t *chip, pmac_stream_t *rec)
{
- volatile struct dbdma_cmd *cp;
+ volatile struct dbdma_cmd __iomem *cp;
int c;
int stat;
@@ -818,11 +818,11 @@ static int snd_pmac_free(pmac_t *chip)
if (chip->latch_base)
iounmap(chip->latch_base);
if (chip->awacs)
- iounmap((void*)chip->awacs);
+ iounmap(chip->awacs);
if (chip->playback.dma)
- iounmap((void*)chip->playback.dma);
+ iounmap(chip->playback.dma);
if (chip->capture.dma)
- iounmap((void*)chip->capture.dma);
+ iounmap(chip->capture.dma);
if (chip->node) {
for (i = 0; i < 3; i++) {
if (chip->of_requested & (1 << i))
@@ -1133,9 +1133,9 @@ int __init snd_pmac_new(snd_card_t *card, pmac_t **chip_return)
chip->of_requested |= (1 << i);
}
- chip->awacs = (volatile struct awacs_regs *) ioremap(np->addrs[0].address, 0x1000);
- chip->playback.dma = (volatile struct dbdma_regs *) ioremap(np->addrs[1].address, 0x100);
- chip->capture.dma = (volatile struct dbdma_regs *) ioremap(np->addrs[2].address, 0x100);
+ chip->awacs = ioremap(np->addrs[0].address, 0x1000);
+ chip->playback.dma = ioremap(np->addrs[1].address, 0x100);
+ chip->capture.dma = ioremap(np->addrs[2].address, 0x100);
if (chip->model <= PMAC_BURGUNDY) {
if (request_irq(np->intrs[0].line, snd_pmac_ctrl_intr, 0,
"PMac", (void*)chip)) {
@@ -1176,15 +1176,14 @@ int __init snd_pmac_new(snd_card_t *card, pmac_t **chip_return)
* sound input. The 0x100 enables the SCSI bus
* terminator power.
*/
- chip->latch_base = (unsigned char *) ioremap (0xf301a000, 0x1000);
+ chip->latch_base = ioremap (0xf301a000, 0x1000);
in_8(chip->latch_base + 0x190);
} else if (chip->is_pbook_G3) {
struct device_node* mio;
for (mio = chip->node->parent; mio; mio = mio->parent) {
if (strcmp(mio->name, "mac-io") == 0
&& mio->n_addrs > 0) {
- chip->macio_base = (unsigned char *) ioremap
- (mio->addrs[0].address, 0x40);
+ chip->macio_base = ioremap(mio->addrs[0].address, 0x40);
break;
}
}
diff --git a/sound/ppc/pmac.h b/sound/ppc/pmac.h
index 7b14906cef0e00..a699b01210ee11 100644
--- a/sound/ppc/pmac.h
+++ b/sound/ppc/pmac.h
@@ -61,7 +61,7 @@ typedef struct snd_pmac_dbdma pmac_dbdma_t;
*/
struct snd_pmac_dbdma {
unsigned long addr;
- struct dbdma_cmd *cmds;
+ struct dbdma_cmd __iomem *cmds;
void *space;
int size;
};
@@ -80,7 +80,7 @@ struct snd_pmac_stream {
int nperiods, cur_period;
pmac_dbdma_t cmd;
- volatile struct dbdma_regs *dma;
+ volatile struct dbdma_regs __iomem *dma;
snd_pcm_substream_t *substream;
@@ -130,12 +130,12 @@ struct snd_pmac {
int format; /* current format */
spinlock_t reg_lock;
- volatile struct awacs_regs *awacs;
+ volatile struct awacs_regs __iomem *awacs;
int awacs_reg[8]; /* register cache */
unsigned int hp_stat_mask;
- unsigned char *latch_base;
- unsigned char *macio_base;
+ unsigned char __iomem *latch_base;
+ unsigned char __iomem *macio_base;
pmac_stream_t playback;
pmac_stream_t capture;