X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=board%2Fti%2Fsdp4430%2Fsdp.c;h=7039bd559b335437b71376c715fd5dabf46e6c62;hb=fe8d63c8c75acc87d398b2e181b9135d2ecfc05a;hp=6ae016c6b8947cb234ef4718c23896cb4fe61048;hpb=16909f34b76e89871c0da528d6fe2ebf4e32231e;p=oweals%2Fu-boot.git diff --git a/board/ti/sdp4430/sdp.c b/board/ti/sdp4430/sdp.c index 6ae016c6b8..7039bd559b 100644 --- a/board/ti/sdp4430/sdp.c +++ b/board/ti/sdp4430/sdp.c @@ -25,6 +25,8 @@ #include #include +#include "sdp.h" + DECLARE_GLOBAL_DATA_PTR; const struct omap_sysinfo sysinfo = { @@ -38,6 +40,8 @@ const struct omap_sysinfo sysinfo = { */ int board_init(void) { + gpmc_init(); + gd->bd->bi_arch_number = MACH_TYPE_OMAP_4430SDP; gd->bd->bi_boot_params = (0x80000000 + 0x100); /* boot param addr */ @@ -60,3 +64,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)); +}