amd               364 arch/x86/include/asm/xen/interface.h 		struct xen_pmu_amd_ctxt amd;
amd              4517 arch/x86/kvm/mmu.c 			bool pse, bool amd)
amd              4534 arch/x86/kvm/mmu.c 	if (amd)
amd               268 arch/x86/xen/pmu.c 	ctxt = &xenpmu_data->pmu.c.amd;
amd               352 arch/x86/xen/pmu.c 	ctxt = &xenpmu_data->pmu.c.amd;
amd               599 drivers/ata/pata_amd.c static const struct pci_device_id amd[] = {
amd               627 drivers/ata/pata_amd.c 	.id_table	= amd,
amd               641 drivers/ata/pata_amd.c MODULE_DEVICE_TABLE(pci, amd);
amd               496 drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h #define TRACE_INCLUDE_PATH ../../drivers/gpu/drm/amd/amdgpu
amd              1752 drivers/mmc/host/sdhci-pci-core.c 	SDHCI_PCI_DEVICE_CLASS(AMD, SYSTEM_SDHCI, PCI_CLASS_MASK, amd),
amd               348 sound/sparc/amd7930.c static __inline__ void amd7930_idle(struct snd_amd7930 *amd)
amd               352 sound/sparc/amd7930.c 	spin_lock_irqsave(&amd->lock, flags);
amd               353 sound/sparc/amd7930.c 	sbus_writeb(AMR_INIT, amd->regs + AMD7930_CR);
amd               354 sound/sparc/amd7930.c 	sbus_writeb(0, amd->regs + AMD7930_DR);
amd               355 sound/sparc/amd7930.c 	spin_unlock_irqrestore(&amd->lock, flags);
amd               359 sound/sparc/amd7930.c static __inline__ void amd7930_enable_ints(struct snd_amd7930 *amd)
amd               363 sound/sparc/amd7930.c 	spin_lock_irqsave(&amd->lock, flags);
amd               364 sound/sparc/amd7930.c 	sbus_writeb(AMR_INIT, amd->regs + AMD7930_CR);
amd               365 sound/sparc/amd7930.c 	sbus_writeb(AM_INIT_ACTIVE, amd->regs + AMD7930_DR);
amd               366 sound/sparc/amd7930.c 	spin_unlock_irqrestore(&amd->lock, flags);
amd               370 sound/sparc/amd7930.c static __inline__ void amd7930_disable_ints(struct snd_amd7930 *amd)
amd               374 sound/sparc/amd7930.c 	spin_lock_irqsave(&amd->lock, flags);
amd               375 sound/sparc/amd7930.c 	sbus_writeb(AMR_INIT, amd->regs + AMD7930_CR);
amd               376 sound/sparc/amd7930.c 	sbus_writeb(AM_INIT_ACTIVE | AM_INIT_DISABLE_INTS, amd->regs + AMD7930_DR);
amd               377 sound/sparc/amd7930.c 	spin_unlock_irqrestore(&amd->lock, flags);
amd               383 sound/sparc/amd7930.c static void __amd7930_write_map(struct snd_amd7930 *amd)
amd               385 sound/sparc/amd7930.c 	struct amd7930_map *map = &amd->map;
amd               387 sound/sparc/amd7930.c 	sbus_writeb(AMR_MAP_GX, amd->regs + AMD7930_CR);
amd               388 sound/sparc/amd7930.c 	sbus_writeb(((map->gx >> 0) & 0xff), amd->regs + AMD7930_DR);
amd               389 sound/sparc/amd7930.c 	sbus_writeb(((map->gx >> 8) & 0xff), amd->regs + AMD7930_DR);
amd               391 sound/sparc/amd7930.c 	sbus_writeb(AMR_MAP_GR, amd->regs + AMD7930_CR);
amd               392 sound/sparc/amd7930.c 	sbus_writeb(((map->gr >> 0) & 0xff), amd->regs + AMD7930_DR);
amd               393 sound/sparc/amd7930.c 	sbus_writeb(((map->gr >> 8) & 0xff), amd->regs + AMD7930_DR);
amd               395 sound/sparc/amd7930.c 	sbus_writeb(AMR_MAP_STGR, amd->regs + AMD7930_CR);
amd               396 sound/sparc/amd7930.c 	sbus_writeb(((map->stgr >> 0) & 0xff), amd->regs + AMD7930_DR);
amd               397 sound/sparc/amd7930.c 	sbus_writeb(((map->stgr >> 8) & 0xff), amd->regs + AMD7930_DR);
amd               399 sound/sparc/amd7930.c 	sbus_writeb(AMR_MAP_GER, amd->regs + AMD7930_CR);
amd               400 sound/sparc/amd7930.c 	sbus_writeb(((map->ger >> 0) & 0xff), amd->regs + AMD7930_DR);
amd               401 sound/sparc/amd7930.c 	sbus_writeb(((map->ger >> 8) & 0xff), amd->regs + AMD7930_DR);
amd               403 sound/sparc/amd7930.c 	sbus_writeb(AMR_MAP_MMR1, amd->regs + AMD7930_CR);
amd               404 sound/sparc/amd7930.c 	sbus_writeb(map->mmr1, amd->regs + AMD7930_DR);
amd               406 sound/sparc/amd7930.c 	sbus_writeb(AMR_MAP_MMR2, amd->regs + AMD7930_CR);
amd               407 sound/sparc/amd7930.c 	sbus_writeb(map->mmr2, amd->regs + AMD7930_DR);
amd               477 sound/sparc/amd7930.c static void __amd7930_update_map(struct snd_amd7930 *amd)
amd               479 sound/sparc/amd7930.c 	struct amd7930_map *map = &amd->map;
amd               482 sound/sparc/amd7930.c 	map->gx = gx_coeff[amd->rgain];
amd               483 sound/sparc/amd7930.c 	map->stgr = gx_coeff[amd->mgain];
amd               484 sound/sparc/amd7930.c 	level = (amd->pgain * (256 + ARRAY_SIZE(ger_coeff))) >> 8;
amd               492 sound/sparc/amd7930.c 	__amd7930_write_map(amd);
amd               497 sound/sparc/amd7930.c 	struct snd_amd7930 *amd = dev_id;
amd               501 sound/sparc/amd7930.c 	spin_lock(&amd->lock);
amd               505 sound/sparc/amd7930.c 	ir = sbus_readb(amd->regs + AMD7930_IR);
amd               509 sound/sparc/amd7930.c 		if (amd->flags & AMD7930_FLAG_PLAYBACK) {
amd               510 sound/sparc/amd7930.c 			if (amd->p_left > 0) {
amd               511 sound/sparc/amd7930.c 				byte = *(amd->p_cur++);
amd               512 sound/sparc/amd7930.c 				amd->p_left--;
amd               513 sound/sparc/amd7930.c 				sbus_writeb(byte, amd->regs + AMD7930_BBTB);
amd               514 sound/sparc/amd7930.c 				if (amd->p_left == 0)
amd               517 sound/sparc/amd7930.c 				sbus_writeb(0, amd->regs + AMD7930_BBTB);
amd               518 sound/sparc/amd7930.c 		} else if (amd->flags & AMD7930_FLAG_CAPTURE) {
amd               519 sound/sparc/amd7930.c 			byte = sbus_readb(amd->regs + AMD7930_BBRB);
amd               520 sound/sparc/amd7930.c 			if (amd->c_left > 0) {
amd               521 sound/sparc/amd7930.c 				*(amd->c_cur++) = byte;
amd               522 sound/sparc/amd7930.c 				amd->c_left--;
amd               523 sound/sparc/amd7930.c 				if (amd->c_left == 0)
amd               528 sound/sparc/amd7930.c 	spin_unlock(&amd->lock);
amd               531 sound/sparc/amd7930.c 		snd_pcm_period_elapsed(amd->playback_substream);
amd               533 sound/sparc/amd7930.c 		snd_pcm_period_elapsed(amd->capture_substream);
amd               538 sound/sparc/amd7930.c static int snd_amd7930_trigger(struct snd_amd7930 *amd, unsigned int flag, int cmd)
amd               543 sound/sparc/amd7930.c 	spin_lock_irqsave(&amd->lock, flags);
amd               545 sound/sparc/amd7930.c 		if (!(amd->flags & flag)) {
amd               546 sound/sparc/amd7930.c 			amd->flags |= flag;
amd               549 sound/sparc/amd7930.c 			sbus_writeb(AMR_MUX_MCR4, amd->regs + AMD7930_CR);
amd               550 sound/sparc/amd7930.c 			sbus_writeb(AM_MUX_MCR4_ENABLE_INTS, amd->regs + AMD7930_DR);
amd               553 sound/sparc/amd7930.c 		if (amd->flags & flag) {
amd               554 sound/sparc/amd7930.c 			amd->flags &= ~flag;
amd               557 sound/sparc/amd7930.c 			sbus_writeb(AMR_MUX_MCR4, amd->regs + AMD7930_CR);
amd               558 sound/sparc/amd7930.c 			sbus_writeb(0, amd->regs + AMD7930_DR);
amd               563 sound/sparc/amd7930.c 	spin_unlock_irqrestore(&amd->lock, flags);
amd               571 sound/sparc/amd7930.c 	struct snd_amd7930 *amd = snd_pcm_substream_chip(substream);
amd               572 sound/sparc/amd7930.c 	return snd_amd7930_trigger(amd, AMD7930_FLAG_PLAYBACK, cmd);
amd               578 sound/sparc/amd7930.c 	struct snd_amd7930 *amd = snd_pcm_substream_chip(substream);
amd               579 sound/sparc/amd7930.c 	return snd_amd7930_trigger(amd, AMD7930_FLAG_CAPTURE, cmd);
amd               584 sound/sparc/amd7930.c 	struct snd_amd7930 *amd = snd_pcm_substream_chip(substream);
amd               590 sound/sparc/amd7930.c 	spin_lock_irqsave(&amd->lock, flags);
amd               592 sound/sparc/amd7930.c 	amd->flags |= AMD7930_FLAG_PLAYBACK;
amd               595 sound/sparc/amd7930.c 	amd->p_orig = amd->p_cur = runtime->dma_area;
amd               596 sound/sparc/amd7930.c 	amd->p_left = size;
amd               599 sound/sparc/amd7930.c 	new_mmr1 = amd->map.mmr1;
amd               604 sound/sparc/amd7930.c 	if (new_mmr1 != amd->map.mmr1) {
amd               605 sound/sparc/amd7930.c 		amd->map.mmr1 = new_mmr1;
amd               606 sound/sparc/amd7930.c 		__amd7930_update_map(amd);
amd               609 sound/sparc/amd7930.c 	spin_unlock_irqrestore(&amd->lock, flags);
amd               616 sound/sparc/amd7930.c 	struct snd_amd7930 *amd = snd_pcm_substream_chip(substream);
amd               622 sound/sparc/amd7930.c 	spin_lock_irqsave(&amd->lock, flags);
amd               624 sound/sparc/amd7930.c 	amd->flags |= AMD7930_FLAG_CAPTURE;
amd               627 sound/sparc/amd7930.c 	amd->c_orig = amd->c_cur = runtime->dma_area;
amd               628 sound/sparc/amd7930.c 	amd->c_left = size;
amd               631 sound/sparc/amd7930.c 	new_mmr1 = amd->map.mmr1;
amd               636 sound/sparc/amd7930.c 	if (new_mmr1 != amd->map.mmr1) {
amd               637 sound/sparc/amd7930.c 		amd->map.mmr1 = new_mmr1;
amd               638 sound/sparc/amd7930.c 		__amd7930_update_map(amd);
amd               641 sound/sparc/amd7930.c 	spin_unlock_irqrestore(&amd->lock, flags);
amd               648 sound/sparc/amd7930.c 	struct snd_amd7930 *amd = snd_pcm_substream_chip(substream);
amd               651 sound/sparc/amd7930.c 	if (!(amd->flags & AMD7930_FLAG_PLAYBACK))
amd               653 sound/sparc/amd7930.c 	ptr = amd->p_cur - amd->p_orig;
amd               659 sound/sparc/amd7930.c 	struct snd_amd7930 *amd = snd_pcm_substream_chip(substream);
amd               662 sound/sparc/amd7930.c 	if (!(amd->flags & AMD7930_FLAG_CAPTURE))
amd               665 sound/sparc/amd7930.c 	ptr = amd->c_cur - amd->c_orig;
amd               692 sound/sparc/amd7930.c 	struct snd_amd7930 *amd = snd_pcm_substream_chip(substream);
amd               695 sound/sparc/amd7930.c 	amd->playback_substream = substream;
amd               702 sound/sparc/amd7930.c 	struct snd_amd7930 *amd = snd_pcm_substream_chip(substream);
amd               705 sound/sparc/amd7930.c 	amd->capture_substream = substream;
amd               712 sound/sparc/amd7930.c 	struct snd_amd7930 *amd = snd_pcm_substream_chip(substream);
amd               714 sound/sparc/amd7930.c 	amd->playback_substream = NULL;
amd               720 sound/sparc/amd7930.c 	struct snd_amd7930 *amd = snd_pcm_substream_chip(substream);
amd               722 sound/sparc/amd7930.c 	amd->capture_substream = NULL;
amd               759 sound/sparc/amd7930.c static int snd_amd7930_pcm(struct snd_amd7930 *amd)
amd               764 sound/sparc/amd7930.c 	if ((err = snd_pcm_new(amd->card,
amd               774 sound/sparc/amd7930.c 	pcm->private_data = amd;
amd               776 sound/sparc/amd7930.c 	strcpy(pcm->name, amd->card->shortname);
amd               777 sound/sparc/amd7930.c 	amd->pcm = pcm;
amd               802 sound/sparc/amd7930.c 	struct snd_amd7930 *amd = snd_kcontrol_chip(kctl);
amd               808 sound/sparc/amd7930.c 		swval = &amd->mgain;
amd               811 sound/sparc/amd7930.c 		swval = &amd->rgain;
amd               815 sound/sparc/amd7930.c 		swval = &amd->pgain;
amd               826 sound/sparc/amd7930.c 	struct snd_amd7930 *amd = snd_kcontrol_chip(kctl);
amd               833 sound/sparc/amd7930.c 		swval = &amd->mgain;
amd               836 sound/sparc/amd7930.c 		swval = &amd->rgain;
amd               840 sound/sparc/amd7930.c 		swval = &amd->pgain;
amd               844 sound/sparc/amd7930.c 	spin_lock_irqsave(&amd->lock, flags);
amd               848 sound/sparc/amd7930.c 		__amd7930_update_map(amd);
amd               853 sound/sparc/amd7930.c 	spin_unlock_irqrestore(&amd->lock, flags);
amd               888 sound/sparc/amd7930.c static int snd_amd7930_mixer(struct snd_amd7930 *amd)
amd               893 sound/sparc/amd7930.c 	if (snd_BUG_ON(!amd || !amd->card))
amd               896 sound/sparc/amd7930.c 	card = amd->card;
amd               901 sound/sparc/amd7930.c 				       snd_ctl_new1(&amd7930_controls[idx], amd))) < 0)
amd               908 sound/sparc/amd7930.c static int snd_amd7930_free(struct snd_amd7930 *amd)
amd               910 sound/sparc/amd7930.c 	struct platform_device *op = amd->op;
amd               912 sound/sparc/amd7930.c 	amd7930_idle(amd);
amd               914 sound/sparc/amd7930.c 	if (amd->irq)
amd               915 sound/sparc/amd7930.c 		free_irq(amd->irq, amd);
amd               917 sound/sparc/amd7930.c 	if (amd->regs)
amd               918 sound/sparc/amd7930.c 		of_iounmap(&op->resource[0], amd->regs,
amd               921 sound/sparc/amd7930.c 	kfree(amd);
amd               928 sound/sparc/amd7930.c 	struct snd_amd7930 *amd = device->device_data;
amd               930 sound/sparc/amd7930.c 	return snd_amd7930_free(amd);
amd               942 sound/sparc/amd7930.c 	struct snd_amd7930 *amd;
amd               947 sound/sparc/amd7930.c 	amd = kzalloc(sizeof(*amd), GFP_KERNEL);
amd               948 sound/sparc/amd7930.c 	if (amd == NULL)
amd               951 sound/sparc/amd7930.c 	spin_lock_init(&amd->lock);
amd               952 sound/sparc/amd7930.c 	amd->card = card;
amd               953 sound/sparc/amd7930.c 	amd->op = op;
amd               955 sound/sparc/amd7930.c 	amd->regs = of_ioremap(&op->resource[0], 0,
amd               957 sound/sparc/amd7930.c 	if (!amd->regs) {
amd               960 sound/sparc/amd7930.c 		kfree(amd);
amd               964 sound/sparc/amd7930.c 	amd7930_idle(amd);
amd               967 sound/sparc/amd7930.c 			IRQF_SHARED, "amd7930", amd)) {
amd               970 sound/sparc/amd7930.c 		snd_amd7930_free(amd);
amd               973 sound/sparc/amd7930.c 	amd->irq = irq;
amd               975 sound/sparc/amd7930.c 	amd7930_enable_ints(amd);
amd               977 sound/sparc/amd7930.c 	spin_lock_irqsave(&amd->lock, flags);
amd               979 sound/sparc/amd7930.c 	amd->rgain = 128;
amd               980 sound/sparc/amd7930.c 	amd->pgain = 200;
amd               981 sound/sparc/amd7930.c 	amd->mgain = 0;
amd               983 sound/sparc/amd7930.c 	memset(&amd->map, 0, sizeof(amd->map));
amd               984 sound/sparc/amd7930.c 	amd->map.mmr1 = (AM_MAP_MMR1_GX | AM_MAP_MMR1_GER |
amd               986 sound/sparc/amd7930.c 	amd->map.mmr2 = (AM_MAP_MMR2_LS | AM_MAP_MMR2_AINB);
amd               988 sound/sparc/amd7930.c 	__amd7930_update_map(amd);
amd               991 sound/sparc/amd7930.c 	sbus_writeb(AMR_MUX_MCR1, amd->regs + AMD7930_CR);
amd               993 sound/sparc/amd7930.c 		    amd->regs + AMD7930_DR);
amd               995 sound/sparc/amd7930.c 	spin_unlock_irqrestore(&amd->lock, flags);
amd               998 sound/sparc/amd7930.c 				  amd, &snd_amd7930_dev_ops)) < 0) {
amd               999 sound/sparc/amd7930.c 		snd_amd7930_free(amd);
amd              1003 sound/sparc/amd7930.c 	*ramd = amd;
amd              1012 sound/sparc/amd7930.c 	struct snd_amd7930 *amd;
amd              1038 sound/sparc/amd7930.c 				      irq, dev_num, &amd)) < 0)
amd              1041 sound/sparc/amd7930.c 	if ((err = snd_amd7930_pcm(amd)) < 0)
amd              1044 sound/sparc/amd7930.c 	if ((err = snd_amd7930_mixer(amd)) < 0)
amd              1050 sound/sparc/amd7930.c 	amd->next = amd7930_list;
amd              1051 sound/sparc/amd7930.c 	amd7930_list = amd;