Merge to Fedora kernel-2.6.7-1.492
[linux-2.6.git] / arch / ppc / 8xx_io / cs4218_tdm.c
index 99dfab8..8c7f28d 100644 (file)
@@ -2463,7 +2463,7 @@ static long long sound_lseek(struct file *file, long long offset, int orig)
 int __init tdm8xx_sound_init(void)
 {
        int i, has_sound;
-       uint                    dp_addr;
+       uint                    dp_addr, dp_mem;
        volatile uint           *sirp;
        volatile cbd_t          *bdp;
        volatile cpm8xx_t       *cp;
@@ -2525,14 +2525,15 @@ int __init tdm8xx_sound_init(void)
        /* We need to allocate a transmit and receive buffer
         * descriptors from dual port ram.
         */
-       dp_addr = m8xx_cpm_dpalloc(sizeof(cbd_t) * numReadBufs);
+       dp_mem = m8xx_cpm_dpalloc(sizeof(cbd_t) * numReadBufs);
+       dp_addr = m8xx_cpm_dpram_offset(dp_mem);
 
        /* Set the physical address of the host memory
         * buffers in the buffer descriptors, and the
         * virtual address for us to work with.
         */
        bdp = (cbd_t *)&cp->cp_dpmem[dp_addr];
-       up->smc_rbase = dp_addr;
+       up->smc_rbase = dp_mem;
        rx_cur = rx_base = (cbd_t *)bdp;
 
        for (i=0; i<(numReadBufs-1); i++) {
@@ -2547,10 +2548,11 @@ int __init tdm8xx_sound_init(void)
 
        /* Now, do the same for the transmit buffers.
        */
-       dp_addr = m8xx_cpm_dpalloc(sizeof(cbd_t) * numBufs);
+       dp_mem = m8xx_cpm_dpalloc(sizeof(cbd_t) * numBufs);
+       dp_addr = m8xx_cpm_dpram_offset(dp_mem);
 
        bdp = (cbd_t *)&cp->cp_dpmem[dp_addr];
-       up->smc_tbase = dp_addr;
+       up->smc_tbase = dp_mem;
        tx_cur = tx_base = (cbd_t *)bdp;
 
        for (i=0; i<(numBufs-1); i++) {