summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorBecky Bruce <becky.bruce@freescale.com>2008-01-23 16:31:05 -0600
committerJon Loeliger <jdl@freescale.com>2008-01-24 12:12:51 -0600
commitddcebcb638715a6278da93b553d5016f99823816 (patch)
tree3bee1d9c2d7c38ab14b7cec2439f5ae9e489ae74 /drivers
parent9cd32426f26a0567bb61f339edd83c6a2ce9bfc3 (diff)
downloadu-boot-imx-ddcebcb638715a6278da93b553d5016f99823816.zip
u-boot-imx-ddcebcb638715a6278da93b553d5016f99823816.tar.gz
u-boot-imx-ddcebcb638715a6278da93b553d5016f99823816.tar.bz2
86xx: Add print_laws function to fsl_law.c
This can be used for debug, and will be used by board code to help implement reginfo. Signed-off-by: Becky Bruce <becky.bruce@freescale.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/misc/fsl_law.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/misc/fsl_law.c b/drivers/misc/fsl_law.c
index 8bdf5a7..dca6a4d 100644
--- a/drivers/misc/fsl_law.c
+++ b/drivers/misc/fsl_law.c
@@ -28,6 +28,7 @@
#include <asm/io.h>
#define LAWAR_EN 0x80000000
+#define FSL_HW_NUM_LAWS 10 /* number of LAWs in the hw implementation */
void set_law(u8 idx, phys_addr_t addr, enum law_size sz, enum law_trgt_if id)
{
@@ -53,6 +54,24 @@ void disable_law(u8 idx)
return;
}
+void print_laws(void)
+{
+ volatile u32 *base = (volatile u32 *)(CFG_IMMR + 0xc08);
+ volatile u32 *lawbar = base;
+ volatile u32 *lawar = base + 2;
+ int i;
+
+ printf("\nLocal Access Window Configuration\n");
+ for(i = 0; i < FSL_HW_NUM_LAWS; i++) {
+ printf("\tLAWBAR%d : 0x%08x, LAWAR%d : 0x%08x\n",
+ i, in_be32(lawbar), i, in_be32(lawar));
+ lawbar += 8;
+ lawar += 8;
+ }
+
+ return;
+}
+
void init_laws(void)
{
int i;