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

some code need the LAWAR_EN, make them sharable.
Signed-off-by: Dave Liu daveliu@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;

NAND boot
-----Original Message----- From: Kumar Gala [mailto:galak@kernel.crashing.org] Sent: 2008?12?17? 1:54 AM To: Liu Dave-R63238 Cc: u-boot@lists.denx.de; Loeliger Jon-LOELIGER; Fleming Andy-AFLEMING Subject: Re: [U-Boot] [PATCH 3/3] Move the LAW definition to fsl_law.h
On Dec 15, 2008, at 10:09 PM, Dave Liu wrote:
some code need the LAWAR_EN, make them sharable.
what code?
- k

On Dec 16, 2008, at 10:55 PM, Liu Dave wrote:
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
-----Original Message----- From: Kumar Gala [mailto:galak@kernel.crashing.org] Sent: 2008?12?17? 1:54 AM To: Liu Dave-R63238 Cc: u-boot@lists.denx.de; Loeliger Jon-LOELIGER; Fleming Andy- AFLEMING Subject: Re: [U-Boot] [PATCH 3/3] Move the LAW definition to fsl_law.h
On Dec 15, 2008, at 10:09 PM, Dave Liu wrote:
some code need the LAWAR_EN, make them sharable.
what code?
- k

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
participants (3)
-
Dave Liu
-
Kumar Gala
-
Liu Dave