Skip to contentSkip to conversation

Move the LAW definition to fsl_law.h

PATCH New Dave Liu 2 participants 5 messages Dec 16, 2008 – Dec 18, 2008 Char and misc drivers

lore
Share & tools
lore

Dave Liu

author
#0 lore raw

PATCH 3/3 Move the LAW definition to fsl_law.h

some code need the LAWAR_EN, make them sharable.

---
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(-)
drivers/misc/fsl_law.c +0 -15
index 44c9e91..6facb42 100644
@@ -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);
include/asm-ppc/fsl_law.h +16 -0
index 5bba08d..cbcd281 100644
@@ -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;
Signature · 1 line
1.5.4
#1 lore raw

PATCH 3/3 Move the LAW definition to fsl_law.h

Quoted 1 line · Dave Liu

some code need the LAWAR_EN, make them sharable.

what code?

- k

author
#2 lore raw

PATCH 3/3 Move the LAW definition to fsl_law.h

NAND boot

Quoted 17 lines

-----Original Message-----
From: Kumar Gala [mailto:galak at kernel.crashing.org]
Sent: 2008?12?17? 1:54 AM
To: Liu Dave-R63238
Cc: u-boot at lists.denx.de; Loeliger Jon-LOELIGER; Fleming Andy-AFLEMING
Subject: Re: [U-Boot] [PATCH 3/3] Move the LAW definition to fsl_law.h

Quoted 1 line · Dave Liu

some code need the LAWAR_EN, make them sharable.

what code?

- k

#3 lore raw

PATCH 3/3 Move the LAW definition to fsl_law.h

Quoted 1 line · Liu Dave

NAND boot

Lets post this as part of the NAND boot patch series so it can be reviewed in that context. Its not that I'm against this change. However I was trying to isolate explicit knowledge of LAW registers from the rest of the code base when I added fsl_law.c

- k

Quoted 19 lines
Quoted 19 lines

-----Original Message-----
From: Kumar Gala [mailto:galak at kernel.crashing.org]
Sent: 2008?12?17? 1:54 AM
To: Liu Dave-R63238
Cc: u-boot at lists.denx.de; Loeliger Jon-LOELIGER; Fleming Andy- AFLEMING
Subject: Re: [U-Boot] [PATCH 3/3] Move the LAW definition to fsl_law.h

Quoted 1 line · Dave Liu

some code need the LAWAR_EN, make them sharable.

what code?

- k

author
#4 lore raw

PATCH 3/3 Move the LAW definition to fsl_law.h

Quoted 4 lines

Lets post this as part of the NAND boot patch series so it can be reviewed in that context. Its not that I'm against this change. However I was trying to isolate explicit knowledge of LAW registers from the rest of the code base when I added fsl_law.c

You are right, it should be post as part of NAND boot patch. So, I will send the NAND boot patch for the context later. Please comment.

Thanks