[PATCH] powerpc: Moved dcr support to arch/powerpc
authorKumar Gala <galak@freescale.com>
Wed, 26 Oct 2005 14:56:10 +0000 (09:56 -0500)
committerPaul Mackerras <paulus@samba.org>
Thu, 27 Oct 2005 10:51:22 +0000 (20:51 +1000)
Signed-off-by: Kumar K. Gala <kumar.gala@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/sysdev/Makefile
arch/powerpc/sysdev/dcr.S [new file with mode: 0644]
arch/ppc/syslib/Makefile
arch/ppc/syslib/dcr.S [deleted file]

index 97119c0ffc72b96c5d5f3b6ea6bde36ab301c6b3..d071ae875e25de62051d350adecd7603417ce68c 100644 (file)
@@ -2,3 +2,5 @@ obj-$(CONFIG_MPIC)              += mpic.o
 obj-$(CONFIG_PPC_INDIRECT_PCI) += indirect_pci.o
 obj-$(CONFIG_PPC_I8259)                += i8259.o
 obj-$(CONFIG_PPC_MPC106)       += grackle.o
+obj-$(CONFIG_BOOKE)            += dcr.o
+obj-$(CONFIG_40x)              += dcr.o
diff --git a/arch/powerpc/sysdev/dcr.S b/arch/powerpc/sysdev/dcr.S
new file mode 100644 (file)
index 0000000..895f102
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+ * arch/ppc/syslib/dcr.S
+ *
+ * "Indirect" DCR access
+ *
+ * Copyright (c) 2004 Eugene Surovegin <ebs@ebshome.net>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under  the terms of  the GNU General Public License as published by the
+ * Free Software Foundation;  either version 2 of the License, or (at your
+ * option) any later version.
+ */
+
+#include <asm/ppc_asm.h>
+#include <asm/processor.h>
+
+#define DCR_ACCESS_PROLOG(table) \
+       rlwinm  r3,r3,4,18,27;   \
+       lis     r5,table@h;      \
+       ori     r5,r5,table@l;   \
+       add     r3,r3,r5;        \
+       mtctr   r3;              \
+       bctr
+
+_GLOBAL(__mfdcr)
+       DCR_ACCESS_PROLOG(__mfdcr_table)
+
+_GLOBAL(__mtdcr)
+       DCR_ACCESS_PROLOG(__mtdcr_table)
+
+__mfdcr_table:
+       mfdcr  r3,0; blr
+__mtdcr_table:
+       mtdcr  0,r4; blr
+
+dcr     = 1
+        .rept   1023
+       mfdcr   r3,dcr; blr
+       mtdcr   dcr,r4; blr
+       dcr     = dcr + 1
+       .endr
index e6e6aa4d291ebca89215164418771ea5bc5d3a4d..b4ef15b45c4ab8306e0e0118a36e6b6a5146ac60 100644 (file)
@@ -86,8 +86,6 @@ endif
 obj-$(CONFIG_BOOTX_TEXT)       += btext.o
 obj-$(CONFIG_MPC10X_BRIDGE)    += mpc10x_common.o ppc_sys.o
 obj-$(CONFIG_MPC10X_OPENPIC)   += open_pic.o
-obj-$(CONFIG_40x)              += dcr.o
-obj-$(CONFIG_BOOKE)            += dcr.o
 obj-$(CONFIG_85xx)             += open_pic.o ppc85xx_common.o ppc85xx_setup.o \
                                        ppc_sys.o mpc85xx_sys.o \
                                        mpc85xx_devices.o
diff --git a/arch/ppc/syslib/dcr.S b/arch/ppc/syslib/dcr.S
deleted file mode 100644 (file)
index 895f102..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * arch/ppc/syslib/dcr.S
- *
- * "Indirect" DCR access
- *
- * Copyright (c) 2004 Eugene Surovegin <ebs@ebshome.net>
- *
- * This program is free software; you can redistribute it and/or modify it
- * under  the terms of  the GNU General Public License as published by the
- * Free Software Foundation;  either version 2 of the License, or (at your
- * option) any later version.
- */
-
-#include <asm/ppc_asm.h>
-#include <asm/processor.h>
-
-#define DCR_ACCESS_PROLOG(table) \
-       rlwinm  r3,r3,4,18,27;   \
-       lis     r5,table@h;      \
-       ori     r5,r5,table@l;   \
-       add     r3,r3,r5;        \
-       mtctr   r3;              \
-       bctr
-
-_GLOBAL(__mfdcr)
-       DCR_ACCESS_PROLOG(__mfdcr_table)
-
-_GLOBAL(__mtdcr)
-       DCR_ACCESS_PROLOG(__mtdcr_table)
-
-__mfdcr_table:
-       mfdcr  r3,0; blr
-__mtdcr_table:
-       mtdcr  0,r4; blr
-
-dcr     = 1
-        .rept   1023
-       mfdcr   r3,dcr; blr
-       mtdcr   dcr,r4; blr
-       dcr     = dcr + 1
-       .endr