summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2008-02-15 00:26:52 +0100
committerWolfgang Denk <wd@denx.de>2008-02-15 00:26:52 +0100
commit9e04a8138892d64848dc6e8e74213086d9190d9a (patch)
tree1740a361891d2390631ec053f1bc42e524913b78 /drivers
parent32c70d3420739930165271d9a1b04572adf799fd (diff)
parent746c4b9490495dc4381dbcc49f40078d423e0a48 (diff)
downloadu-boot-imx-9e04a8138892d64848dc6e8e74213086d9190d9a.zip
u-boot-imx-9e04a8138892d64848dc6e8e74213086d9190d9a.tar.gz
u-boot-imx-9e04a8138892d64848dc6e8e74213086d9190d9a.tar.bz2
Merge branch 'master' of git://www.denx.de/git/u-boot-mpc86xx
Conflicts: common/cmd_reginfo.c Signed-off-by: Wolfgang Denk <wd@denx.de>
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;