diff options
Diffstat (limited to 'board/ti/panda/panda.c')
-rw-r--r-- | board/ti/panda/panda.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/board/ti/panda/panda.c b/board/ti/panda/panda.c index 46a5d1d..1b8153b 100644 --- a/board/ti/panda/panda.c +++ b/board/ti/panda/panda.c @@ -24,6 +24,8 @@ #include <common.h> #include <asm/arch/sys_proto.h> +#include "panda.h" + DECLARE_GLOBAL_DATA_PTR; const struct omap_sysinfo sysinfo = { @@ -37,6 +39,8 @@ const struct omap_sysinfo sysinfo = { */ int board_init(void) { + gpmc_init(); + gd->bd->bi_arch_number = MACH_TYPE_OMAP4_PANDA; gd->bd->bi_boot_params = (0x80000000 + 0x100); /* boot param addr */ @@ -59,3 +63,27 @@ int misc_init_r(void) { return 0; } + +void do_set_mux(u32 base, struct pad_conf_entry const *array, int size) +{ + int i; + struct pad_conf_entry *pad = (struct pad_conf_entry *) array; + + for (i = 0; i < size; i++, pad++) + writew(pad->val, base + pad->offset); +} + +/** + * @brief set_muxconf_regs Setting up the configuration Mux registers + * specific to the board. + */ +void set_muxconf_regs(void) +{ + do_set_mux(CONTROL_PADCONF_CORE, core_padconf_array, + sizeof(core_padconf_array) / + sizeof(struct pad_conf_entry)); + + do_set_mux(CONTROL_PADCONF_WKUP, wkup_padconf_array, + sizeof(wkup_padconf_array) / + sizeof(struct pad_conf_entry)); +} |