18b3d6663SArnd Bergmann /* hw_ops.c - query/set operations on active SPU context.
28b3d6663SArnd Bergmann  *
38b3d6663SArnd Bergmann  * Copyright (C) IBM 2005
48b3d6663SArnd Bergmann  * Author: Mark Nutter <mnutter@us.ibm.com>
58b3d6663SArnd Bergmann  *
68b3d6663SArnd Bergmann  * This program is free software; you can redistribute it and/or modify
78b3d6663SArnd Bergmann  * it under the terms of the GNU General Public License as published by
88b3d6663SArnd Bergmann  * the Free Software Foundation; either version 2, or (at your option)
98b3d6663SArnd Bergmann  * any later version.
108b3d6663SArnd Bergmann  *
118b3d6663SArnd Bergmann  * This program is distributed in the hope that it will be useful,
128b3d6663SArnd Bergmann  * but WITHOUT ANY WARRANTY; without even the implied warranty of
138b3d6663SArnd Bergmann  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
148b3d6663SArnd Bergmann  * GNU General Public License for more details.
158b3d6663SArnd Bergmann  *
168b3d6663SArnd Bergmann  * You should have received a copy of the GNU General Public License
178b3d6663SArnd Bergmann  * along with this program; if not, write to the Free Software
188b3d6663SArnd Bergmann  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
198b3d6663SArnd Bergmann  */
208b3d6663SArnd Bergmann 
218b3d6663SArnd Bergmann #include <linux/errno.h>
228b3d6663SArnd Bergmann #include <linux/sched.h>
238b3d6663SArnd Bergmann #include <linux/kernel.h>
248b3d6663SArnd Bergmann #include <linux/mm.h>
253a843d7cSArnd Bergmann #include <linux/poll.h>
268b3d6663SArnd Bergmann #include <linux/smp.h>
278b3d6663SArnd Bergmann #include <linux/stddef.h>
288b3d6663SArnd Bergmann #include <linux/unistd.h>
298b3d6663SArnd Bergmann 
308b3d6663SArnd Bergmann #include <asm/io.h>
318b3d6663SArnd Bergmann #include <asm/spu.h>
32540270d8SGeoff Levand #include <asm/spu_priv1.h>
338b3d6663SArnd Bergmann #include <asm/spu_csa.h>
348b3d6663SArnd Bergmann #include <asm/mmu_context.h>
358b3d6663SArnd Bergmann #include "spufs.h"
368b3d6663SArnd Bergmann 
378b3d6663SArnd Bergmann static int spu_hw_mbox_read(struct spu_context *ctx, u32 * data)
388b3d6663SArnd Bergmann {
398b3d6663SArnd Bergmann 	struct spu *spu = ctx->spu;
408b3d6663SArnd Bergmann 	struct spu_problem __iomem *prob = spu->problem;
418b3d6663SArnd Bergmann 	u32 mbox_stat;
428b3d6663SArnd Bergmann 	int ret = 0;
438b3d6663SArnd Bergmann 
448b3d6663SArnd Bergmann 	spin_lock_irq(&spu->register_lock);
458b3d6663SArnd Bergmann 	mbox_stat = in_be32(&prob->mb_stat_R);
468b3d6663SArnd Bergmann 	if (mbox_stat & 0x0000ff) {
478b3d6663SArnd Bergmann 		*data = in_be32(&prob->pu_mb_R);
488b3d6663SArnd Bergmann 		ret = 4;
498b3d6663SArnd Bergmann 	}
508b3d6663SArnd Bergmann 	spin_unlock_irq(&spu->register_lock);
518b3d6663SArnd Bergmann 	return ret;
528b3d6663SArnd Bergmann }
538b3d6663SArnd Bergmann 
548b3d6663SArnd Bergmann static u32 spu_hw_mbox_stat_read(struct spu_context *ctx)
558b3d6663SArnd Bergmann {
568b3d6663SArnd Bergmann 	return in_be32(&ctx->spu->problem->mb_stat_R);
578b3d6663SArnd Bergmann }
588b3d6663SArnd Bergmann 
598153a5eaSAl Viro static __poll_t spu_hw_mbox_stat_poll(struct spu_context *ctx, __poll_t events)
603a843d7cSArnd Bergmann {
613a843d7cSArnd Bergmann 	struct spu *spu = ctx->spu;
628153a5eaSAl Viro 	__poll_t ret = 0;
633a843d7cSArnd Bergmann 	u32 stat;
643a843d7cSArnd Bergmann 
653a843d7cSArnd Bergmann 	spin_lock_irq(&spu->register_lock);
663a843d7cSArnd Bergmann 	stat = in_be32(&spu->problem->mb_stat_R);
673a843d7cSArnd Bergmann 
683a843d7cSArnd Bergmann 	/* if the requested event is there, return the poll
693a843d7cSArnd Bergmann 	   mask, otherwise enable the interrupt to get notified,
703a843d7cSArnd Bergmann 	   but first mark any pending interrupts as done so
713a843d7cSArnd Bergmann 	   we don't get woken up unnecessarily */
723a843d7cSArnd Bergmann 
733a843d7cSArnd Bergmann 	if (events & (POLLIN | POLLRDNORM)) {
743a843d7cSArnd Bergmann 		if (stat & 0xff0000)
753a843d7cSArnd Bergmann 			ret |= POLLIN | POLLRDNORM;
763a843d7cSArnd Bergmann 		else {
778af30675SJeremy Kerr 			spu_int_stat_clear(spu, 2, CLASS2_MAILBOX_INTR);
788af30675SJeremy Kerr 			spu_int_mask_or(spu, 2, CLASS2_ENABLE_MAILBOX_INTR);
793a843d7cSArnd Bergmann 		}
803a843d7cSArnd Bergmann 	}
813a843d7cSArnd Bergmann 	if (events & (POLLOUT | POLLWRNORM)) {
823a843d7cSArnd Bergmann 		if (stat & 0x00ff00)
833a843d7cSArnd Bergmann 			ret = POLLOUT | POLLWRNORM;
843a843d7cSArnd Bergmann 		else {
858af30675SJeremy Kerr 			spu_int_stat_clear(spu, 2,
868af30675SJeremy Kerr 					CLASS2_MAILBOX_THRESHOLD_INTR);
878af30675SJeremy Kerr 			spu_int_mask_or(spu, 2,
888af30675SJeremy Kerr 					CLASS2_ENABLE_MAILBOX_THRESHOLD_INTR);
893a843d7cSArnd Bergmann 		}
903a843d7cSArnd Bergmann 	}
913a843d7cSArnd Bergmann 	spin_unlock_irq(&spu->register_lock);
923a843d7cSArnd Bergmann 	return ret;
933a843d7cSArnd Bergmann }
943a843d7cSArnd Bergmann 
958b3d6663SArnd Bergmann static int spu_hw_ibox_read(struct spu_context *ctx, u32 * data)
968b3d6663SArnd Bergmann {
978b3d6663SArnd Bergmann 	struct spu *spu = ctx->spu;
988b3d6663SArnd Bergmann 	struct spu_problem __iomem *prob = spu->problem;
998b3d6663SArnd Bergmann 	struct spu_priv2 __iomem *priv2 = spu->priv2;
1008b3d6663SArnd Bergmann 	int ret;
1018b3d6663SArnd Bergmann 
1028b3d6663SArnd Bergmann 	spin_lock_irq(&spu->register_lock);
1038b3d6663SArnd Bergmann 	if (in_be32(&prob->mb_stat_R) & 0xff0000) {
1048b3d6663SArnd Bergmann 		/* read the first available word */
1058b3d6663SArnd Bergmann 		*data = in_be64(&priv2->puint_mb_R);
1068b3d6663SArnd Bergmann 		ret = 4;
1078b3d6663SArnd Bergmann 	} else {
1088b3d6663SArnd Bergmann 		/* make sure we get woken up by the interrupt */
1098af30675SJeremy Kerr 		spu_int_mask_or(spu, 2, CLASS2_ENABLE_MAILBOX_INTR);
1108b3d6663SArnd Bergmann 		ret = 0;
1118b3d6663SArnd Bergmann 	}
1128b3d6663SArnd Bergmann 	spin_unlock_irq(&spu->register_lock);
1138b3d6663SArnd Bergmann 	return ret;
1148b3d6663SArnd Bergmann }
1158b3d6663SArnd Bergmann 
1168b3d6663SArnd Bergmann static int spu_hw_wbox_write(struct spu_context *ctx, u32 data)
1178b3d6663SArnd Bergmann {
1188b3d6663SArnd Bergmann 	struct spu *spu = ctx->spu;
1198b3d6663SArnd Bergmann 	struct spu_problem __iomem *prob = spu->problem;
1208b3d6663SArnd Bergmann 	int ret;
1218b3d6663SArnd Bergmann 
1228b3d6663SArnd Bergmann 	spin_lock_irq(&spu->register_lock);
1238b3d6663SArnd Bergmann 	if (in_be32(&prob->mb_stat_R) & 0x00ff00) {
1248b3d6663SArnd Bergmann 		/* we have space to write wbox_data to */
1258b3d6663SArnd Bergmann 		out_be32(&prob->spu_mb_W, data);
1268b3d6663SArnd Bergmann 		ret = 4;
1278b3d6663SArnd Bergmann 	} else {
1288b3d6663SArnd Bergmann 		/* make sure we get woken up by the interrupt when space
1298b3d6663SArnd Bergmann 		   becomes available */
1308af30675SJeremy Kerr 		spu_int_mask_or(spu, 2, CLASS2_ENABLE_MAILBOX_THRESHOLD_INTR);
1318b3d6663SArnd Bergmann 		ret = 0;
1328b3d6663SArnd Bergmann 	}
1338b3d6663SArnd Bergmann 	spin_unlock_irq(&spu->register_lock);
1348b3d6663SArnd Bergmann 	return ret;
1358b3d6663SArnd Bergmann }
1368b3d6663SArnd Bergmann 
1378b3d6663SArnd Bergmann static void spu_hw_signal1_write(struct spu_context *ctx, u32 data)
1388b3d6663SArnd Bergmann {
1398b3d6663SArnd Bergmann 	out_be32(&ctx->spu->problem->signal_notify1, data);
1408b3d6663SArnd Bergmann }
1418b3d6663SArnd Bergmann 
1428b3d6663SArnd Bergmann static void spu_hw_signal2_write(struct spu_context *ctx, u32 data)
1438b3d6663SArnd Bergmann {
1448b3d6663SArnd Bergmann 	out_be32(&ctx->spu->problem->signal_notify2, data);
1458b3d6663SArnd Bergmann }
1468b3d6663SArnd Bergmann 
1478b3d6663SArnd Bergmann static void spu_hw_signal1_type_set(struct spu_context *ctx, u64 val)
1488b3d6663SArnd Bergmann {
1498b3d6663SArnd Bergmann 	struct spu *spu = ctx->spu;
1508b3d6663SArnd Bergmann 	struct spu_priv2 __iomem *priv2 = spu->priv2;
1518b3d6663SArnd Bergmann 	u64 tmp;
1528b3d6663SArnd Bergmann 
1538b3d6663SArnd Bergmann 	spin_lock_irq(&spu->register_lock);
1548b3d6663SArnd Bergmann 	tmp = in_be64(&priv2->spu_cfg_RW);
1558b3d6663SArnd Bergmann 	if (val)
1568b3d6663SArnd Bergmann 		tmp |= 1;
1578b3d6663SArnd Bergmann 	else
1588b3d6663SArnd Bergmann 		tmp &= ~1;
1598b3d6663SArnd Bergmann 	out_be64(&priv2->spu_cfg_RW, tmp);
1608b3d6663SArnd Bergmann 	spin_unlock_irq(&spu->register_lock);
1618b3d6663SArnd Bergmann }
1628b3d6663SArnd Bergmann 
1638b3d6663SArnd Bergmann static u64 spu_hw_signal1_type_get(struct spu_context *ctx)
1648b3d6663SArnd Bergmann {
1658b3d6663SArnd Bergmann 	return ((in_be64(&ctx->spu->priv2->spu_cfg_RW) & 1) != 0);
1668b3d6663SArnd Bergmann }
1678b3d6663SArnd Bergmann 
1688b3d6663SArnd Bergmann static void spu_hw_signal2_type_set(struct spu_context *ctx, u64 val)
1698b3d6663SArnd Bergmann {
1708b3d6663SArnd Bergmann 	struct spu *spu = ctx->spu;
1718b3d6663SArnd Bergmann 	struct spu_priv2 __iomem *priv2 = spu->priv2;
1728b3d6663SArnd Bergmann 	u64 tmp;
1738b3d6663SArnd Bergmann 
1748b3d6663SArnd Bergmann 	spin_lock_irq(&spu->register_lock);
1758b3d6663SArnd Bergmann 	tmp = in_be64(&priv2->spu_cfg_RW);
1768b3d6663SArnd Bergmann 	if (val)
1778b3d6663SArnd Bergmann 		tmp |= 2;
1788b3d6663SArnd Bergmann 	else
1798b3d6663SArnd Bergmann 		tmp &= ~2;
1808b3d6663SArnd Bergmann 	out_be64(&priv2->spu_cfg_RW, tmp);
1818b3d6663SArnd Bergmann 	spin_unlock_irq(&spu->register_lock);
1828b3d6663SArnd Bergmann }
1838b3d6663SArnd Bergmann 
1848b3d6663SArnd Bergmann static u64 spu_hw_signal2_type_get(struct spu_context *ctx)
1858b3d6663SArnd Bergmann {
1868b3d6663SArnd Bergmann 	return ((in_be64(&ctx->spu->priv2->spu_cfg_RW) & 2) != 0);
1878b3d6663SArnd Bergmann }
1888b3d6663SArnd Bergmann 
1898b3d6663SArnd Bergmann static u32 spu_hw_npc_read(struct spu_context *ctx)
1908b3d6663SArnd Bergmann {
1918b3d6663SArnd Bergmann 	return in_be32(&ctx->spu->problem->spu_npc_RW);
1928b3d6663SArnd Bergmann }
1938b3d6663SArnd Bergmann 
1948b3d6663SArnd Bergmann static void spu_hw_npc_write(struct spu_context *ctx, u32 val)
1958b3d6663SArnd Bergmann {
1968b3d6663SArnd Bergmann 	out_be32(&ctx->spu->problem->spu_npc_RW, val);
1978b3d6663SArnd Bergmann }
1988b3d6663SArnd Bergmann 
1998b3d6663SArnd Bergmann static u32 spu_hw_status_read(struct spu_context *ctx)
2008b3d6663SArnd Bergmann {
2018b3d6663SArnd Bergmann 	return in_be32(&ctx->spu->problem->spu_status_R);
2028b3d6663SArnd Bergmann }
2038b3d6663SArnd Bergmann 
2048b3d6663SArnd Bergmann static char *spu_hw_get_ls(struct spu_context *ctx)
2058b3d6663SArnd Bergmann {
2068b3d6663SArnd Bergmann 	return ctx->spu->local_store;
2078b3d6663SArnd Bergmann }
2088b3d6663SArnd Bergmann 
209cc210b3eSLuke Browning static void spu_hw_privcntl_write(struct spu_context *ctx, u64 val)
210cc210b3eSLuke Browning {
211cc210b3eSLuke Browning 	out_be64(&ctx->spu->priv2->spu_privcntl_RW, val);
212cc210b3eSLuke Browning }
213cc210b3eSLuke Browning 
2143960c260SJeremy Kerr static u32 spu_hw_runcntl_read(struct spu_context *ctx)
2153960c260SJeremy Kerr {
2163960c260SJeremy Kerr 	return in_be32(&ctx->spu->problem->spu_runcntl_RW);
2173960c260SJeremy Kerr }
2183960c260SJeremy Kerr 
2195110459fSArnd Bergmann static void spu_hw_runcntl_write(struct spu_context *ctx, u32 val)
2205110459fSArnd Bergmann {
2215737edd1SMark Nutter 	spin_lock_irq(&ctx->spu->register_lock);
2225737edd1SMark Nutter 	if (val & SPU_RUNCNTL_ISOLATE)
223cc210b3eSLuke Browning 		spu_hw_privcntl_write(ctx,
224cc210b3eSLuke Browning 			SPU_PRIVCNT_LOAD_REQUEST_ENABLE_MASK);
2255110459fSArnd Bergmann 	out_be32(&ctx->spu->problem->spu_runcntl_RW, val);
2265737edd1SMark Nutter 	spin_unlock_irq(&ctx->spu->register_lock);
2275110459fSArnd Bergmann }
2285110459fSArnd Bergmann 
229c25620d7SMasato Noguchi static void spu_hw_runcntl_stop(struct spu_context *ctx)
230c25620d7SMasato Noguchi {
231c25620d7SMasato Noguchi 	spin_lock_irq(&ctx->spu->register_lock);
232c25620d7SMasato Noguchi 	out_be32(&ctx->spu->problem->spu_runcntl_RW, SPU_RUNCNTL_STOP);
233c25620d7SMasato Noguchi 	while (in_be32(&ctx->spu->problem->spu_status_R) & SPU_STATUS_RUNNING)
234c25620d7SMasato Noguchi 		cpu_relax();
235c25620d7SMasato Noguchi 	spin_unlock_irq(&ctx->spu->register_lock);
236c25620d7SMasato Noguchi }
237c25620d7SMasato Noguchi 
238ee2d7340SArnd Bergmann static void spu_hw_master_start(struct spu_context *ctx)
2395110459fSArnd Bergmann {
240ee2d7340SArnd Bergmann 	struct spu *spu = ctx->spu;
241ee2d7340SArnd Bergmann 	u64 sr1;
242ee2d7340SArnd Bergmann 
243ee2d7340SArnd Bergmann 	spin_lock_irq(&spu->register_lock);
244ee2d7340SArnd Bergmann 	sr1 = spu_mfc_sr1_get(spu) | MFC_STATE1_MASTER_RUN_CONTROL_MASK;
245ee2d7340SArnd Bergmann 	spu_mfc_sr1_set(spu, sr1);
246ee2d7340SArnd Bergmann 	spin_unlock_irq(&spu->register_lock);
247ee2d7340SArnd Bergmann }
248ee2d7340SArnd Bergmann 
249ee2d7340SArnd Bergmann static void spu_hw_master_stop(struct spu_context *ctx)
250ee2d7340SArnd Bergmann {
251ee2d7340SArnd Bergmann 	struct spu *spu = ctx->spu;
252ee2d7340SArnd Bergmann 	u64 sr1;
253ee2d7340SArnd Bergmann 
254ee2d7340SArnd Bergmann 	spin_lock_irq(&spu->register_lock);
255ee2d7340SArnd Bergmann 	sr1 = spu_mfc_sr1_get(spu) & ~MFC_STATE1_MASTER_RUN_CONTROL_MASK;
256ee2d7340SArnd Bergmann 	spu_mfc_sr1_set(spu, sr1);
257ee2d7340SArnd Bergmann 	spin_unlock_irq(&spu->register_lock);
2585110459fSArnd Bergmann }
2595110459fSArnd Bergmann 
260a33a7d73SArnd Bergmann static int spu_hw_set_mfc_query(struct spu_context * ctx, u32 mask, u32 mode)
261a33a7d73SArnd Bergmann {
262ed2bfcd2SAl Viro 	struct spu_problem __iomem *prob = ctx->spu->problem;
263a33a7d73SArnd Bergmann 	int ret;
264a33a7d73SArnd Bergmann 
265a33a7d73SArnd Bergmann 	spin_lock_irq(&ctx->spu->register_lock);
266a33a7d73SArnd Bergmann 	ret = -EAGAIN;
267a33a7d73SArnd Bergmann 	if (in_be32(&prob->dma_querytype_RW))
268a33a7d73SArnd Bergmann 		goto out;
269a33a7d73SArnd Bergmann 	ret = 0;
270a33a7d73SArnd Bergmann 	out_be32(&prob->dma_querymask_RW, mask);
271a33a7d73SArnd Bergmann 	out_be32(&prob->dma_querytype_RW, mode);
272a33a7d73SArnd Bergmann out:
273a33a7d73SArnd Bergmann 	spin_unlock_irq(&ctx->spu->register_lock);
274a33a7d73SArnd Bergmann 	return ret;
275a33a7d73SArnd Bergmann }
276a33a7d73SArnd Bergmann 
277a33a7d73SArnd Bergmann static u32 spu_hw_read_mfc_tagstatus(struct spu_context * ctx)
278a33a7d73SArnd Bergmann {
279a33a7d73SArnd Bergmann 	return in_be32(&ctx->spu->problem->dma_tagstatus_R);
280a33a7d73SArnd Bergmann }
281a33a7d73SArnd Bergmann 
282a33a7d73SArnd Bergmann static u32 spu_hw_get_mfc_free_elements(struct spu_context *ctx)
283a33a7d73SArnd Bergmann {
284a33a7d73SArnd Bergmann 	return in_be32(&ctx->spu->problem->dma_qstatus_R);
285a33a7d73SArnd Bergmann }
286a33a7d73SArnd Bergmann 
287a33a7d73SArnd Bergmann static int spu_hw_send_mfc_command(struct spu_context *ctx,
288a33a7d73SArnd Bergmann 					struct mfc_dma_command *cmd)
289a33a7d73SArnd Bergmann {
290a33a7d73SArnd Bergmann 	u32 status;
291ed2bfcd2SAl Viro 	struct spu_problem __iomem *prob = ctx->spu->problem;
292a33a7d73SArnd Bergmann 
293a33a7d73SArnd Bergmann 	spin_lock_irq(&ctx->spu->register_lock);
294a33a7d73SArnd Bergmann 	out_be32(&prob->mfc_lsa_W, cmd->lsa);
295a33a7d73SArnd Bergmann 	out_be64(&prob->mfc_ea_W, cmd->ea);
296a33a7d73SArnd Bergmann 	out_be32(&prob->mfc_union_W.by32.mfc_size_tag32,
297a33a7d73SArnd Bergmann 				cmd->size << 16 | cmd->tag);
298a33a7d73SArnd Bergmann 	out_be32(&prob->mfc_union_W.by32.mfc_class_cmd32,
299a33a7d73SArnd Bergmann 				cmd->class << 16 | cmd->cmd);
300a33a7d73SArnd Bergmann 	status = in_be32(&prob->mfc_union_W.by32.mfc_class_cmd32);
301a33a7d73SArnd Bergmann 	spin_unlock_irq(&ctx->spu->register_lock);
302a33a7d73SArnd Bergmann 
303a33a7d73SArnd Bergmann 	switch (status & 0xffff) {
304a33a7d73SArnd Bergmann 	case 0:
305a33a7d73SArnd Bergmann 		return 0;
306a33a7d73SArnd Bergmann 	case 2:
307a33a7d73SArnd Bergmann 		return -EAGAIN;
308a33a7d73SArnd Bergmann 	default:
309a33a7d73SArnd Bergmann 		return -EINVAL;
310a33a7d73SArnd Bergmann 	}
311a33a7d73SArnd Bergmann }
312a33a7d73SArnd Bergmann 
31357dace23SArnd Bergmann static void spu_hw_restart_dma(struct spu_context *ctx)
31457dace23SArnd Bergmann {
31557dace23SArnd Bergmann 	struct spu_priv2 __iomem *priv2 = ctx->spu->priv2;
31657dace23SArnd Bergmann 
31757dace23SArnd Bergmann 	if (!test_bit(SPU_CONTEXT_SWITCH_PENDING, &ctx->spu->flags))
31857dace23SArnd Bergmann 		out_be64(&priv2->mfc_control_RW, MFC_CNTL_RESTART_DMA_COMMAND);
31957dace23SArnd Bergmann }
32057dace23SArnd Bergmann 
3218b3d6663SArnd Bergmann struct spu_context_ops spu_hw_ops = {
3228b3d6663SArnd Bergmann 	.mbox_read = spu_hw_mbox_read,
3238b3d6663SArnd Bergmann 	.mbox_stat_read = spu_hw_mbox_stat_read,
3243a843d7cSArnd Bergmann 	.mbox_stat_poll = spu_hw_mbox_stat_poll,
3258b3d6663SArnd Bergmann 	.ibox_read = spu_hw_ibox_read,
3268b3d6663SArnd Bergmann 	.wbox_write = spu_hw_wbox_write,
3278b3d6663SArnd Bergmann 	.signal1_write = spu_hw_signal1_write,
3288b3d6663SArnd Bergmann 	.signal2_write = spu_hw_signal2_write,
3298b3d6663SArnd Bergmann 	.signal1_type_set = spu_hw_signal1_type_set,
3308b3d6663SArnd Bergmann 	.signal1_type_get = spu_hw_signal1_type_get,
3318b3d6663SArnd Bergmann 	.signal2_type_set = spu_hw_signal2_type_set,
3328b3d6663SArnd Bergmann 	.signal2_type_get = spu_hw_signal2_type_get,
3338b3d6663SArnd Bergmann 	.npc_read = spu_hw_npc_read,
3348b3d6663SArnd Bergmann 	.npc_write = spu_hw_npc_write,
3358b3d6663SArnd Bergmann 	.status_read = spu_hw_status_read,
3368b3d6663SArnd Bergmann 	.get_ls = spu_hw_get_ls,
337cc210b3eSLuke Browning 	.privcntl_write = spu_hw_privcntl_write,
3383960c260SJeremy Kerr 	.runcntl_read = spu_hw_runcntl_read,
3395110459fSArnd Bergmann 	.runcntl_write = spu_hw_runcntl_write,
340c25620d7SMasato Noguchi 	.runcntl_stop = spu_hw_runcntl_stop,
341ee2d7340SArnd Bergmann 	.master_start = spu_hw_master_start,
342ee2d7340SArnd Bergmann 	.master_stop = spu_hw_master_stop,
343a33a7d73SArnd Bergmann 	.set_mfc_query = spu_hw_set_mfc_query,
344a33a7d73SArnd Bergmann 	.read_mfc_tagstatus = spu_hw_read_mfc_tagstatus,
345a33a7d73SArnd Bergmann 	.get_mfc_free_elements = spu_hw_get_mfc_free_elements,
346a33a7d73SArnd Bergmann 	.send_mfc_command = spu_hw_send_mfc_command,
34757dace23SArnd Bergmann 	.restart_dma = spu_hw_restart_dma,
3488b3d6663SArnd Bergmann };
349