[U-Boot] [PATCH 3/3] Move the LAW definition to fsl_law.h

Dave Liu daveliu at freescale.com
Tue Dec 16 05:09:54 CET 2008


some code need the LAWAR_EN, make them sharable.

Signed-off-by: Dave Liu <daveliu at freescale.com>
---
Jon,
The 86xx also is using the fsl_law code,
Could you ack and let Andy pick up to 85xx tree?

Thanks,
Dave

 drivers/misc/fsl_law.c    |   15 ---------------
 include/asm-ppc/fsl_law.h |   16 ++++++++++++++++
 2 files changed, 16 insertions(+), 15 deletions(-)

diff --git a/drivers/misc/fsl_law.c b/drivers/misc/fsl_law.c
index 44c9e91..6facb42 100644
--- a/drivers/misc/fsl_law.c
+++ b/drivers/misc/fsl_law.c
@@ -29,21 +29,6 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-#define LAWAR_EN	0x80000000
-/* number of LAWs in the hw implementation */
-#if defined(CONFIG_MPC8540) || defined(CONFIG_MPC8541) || \
-    defined(CONFIG_MPC8560) || defined(CONFIG_MPC8555)
-#define FSL_HW_NUM_LAWS 8
-#elif defined(CONFIG_MPC8548) || defined(CONFIG_MPC8544) || \
-      defined(CONFIG_MPC8568) || \
-      defined(CONFIG_MPC8641) || defined(CONFIG_MPC8610)
-#define FSL_HW_NUM_LAWS 10
-#elif defined(CONFIG_MPC8536) || defined(CONFIG_MPC8572)
-#define FSL_HW_NUM_LAWS 12
-#else
-#error FSL_HW_NUM_LAWS not defined for this platform
-#endif
-
 void set_law(u8 idx, phys_addr_t addr, enum law_size sz, enum law_trgt_if id)
 {
 	volatile u32 *base = (volatile u32 *)(CONFIG_SYS_IMMR + 0xc08);
diff --git a/include/asm-ppc/fsl_law.h b/include/asm-ppc/fsl_law.h
index 5bba08d..cbcd281 100644
--- a/include/asm-ppc/fsl_law.h
+++ b/include/asm-ppc/fsl_law.h
@@ -65,6 +65,22 @@ enum law_trgt_if {
 #define LAW_TRGT_IF_PCIE_3	LAW_TRGT_IF_PCI
 #endif
 
+#define LAWAR_EN		0x80000000
+
+/* number of LAWs in the hw implementation */
+#if defined(CONFIG_MPC8540) || defined(CONFIG_MPC8541) || \
+    defined(CONFIG_MPC8560) || defined(CONFIG_MPC8555)
+#define FSL_HW_NUM_LAWS		8
+#elif defined(CONFIG_MPC8548) || defined(CONFIG_MPC8544) || \
+      defined(CONFIG_MPC8568) || \
+      defined(CONFIG_MPC8641) || defined(CONFIG_MPC8610)
+#define FSL_HW_NUM_LAWS		10
+#elif defined(CONFIG_MPC8536) || defined(CONFIG_MPC8572)
+#define FSL_HW_NUM_LAWS		12
+#else
+#error FSL_HW_NUM_LAWS not defined for this platform
+#endif
+
 struct law_entry {
 	int index;
 	phys_addr_t addr;
-- 
1.5.4



More information about the U-Boot mailing list