aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2014-06-26 11:54:37 -0400
committerTakashi Iwai <tiwai@suse.de>2014-06-26 12:00:02 -0400
commitfb1d8ac29971fc48144abe5bc760f9eb3e537b9f (patch)
tree8720c2fb077f1aba0698fe2c765e3d1b8046b56b /sound/pci
parentc6bf1d8e8c08d37d42a3a96606470fc012cc30e7 (diff)
ALSA: hda - Replace ICH6_ prefix
ICH6_ prefix doesn't mean that it's specific to ICH6 chipset but rather its generic for all HD-audio (or "Azalia") devices. Use AZX_ prefix instead to align with other constants. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/hda/hda_controller.c47
-rw-r--r--sound/pci/hda/hda_intel.c12
-rw-r--r--sound/pci/hda/hda_priv.h172
3 files changed, 115 insertions, 116 deletions
diff --git a/sound/pci/hda/hda_controller.c b/sound/pci/hda/hda_controller.c
index 8d9398a4c7c9..06f39c126ba4 100644
--- a/sound/pci/hda/hda_controller.c
+++ b/sound/pci/hda/hda_controller.c
@@ -155,9 +155,9 @@ static int azx_setup_controller(struct azx *chip, struct azx_dev *azx_dev)
155 /* enable the position buffer */ 155 /* enable the position buffer */
156 if (chip->get_position[0] != azx_get_pos_lpib || 156 if (chip->get_position[0] != azx_get_pos_lpib ||
157 chip->get_position[1] != azx_get_pos_lpib) { 157 chip->get_position[1] != azx_get_pos_lpib) {
158 if (!(azx_readl(chip, DPLBASE) & ICH6_DPLBASE_ENABLE)) 158 if (!(azx_readl(chip, DPLBASE) & AZX_DPLBASE_ENABLE))
159 azx_writel(chip, DPLBASE, 159 azx_writel(chip, DPLBASE,
160 (u32)chip->posbuf.addr | ICH6_DPLBASE_ENABLE); 160 (u32)chip->posbuf.addr | AZX_DPLBASE_ENABLE);
161 } 161 }
162 162
163 /* set the interrupt enable bits in the descriptor control register */ 163 /* set the interrupt enable bits in the descriptor control register */
@@ -975,10 +975,10 @@ static void azx_init_cmd_io(struct azx *chip)
975 azx_writew(chip, CORBWP, 0); 975 azx_writew(chip, CORBWP, 0);
976 976
977 /* reset the corb hw read pointer */ 977 /* reset the corb hw read pointer */
978 azx_writew(chip, CORBRP, ICH6_CORBRP_RST); 978 azx_writew(chip, CORBRP, AZX_CORBRP_RST);
979 if (!(chip->driver_caps & AZX_DCAPS_CORBRP_SELF_CLEAR)) { 979 if (!(chip->driver_caps & AZX_DCAPS_CORBRP_SELF_CLEAR)) {
980 for (timeout = 1000; timeout > 0; timeout--) { 980 for (timeout = 1000; timeout > 0; timeout--) {
981 if ((azx_readw(chip, CORBRP) & ICH6_CORBRP_RST) == ICH6_CORBRP_RST) 981 if ((azx_readw(chip, CORBRP) & AZX_CORBRP_RST) == AZX_CORBRP_RST)
982 break; 982 break;
983 udelay(1); 983 udelay(1);
984 } 984 }
@@ -998,7 +998,7 @@ static void azx_init_cmd_io(struct azx *chip)
998 } 998 }
999 999
1000 /* enable corb dma */ 1000 /* enable corb dma */
1001 azx_writeb(chip, CORBCTL, ICH6_CORBCTL_RUN); 1001 azx_writeb(chip, CORBCTL, AZX_CORBCTL_RUN);
1002 1002
1003 /* RIRB set up */ 1003 /* RIRB set up */
1004 chip->rirb.addr = chip->rb.addr + 2048; 1004 chip->rirb.addr = chip->rb.addr + 2048;
@@ -1011,14 +1011,14 @@ static void azx_init_cmd_io(struct azx *chip)
1011 /* set the rirb size to 256 entries (ULI requires explicitly) */ 1011 /* set the rirb size to 256 entries (ULI requires explicitly) */
1012 azx_writeb(chip, RIRBSIZE, 0x02); 1012 azx_writeb(chip, RIRBSIZE, 0x02);
1013 /* reset the rirb hw write pointer */ 1013 /* reset the rirb hw write pointer */
1014 azx_writew(chip, RIRBWP, ICH6_RIRBWP_RST); 1014 azx_writew(chip, RIRBWP, AZX_RIRBWP_RST);
1015 /* set N=1, get RIRB response interrupt for new entry */ 1015 /* set N=1, get RIRB response interrupt for new entry */
1016 if (chip->driver_caps & AZX_DCAPS_CTX_WORKAROUND) 1016 if (chip->driver_caps & AZX_DCAPS_CTX_WORKAROUND)
1017 azx_writew(chip, RINTCNT, 0xc0); 1017 azx_writew(chip, RINTCNT, 0xc0);
1018 else 1018 else
1019 azx_writew(chip, RINTCNT, 1); 1019 azx_writew(chip, RINTCNT, 1);
1020 /* enable rirb dma and response irq */ 1020 /* enable rirb dma and response irq */
1021 azx_writeb(chip, RIRBCTL, ICH6_RBCTL_DMA_EN | ICH6_RBCTL_IRQ_EN); 1021 azx_writeb(chip, RIRBCTL, AZX_RBCTL_DMA_EN | AZX_RBCTL_IRQ_EN);
1022 spin_unlock_irq(&chip->reg_lock); 1022 spin_unlock_irq(&chip->reg_lock);
1023} 1023}
1024EXPORT_SYMBOL_GPL(azx_init_cmd_io); 1024EXPORT_SYMBOL_GPL(azx_init_cmd_io);
@@ -1062,7 +1062,7 @@ static int azx_corb_send_cmd(struct hda_bus *bus, u32 val)
1062 return -EIO; 1062 return -EIO;
1063 } 1063 }
1064 wp++; 1064 wp++;
1065 wp %= ICH6_MAX_CORB_ENTRIES; 1065 wp %= AZX_MAX_CORB_ENTRIES;
1066 1066
1067 rp = azx_readw(chip, CORBRP); 1067 rp = azx_readw(chip, CORBRP);
1068 if (wp == rp) { 1068 if (wp == rp) {
@@ -1080,7 +1080,7 @@ static int azx_corb_send_cmd(struct hda_bus *bus, u32 val)
1080 return 0; 1080 return 0;
1081} 1081}
1082 1082
1083#define ICH6_RIRB_EX_UNSOL_EV (1<<4) 1083#define AZX_RIRB_EX_UNSOL_EV (1<<4)
1084 1084
1085/* retrieve RIRB entry - called from interrupt handler */ 1085/* retrieve RIRB entry - called from interrupt handler */
1086static void azx_update_rirb(struct azx *chip) 1086static void azx_update_rirb(struct azx *chip)
@@ -1101,7 +1101,7 @@ static void azx_update_rirb(struct azx *chip)
1101 1101
1102 while (chip->rirb.rp != wp) { 1102 while (chip->rirb.rp != wp) {
1103 chip->rirb.rp++; 1103 chip->rirb.rp++;
1104 chip->rirb.rp %= ICH6_MAX_RIRB_ENTRIES; 1104 chip->rirb.rp %= AZX_MAX_RIRB_ENTRIES;
1105 1105
1106 rp = chip->rirb.rp << 1; /* an RIRB entry is 8-bytes */ 1106 rp = chip->rirb.rp << 1; /* an RIRB entry is 8-bytes */
1107 res_ex = le32_to_cpu(chip->rirb.buf[rp + 1]); 1107 res_ex = le32_to_cpu(chip->rirb.buf[rp + 1]);
@@ -1112,8 +1112,7 @@ static void azx_update_rirb(struct azx *chip)
1112 res, res_ex, 1112 res, res_ex,
1113 chip->rirb.rp, wp); 1113 chip->rirb.rp, wp);
1114 snd_BUG(); 1114 snd_BUG();
1115 } 1115 } else if (res_ex & AZX_RIRB_EX_UNSOL_EV)
1116 else if (res_ex & ICH6_RIRB_EX_UNSOL_EV)
1117 snd_hda_queue_unsol_event(chip->bus, res, res_ex); 1116 snd_hda_queue_unsol_event(chip->bus, res, res_ex);
1118 else if (chip->rirb.cmds[addr]) { 1117 else if (chip->rirb.cmds[addr]) {
1119 chip->rirb.res[addr] = res; 1118 chip->rirb.res[addr] = res;
@@ -1221,7 +1220,7 @@ static unsigned int azx_rirb_get_response(struct hda_bus *bus,
1221 /* release CORB/RIRB */ 1220 /* release CORB/RIRB */
1222 azx_free_cmd_io(chip); 1221 azx_free_cmd_io(chip);
1223 /* disable unsolicited responses */ 1222 /* disable unsolicited responses */
1224 azx_writel(chip, GCTL, azx_readl(chip, GCTL) & ~ICH6_GCTL_UNSOL); 1223 azx_writel(chip, GCTL, azx_readl(chip, GCTL) & ~AZX_GCTL_UNSOL);
1225 return -1; 1224 return -1;
1226} 1225}
1227 1226
@@ -1242,7 +1241,7 @@ static int azx_single_wait_for_response(struct azx *chip, unsigned int addr)
1242 1241
1243 while (timeout--) { 1242 while (timeout--) {
1244 /* check IRV busy bit */ 1243 /* check IRV busy bit */
1245 if (azx_readw(chip, IRS) & ICH6_IRS_VALID) { 1244 if (azx_readw(chip, IRS) & AZX_IRS_VALID) {
1246 /* reuse rirb.res as the response return value */ 1245 /* reuse rirb.res as the response return value */
1247 chip->rirb.res[addr] = azx_readl(chip, IR); 1246 chip->rirb.res[addr] = azx_readl(chip, IR);
1248 return 0; 1247 return 0;
@@ -1266,13 +1265,13 @@ static int azx_single_send_cmd(struct hda_bus *bus, u32 val)
1266 bus->rirb_error = 0; 1265 bus->rirb_error = 0;
1267 while (timeout--) { 1266 while (timeout--) {
1268 /* check ICB busy bit */ 1267 /* check ICB busy bit */
1269 if (!((azx_readw(chip, IRS) & ICH6_IRS_BUSY))) { 1268 if (!((azx_readw(chip, IRS) & AZX_IRS_BUSY))) {
1270 /* Clear IRV valid bit */ 1269 /* Clear IRV valid bit */
1271 azx_writew(chip, IRS, azx_readw(chip, IRS) | 1270 azx_writew(chip, IRS, azx_readw(chip, IRS) |
1272 ICH6_IRS_VALID); 1271 AZX_IRS_VALID);
1273 azx_writel(chip, IC, val); 1272 azx_writel(chip, IC, val);
1274 azx_writew(chip, IRS, azx_readw(chip, IRS) | 1273 azx_writew(chip, IRS, azx_readw(chip, IRS) |
1275 ICH6_IRS_BUSY); 1274 AZX_IRS_BUSY);
1276 return azx_single_wait_for_response(chip, addr); 1275 return azx_single_wait_for_response(chip, addr);
1277 } 1276 }
1278 udelay(1); 1277 udelay(1);
@@ -1501,10 +1500,10 @@ void azx_enter_link_reset(struct azx *chip)
1501 unsigned long timeout; 1500 unsigned long timeout;
1502 1501
1503 /* reset controller */ 1502 /* reset controller */
1504 azx_writel(chip, GCTL, azx_readl(chip, GCTL) & ~ICH6_GCTL_RESET); 1503 azx_writel(chip, GCTL, azx_readl(chip, GCTL) & ~AZX_GCTL_RESET);
1505 1504
1506 timeout = jiffies + msecs_to_jiffies(100); 1505 timeout = jiffies + msecs_to_jiffies(100);
1507 while ((azx_readb(chip, GCTL) & ICH6_GCTL_RESET) && 1506 while ((azx_readb(chip, GCTL) & AZX_GCTL_RESET) &&
1508 time_before(jiffies, timeout)) 1507 time_before(jiffies, timeout))
1509 usleep_range(500, 1000); 1508 usleep_range(500, 1000);
1510} 1509}
@@ -1515,7 +1514,7 @@ static void azx_exit_link_reset(struct azx *chip)
1515{ 1514{
1516 unsigned long timeout; 1515 unsigned long timeout;
1517 1516
1518 azx_writeb(chip, GCTL, azx_readb(chip, GCTL) | ICH6_GCTL_RESET); 1517 azx_writeb(chip, GCTL, azx_readb(chip, GCTL) | AZX_GCTL_RESET);
1519 1518
1520 timeout = jiffies + msecs_to_jiffies(100); 1519 timeout = jiffies + msecs_to_jiffies(100);
1521 while (!azx_readb(chip, GCTL) && 1520 while (!azx_readb(chip, GCTL) &&
@@ -1556,7 +1555,7 @@ static int azx_reset(struct azx *chip, bool full_reset)
1556 /* Accept unsolicited responses */ 1555 /* Accept unsolicited responses */
1557 if (!chip->single_cmd) 1556 if (!chip->single_cmd)
1558 azx_writel(chip, GCTL, azx_readl(chip, GCTL) | 1557 azx_writel(chip, GCTL, azx_readl(chip, GCTL) |
1559 ICH6_GCTL_UNSOL); 1558 AZX_GCTL_UNSOL);
1560 1559
1561 /* detect codecs */ 1560 /* detect codecs */
1562 if (!chip->codec_mask) { 1561 if (!chip->codec_mask) {
@@ -1573,7 +1572,7 @@ static void azx_int_enable(struct azx *chip)
1573{ 1572{
1574 /* enable controller CIE and GIE */ 1573 /* enable controller CIE and GIE */
1575 azx_writel(chip, INTCTL, azx_readl(chip, INTCTL) | 1574 azx_writel(chip, INTCTL, azx_readl(chip, INTCTL) |
1576 ICH6_INT_CTRL_EN | ICH6_INT_GLOBAL_EN); 1575 AZX_INT_CTRL_EN | AZX_INT_GLOBAL_EN);
1577} 1576}
1578 1577
1579/* disable interrupts */ 1578/* disable interrupts */
@@ -1594,7 +1593,7 @@ static void azx_int_disable(struct azx *chip)
1594 1593
1595 /* disable controller CIE and GIE */ 1594 /* disable controller CIE and GIE */
1596 azx_writel(chip, INTCTL, azx_readl(chip, INTCTL) & 1595 azx_writel(chip, INTCTL, azx_readl(chip, INTCTL) &
1597 ~(ICH6_INT_CTRL_EN | ICH6_INT_GLOBAL_EN)); 1596 ~(AZX_INT_CTRL_EN | AZX_INT_GLOBAL_EN));
1598} 1597}
1599 1598
1600/* clear interrupts */ 1599/* clear interrupts */
@@ -1615,7 +1614,7 @@ static void azx_int_clear(struct azx *chip)
1615 azx_writeb(chip, RIRBSTS, RIRB_INT_MASK); 1614 azx_writeb(chip, RIRBSTS, RIRB_INT_MASK);
1616 1615
1617 /* clear int status */ 1616 /* clear int status */
1618 azx_writel(chip, INTSTS, ICH6_INT_CTRL_EN | ICH6_INT_ALL_STREAM); 1617 azx_writel(chip, INTSTS, AZX_INT_CTRL_EN | AZX_INT_ALL_STREAM);
1619} 1618}
1620 1619
1621/* 1620/*
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index bbf01fcb6893..dc0c8dac1900 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -339,8 +339,8 @@ static char *driver_short_names[] = {
339 * Clock) to 24MHz BCLK: BCLK = CDCLK * M / N 339 * Clock) to 24MHz BCLK: BCLK = CDCLK * M / N
340 * The values will be lost when the display power well is disabled. 340 * The values will be lost when the display power well is disabled.
341 */ 341 */
342#define ICH6_REG_EM4 0x100c 342#define AZX_REG_EM4 0x100c
343#define ICH6_REG_EM5 0x1010 343#define AZX_REG_EM5 0x1010
344 344
345struct hda_intel { 345struct hda_intel {
346 struct azx chip; 346 struct azx chip;
@@ -451,7 +451,7 @@ static void azx_init_pci(struct azx *chip)
451 */ 451 */
452 if (!(chip->driver_caps & AZX_DCAPS_NO_TCSEL)) { 452 if (!(chip->driver_caps & AZX_DCAPS_NO_TCSEL)) {
453 dev_dbg(chip->card->dev, "Clearing TCSEL\n"); 453 dev_dbg(chip->card->dev, "Clearing TCSEL\n");
454 update_pci_byte(chip->pci, ICH6_PCIREG_TCSEL, 0x07, 0); 454 update_pci_byte(chip->pci, AZX_PCIREG_TCSEL, 0x07, 0);
455 } 455 }
456 456
457 /* For ATI SB450/600/700/800/900 and AMD Hudson azalia HD audio, 457 /* For ATI SB450/600/700/800/900 and AMD Hudson azalia HD audio,
@@ -1529,7 +1529,7 @@ static int azx_first_init(struct azx *chip)
1529 NULL); 1529 NULL);
1530 if (p_smbus) { 1530 if (p_smbus) {
1531 if (p_smbus->revision < 0x30) 1531 if (p_smbus->revision < 0x30)
1532 gcap &= ~ICH6_GCAP_64OK; 1532 gcap &= ~AZX_GCAP_64OK;
1533 pci_dev_put(p_smbus); 1533 pci_dev_put(p_smbus);
1534 } 1534 }
1535 } 1535 }
@@ -1537,7 +1537,7 @@ static int azx_first_init(struct azx *chip)
1537 /* disable 64bit DMA address on some devices */ 1537 /* disable 64bit DMA address on some devices */
1538 if (chip->driver_caps & AZX_DCAPS_NO_64BIT) { 1538 if (chip->driver_caps & AZX_DCAPS_NO_64BIT) {
1539 dev_dbg(card->dev, "Disabling 64bit DMA\n"); 1539 dev_dbg(card->dev, "Disabling 64bit DMA\n");
1540 gcap &= ~ICH6_GCAP_64OK; 1540 gcap &= ~AZX_GCAP_64OK;
1541 } 1541 }
1542 1542
1543 /* disable buffer size rounding to 128-byte multiples if supported */ 1543 /* disable buffer size rounding to 128-byte multiples if supported */
@@ -1553,7 +1553,7 @@ static int azx_first_init(struct azx *chip)
1553 } 1553 }
1554 1554
1555 /* allow 64bit DMA address if supported by H/W */ 1555 /* allow 64bit DMA address if supported by H/W */
1556 if ((gcap & ICH6_GCAP_64OK) && !pci_set_dma_mask(pci, DMA_BIT_MASK(64))) 1556 if ((gcap & AZX_GCAP_64OK) && !pci_set_dma_mask(pci, DMA_BIT_MASK(64)))
1557 pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(64)); 1557 pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(64));
1558 else { 1558 else {
1559 pci_set_dma_mask(pci, DMA_BIT_MASK(32)); 1559 pci_set_dma_mask(pci, DMA_BIT_MASK(32));
diff --git a/sound/pci/hda/hda_priv.h b/sound/pci/hda/hda_priv.h
index da2d3a41f8f3..33eb5d027d38 100644
--- a/sound/pci/hda/hda_priv.h
+++ b/sound/pci/hda/hda_priv.h
@@ -22,82 +22,82 @@
22/* 22/*
23 * registers 23 * registers
24 */ 24 */
25#define ICH6_REG_GCAP 0x00 25#define AZX_REG_GCAP 0x00
26#define ICH6_GCAP_64OK (1 << 0) /* 64bit address support */ 26#define AZX_GCAP_64OK (1 << 0) /* 64bit address support */
27#define ICH6_GCAP_NSDO (3 << 1) /* # of serial data out signals */ 27#define AZX_GCAP_NSDO (3 << 1) /* # of serial data out signals */
28#define ICH6_GCAP_BSS (31 << 3) /* # of bidirectional streams */ 28#define AZX_GCAP_BSS (31 << 3) /* # of bidirectional streams */
29#define ICH6_GCAP_ISS (15 << 8) /* # of input streams */ 29#define AZX_GCAP_ISS (15 << 8) /* # of input streams */
30#define ICH6_GCAP_OSS (15 << 12) /* # of output streams */ 30#define AZX_GCAP_OSS (15 << 12) /* # of output streams */
31#define ICH6_REG_VMIN 0x02 31#define AZX_REG_VMIN 0x02
32#define ICH6_REG_VMAJ 0x03 32#define AZX_REG_VMAJ 0x03
33#define ICH6_REG_OUTPAY 0x04 33#define AZX_REG_OUTPAY 0x04
34#define ICH6_REG_INPAY 0x06 34#define AZX_REG_INPAY 0x06
35#define ICH6_REG_GCTL 0x08 35#define AZX_REG_GCTL 0x08
36#define ICH6_GCTL_RESET (1 << 0) /* controller reset */ 36#define AZX_GCTL_RESET (1 << 0) /* controller reset */
37#define ICH6_GCTL_FCNTRL (1 << 1) /* flush control */ 37#define AZX_GCTL_FCNTRL (1 << 1) /* flush control */
38#define ICH6_GCTL_UNSOL (1 << 8) /* accept unsol. response enable */ 38#define AZX_GCTL_UNSOL (1 << 8) /* accept unsol. response enable */
39#define ICH6_REG_WAKEEN 0x0c 39#define AZX_REG_WAKEEN 0x0c
40#define ICH6_REG_STATESTS 0x0e 40#define AZX_REG_STATESTS 0x0e
41#define ICH6_REG_GSTS 0x10 41#define AZX_REG_GSTS 0x10
42#define ICH6_GSTS_FSTS (1 << 1) /* flush status */ 42#define AZX_GSTS_FSTS (1 << 1) /* flush status */
43#define ICH6_REG_INTCTL 0x20 43#define AZX_REG_INTCTL 0x20
44#define ICH6_REG_INTSTS 0x24 44#define AZX_REG_INTSTS 0x24
45#define ICH6_REG_WALLCLK 0x30 /* 24Mhz source */ 45#define AZX_REG_WALLCLK 0x30 /* 24Mhz source */
46#define ICH6_REG_OLD_SSYNC 0x34 /* SSYNC for old ICH */ 46#define AZX_REG_OLD_SSYNC 0x34 /* SSYNC for old ICH */
47#define ICH6_REG_SSYNC 0x38 47#define AZX_REG_SSYNC 0x38
48#define ICH6_REG_CORBLBASE 0x40 48#define AZX_REG_CORBLBASE 0x40
49#define ICH6_REG_CORBUBASE 0x44 49#define AZX_REG_CORBUBASE 0x44
50#define ICH6_REG_CORBWP 0x48 50#define AZX_REG_CORBWP 0x48
51#define ICH6_REG_CORBRP 0x4a 51#define AZX_REG_CORBRP 0x4a
52#define ICH6_CORBRP_RST (1 << 15) /* read pointer reset */ 52#define AZX_CORBRP_RST (1 << 15) /* read pointer reset */
53#define ICH6_REG_CORBCTL 0x4c 53#define AZX_REG_CORBCTL 0x4c
54#define ICH6_CORBCTL_RUN (1 << 1) /* enable DMA */ 54#define AZX_CORBCTL_RUN (1 << 1) /* enable DMA */
55#define ICH6_CORBCTL_CMEIE (1 << 0) /* enable memory error irq */ 55#define AZX_CORBCTL_CMEIE (1 << 0) /* enable memory error irq */
56#define ICH6_REG_CORBSTS 0x4d 56#define AZX_REG_CORBSTS 0x4d
57#define ICH6_CORBSTS_CMEI (1 << 0) /* memory error indication */ 57#define AZX_CORBSTS_CMEI (1 << 0) /* memory error indication */
58#define ICH6_REG_CORBSIZE 0x4e 58#define AZX_REG_CORBSIZE 0x4e
59 59
60#define ICH6_REG_RIRBLBASE 0x50 60#define AZX_REG_RIRBLBASE 0x50
61#define ICH6_REG_RIRBUBASE 0x54 61#define AZX_REG_RIRBUBASE 0x54
62#define ICH6_REG_RIRBWP 0x58 62#define AZX_REG_RIRBWP 0x58
63#define ICH6_RIRBWP_RST (1 << 15) /* write pointer reset */ 63#define AZX_RIRBWP_RST (1 << 15) /* write pointer reset */
64#define ICH6_REG_RINTCNT 0x5a 64#define AZX_REG_RINTCNT 0x5a
65#define ICH6_REG_RIRBCTL 0x5c 65#define AZX_REG_RIRBCTL 0x5c
66#define ICH6_RBCTL_IRQ_EN (1 << 0) /* enable IRQ */ 66#define AZX_RBCTL_IRQ_EN (1 << 0) /* enable IRQ */
67#define ICH6_RBCTL_DMA_EN (1 << 1) /* enable DMA */ 67#define AZX_RBCTL_DMA_EN (1 << 1) /* enable DMA */
68#define ICH6_RBCTL_OVERRUN_EN (1 << 2) /* enable overrun irq */ 68#define AZX_RBCTL_OVERRUN_EN (1 << 2) /* enable overrun irq */
69#define ICH6_REG_RIRBSTS 0x5d 69#define AZX_REG_RIRBSTS 0x5d
70#define ICH6_RBSTS_IRQ (1 << 0) /* response irq */ 70#define AZX_RBSTS_IRQ (1 << 0) /* response irq */
71#define ICH6_RBSTS_OVERRUN (1 << 2) /* overrun irq */ 71#define AZX_RBSTS_OVERRUN (1 << 2) /* overrun irq */
72#define ICH6_REG_RIRBSIZE 0x5e 72#define AZX_REG_RIRBSIZE 0x5e
73 73
74#define ICH6_REG_IC 0x60 74#define AZX_REG_IC 0x60
75#define ICH6_REG_IR 0x64 75#define AZX_REG_IR 0x64
76#define ICH6_REG_IRS 0x68 76#define AZX_REG_IRS 0x68
77#define ICH6_IRS_VALID (1<<1) 77#define AZX_IRS_VALID (1<<1)
78#define ICH6_IRS_BUSY (1<<0) 78#define AZX_IRS_BUSY (1<<0)
79 79
80#define ICH6_REG_DPLBASE 0x70 80#define AZX_REG_DPLBASE 0x70
81#define ICH6_REG_DPUBASE 0x74 81#define AZX_REG_DPUBASE 0x74
82#define ICH6_DPLBASE_ENABLE 0x1 /* Enable position buffer */ 82#define AZX_DPLBASE_ENABLE 0x1 /* Enable position buffer */
83 83
84/* SD offset: SDI0=0x80, SDI1=0xa0, ... SDO3=0x160 */ 84/* SD offset: SDI0=0x80, SDI1=0xa0, ... SDO3=0x160 */
85enum { SDI0, SDI1, SDI2, SDI3, SDO0, SDO1, SDO2, SDO3 }; 85enum { SDI0, SDI1, SDI2, SDI3, SDO0, SDO1, SDO2, SDO3 };
86 86
87/* stream register offsets from stream base */ 87/* stream register offsets from stream base */
88#define ICH6_REG_SD_CTL 0x00 88#define AZX_REG_SD_CTL 0x00
89#define ICH6_REG_SD_STS 0x03 89#define AZX_REG_SD_STS 0x03
90#define ICH6_REG_SD_LPIB 0x04 90#define AZX_REG_SD_LPIB 0x04
91#define ICH6_REG_SD_CBL 0x08 91#define AZX_REG_SD_CBL 0x08
92#define ICH6_REG_SD_LVI 0x0c 92#define AZX_REG_SD_LVI 0x0c
93#define ICH6_REG_SD_FIFOW 0x0e 93#define AZX_REG_SD_FIFOW 0x0e
94#define ICH6_REG_SD_FIFOSIZE 0x10 94#define AZX_REG_SD_FIFOSIZE 0x10
95#define ICH6_REG_SD_FORMAT 0x12 95#define AZX_REG_SD_FORMAT 0x12
96#define ICH6_REG_SD_BDLPL 0x18 96#define AZX_REG_SD_BDLPL 0x18
97#define ICH6_REG_SD_BDLPU 0x1c 97#define AZX_REG_SD_BDLPU 0x1c
98 98
99/* PCI space */ 99/* PCI space */
100#define ICH6_PCIREG_TCSEL 0x44 100#define AZX_PCIREG_TCSEL 0x44
101 101
102/* 102/*
103 * other constants 103 * other constants
@@ -140,13 +140,13 @@ enum { SDI0, SDI1, SDI2, SDI3, SDO0, SDO1, SDO2, SDO3 };
140#define SD_STS_FIFO_READY 0x20 /* FIFO ready */ 140#define SD_STS_FIFO_READY 0x20 /* FIFO ready */
141 141
142/* INTCTL and INTSTS */ 142/* INTCTL and INTSTS */
143#define ICH6_INT_ALL_STREAM 0xff /* all stream interrupts */ 143#define AZX_INT_ALL_STREAM 0xff /* all stream interrupts */
144#define ICH6_INT_CTRL_EN 0x40000000 /* controller interrupt enable bit */ 144#define AZX_INT_CTRL_EN 0x40000000 /* controller interrupt enable bit */
145#define ICH6_INT_GLOBAL_EN 0x80000000 /* global interrupt enable bit */ 145#define AZX_INT_GLOBAL_EN 0x80000000 /* global interrupt enable bit */
146 146
147/* below are so far hardcoded - should read registers in future */ 147/* below are so far hardcoded - should read registers in future */
148#define ICH6_MAX_CORB_ENTRIES 256 148#define AZX_MAX_CORB_ENTRIES 256
149#define ICH6_MAX_RIRB_ENTRIES 256 149#define AZX_MAX_RIRB_ENTRIES 256
150 150
151/* driver quirks (capabilities) */ 151/* driver quirks (capabilities) */
152/* bits 0-7 are used for indicating driver type */ 152/* bits 0-7 are used for indicating driver type */
@@ -369,29 +369,29 @@ struct azx {
369 */ 369 */
370 370
371#define azx_writel(chip, reg, value) \ 371#define azx_writel(chip, reg, value) \
372 ((chip)->ops->reg_writel(value, (chip)->remap_addr + ICH6_REG_##reg)) 372 ((chip)->ops->reg_writel(value, (chip)->remap_addr + AZX_REG_##reg))
373#define azx_readl(chip, reg) \ 373#define azx_readl(chip, reg) \
374 ((chip)->ops->reg_readl((chip)->remap_addr + ICH6_REG_##reg)) 374 ((chip)->ops->reg_readl((chip)->remap_addr + AZX_REG_##reg))
375#define azx_writew(chip, reg, value) \ 375#define azx_writew(chip, reg, value) \
376 ((chip)->ops->reg_writew(value, (chip)->remap_addr + ICH6_REG_##reg)) 376 ((chip)->ops->reg_writew(value, (chip)->remap_addr + AZX_REG_##reg))
377#define azx_readw(chip, reg) \ 377#define azx_readw(chip, reg) \
378 ((chip)->ops->reg_readw((chip)->remap_addr + ICH6_REG_##reg)) 378 ((chip)->ops->reg_readw((chip)->remap_addr + AZX_REG_##reg))
379#define azx_writeb(chip, reg, value) \ 379#define azx_writeb(chip, reg, value) \
380 ((chip)->ops->reg_writeb(value, (chip)->remap_addr + ICH6_REG_##reg)) 380 ((chip)->ops->reg_writeb(value, (chip)->remap_addr + AZX_REG_##reg))
381#define azx_readb(chip, reg) \ 381#define azx_readb(chip, reg) \
382 ((chip)->ops->reg_readb((chip)->remap_addr + ICH6_REG_##reg)) 382 ((chip)->ops->reg_readb((chip)->remap_addr + AZX_REG_##reg))
383 383
384#define azx_sd_writel(chip, dev, reg, value) \ 384#define azx_sd_writel(chip, dev, reg, value) \
385 ((chip)->ops->reg_writel(value, (dev)->sd_addr + ICH6_REG_##reg)) 385 ((chip)->ops->reg_writel(value, (dev)->sd_addr + AZX_REG_##reg))
386#define azx_sd_readl(chip, dev, reg) \ 386#define azx_sd_readl(chip, dev, reg) \
387 ((chip)->ops->reg_readl((dev)->sd_addr + ICH6_REG_##reg)) 387 ((chip)->ops->reg_readl((dev)->sd_addr + AZX_REG_##reg))
388#define azx_sd_writew(chip, dev, reg, value) \ 388#define azx_sd_writew(chip, dev, reg, value) \
389 ((chip)->ops->reg_writew(value, (dev)->sd_addr + ICH6_REG_##reg)) 389 ((chip)->ops->reg_writew(value, (dev)->sd_addr + AZX_REG_##reg))
390#define azx_sd_readw(chip, dev, reg) \ 390#define azx_sd_readw(chip, dev, reg) \
391 ((chip)->ops->reg_readw((dev)->sd_addr + ICH6_REG_##reg)) 391 ((chip)->ops->reg_readw((dev)->sd_addr + AZX_REG_##reg))
392#define azx_sd_writeb(chip, dev, reg, value) \ 392#define azx_sd_writeb(chip, dev, reg, value) \
393 ((chip)->ops->reg_writeb(value, (dev)->sd_addr + ICH6_REG_##reg)) 393 ((chip)->ops->reg_writeb(value, (dev)->sd_addr + AZX_REG_##reg))
394#define azx_sd_readb(chip, dev, reg) \ 394#define azx_sd_readb(chip, dev, reg) \
395 ((chip)->ops->reg_readb((dev)->sd_addr + ICH6_REG_##reg)) 395 ((chip)->ops->reg_readb((dev)->sd_addr + AZX_REG_##reg))
396 396
397#endif /* __SOUND_HDA_PRIV_H */ 397#endif /* __SOUND_HDA_PRIV_H */