diff options
Diffstat (limited to 'sound/pci/ctxfi/cthw20k2.c')
-rw-r--r-- | sound/pci/ctxfi/cthw20k2.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/sound/pci/ctxfi/cthw20k2.c b/sound/pci/ctxfi/cthw20k2.c index 7c24c2ca96bd..349728765f2c 100644 --- a/sound/pci/ctxfi/cthw20k2.c +++ b/sound/pci/ctxfi/cthw20k2.c | |||
@@ -1203,19 +1203,10 @@ static int hw_trn_init(struct hw *hw, const struct trn_conf *info) | |||
1203 | } | 1203 | } |
1204 | 1204 | ||
1205 | vmctl = 0x80000C0F; /* 32-bit, 4k-size page */ | 1205 | vmctl = 0x80000C0F; /* 32-bit, 4k-size page */ |
1206 | #if BITS_PER_LONG == 64 | 1206 | ptp_phys_low = (u32)info->vm_pgt_phys; |
1207 | ptp_phys_low = info->vm_pgt_phys & ((1UL<<32)-1); | 1207 | ptp_phys_high = upper_32_bits(info->vm_pgt_phys); |
1208 | ptp_phys_high = (info->vm_pgt_phys>>32) & ((1UL<<32)-1); | 1208 | if (sizeof(void *) == 8) /* 64bit address */ |
1209 | vmctl |= (3<<8); | 1209 | vmctl |= (3 << 8); |
1210 | #elif BITS_PER_LONG == 32 | ||
1211 | ptp_phys_low = info->vm_pgt_phys & (~0UL); | ||
1212 | ptp_phys_high = 0; | ||
1213 | #else | ||
1214 | # error "Unknown BITS_PER_LONG!" | ||
1215 | #endif | ||
1216 | #if PAGE_SIZE == 8192 | ||
1217 | # error "Don't support 8k-page!" | ||
1218 | #endif | ||
1219 | /* Write page table physical address to all PTPAL registers */ | 1210 | /* Write page table physical address to all PTPAL registers */ |
1220 | for (i = 0; i < 64; i++) { | 1211 | for (i = 0; i < 64; i++) { |
1221 | hw_write_20kx(hw, VMEM_PTPAL+(16*i), ptp_phys_low); | 1212 | hw_write_20kx(hw, VMEM_PTPAL+(16*i), ptp_phys_low); |