diff options
Diffstat (limited to 'board')
-rw-r--r-- | board/calao/sbc35_a9g20/sbc35_a9g20.c | 1 | ||||
-rw-r--r-- | board/calao/tny_a9260/tny_a9260.c | 5 | ||||
-rw-r--r-- | board/denx/m28evk/u-boot.bd | 8 | ||||
-rw-r--r-- | board/freescale/mx51evk/mx51evk.c | 3 | ||||
-rw-r--r-- | board/freescale/mx53loco/mx53loco.c | 3 | ||||
-rw-r--r-- | board/lubbock/lubbock.c | 6 | ||||
-rw-r--r-- | board/ti/panda/panda.c | 59 |
7 files changed, 73 insertions, 12 deletions
diff --git a/board/calao/sbc35_a9g20/sbc35_a9g20.c b/board/calao/sbc35_a9g20/sbc35_a9g20.c index 4f5cff68ec..b6c8791f04 100644 --- a/board/calao/sbc35_a9g20/sbc35_a9g20.c +++ b/board/calao/sbc35_a9g20/sbc35_a9g20.c @@ -152,7 +152,6 @@ int board_init(void) /* Enable Ctrlc */ console_init_f(); - gd->bd->bi_arch_number = MACH_TYPE_SBC35_A9G20; /* adress of boot parameters */ gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100; diff --git a/board/calao/tny_a9260/tny_a9260.c b/board/calao/tny_a9260/tny_a9260.c index 24de177dde..31074d0e21 100644 --- a/board/calao/tny_a9260/tny_a9260.c +++ b/board/calao/tny_a9260/tny_a9260.c @@ -86,11 +86,6 @@ int board_init(void) /* Enable Ctrlc */ console_init_f(); -#if defined(CONFIG_TNY_A9260) - gd->bd->bi_arch_number = MACH_TYPE_TNY_A9260; -#elif defined(CONFIG_TNY_A9G20) - gd->bd->bi_arch_number = MACH_TYPE_TNY_A9G20; -#endif /* adress of boot parameters */ gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100; diff --git a/board/denx/m28evk/u-boot.bd b/board/denx/m28evk/u-boot.bd index 3ce7f92d70..c60615a456 100644 --- a/board/denx/m28evk/u-boot.bd +++ b/board/denx/m28evk/u-boot.bd @@ -4,11 +4,11 @@ sources { } section (0) { - load u_boot_spl > 0x0000; - load ivt (entry = 0x0014) > 0x8000; + load u_boot_spl > 0x0000; + load ivt (entry = 0x0014) > 0x8000; hab call 0x8000; - load u_boot > 0x40000100; - load ivt (entry = 0x40000100) > 0x8000; + load u_boot > 0x40000100; + load ivt (entry = 0x40000100) > 0x8000; hab call 0x8000; } diff --git a/board/freescale/mx51evk/mx51evk.c b/board/freescale/mx51evk/mx51evk.c index 13c59413ec..e43aaf726e 100644 --- a/board/freescale/mx51evk/mx51evk.c +++ b/board/freescale/mx51evk/mx51evk.c @@ -203,7 +203,7 @@ static void setup_usb_h1(void) mxc_iomux_set_pad(MX51_PIN_EIM_D21, GPIO_PAD); } -void board_ehci_hcd_init(int port) +int board_ehci_hcd_init(int port) { /* Set USBH1_STP to GPIO and toggle it */ mxc_request_iomux(MX51_PIN_USBH1_STP, IOMUX_CONFIG_GPIO); @@ -228,6 +228,7 @@ void board_ehci_hcd_init(int port) gpio_direction_output(MX51EVK_USBH1_HUB_RST, 0); mdelay(2); gpio_set_value(MX51EVK_USBH1_HUB_RST, 1); + return 0; } #endif diff --git a/board/freescale/mx53loco/mx53loco.c b/board/freescale/mx53loco/mx53loco.c index 57170ce045..ea4d354311 100644 --- a/board/freescale/mx53loco/mx53loco.c +++ b/board/freescale/mx53loco/mx53loco.c @@ -79,12 +79,13 @@ static void setup_iomux_uart(void) } #ifdef CONFIG_USB_EHCI_MX5 -void board_ehci_hcd_init(int port) +int board_ehci_hcd_init(int port) { /* request VBUS power enable pin, GPIO[8}, gpio7 */ mxc_request_iomux(MX53_PIN_ATA_DA_2, IOMUX_CONFIG_ALT1); gpio_direction_output(IOMUX_TO_GPIO(MX53_PIN_ATA_DA_2), 0); gpio_set_value(IOMUX_TO_GPIO(MX53_PIN_ATA_DA_2), 1); + return 0; } #endif diff --git a/board/lubbock/lubbock.c b/board/lubbock/lubbock.c index 437f944715..3527b381df 100644 --- a/board/lubbock/lubbock.c +++ b/board/lubbock/lubbock.c @@ -28,6 +28,8 @@ #include <common.h> #include <netdev.h> #include <asm/arch/pxa.h> +#include <asm/arch/pxa-regs.h> +#include <asm/io.h> DECLARE_GLOBAL_DATA_PTR; @@ -47,6 +49,10 @@ int board_init (void) /* adress of boot parameters */ gd->bd->bi_boot_params = 0xa0000100; + /* Configure GPIO6 and GPIO8 as OUT, AF1. */ + setbits_le32(GPDR0, (1 << 6) | (1 << 8)); + clrsetbits_le32(GAFR0_L, (3 << 12) | (3 << 16), (1 << 12) | (1 << 16)); + return 0; } diff --git a/board/ti/panda/panda.c b/board/ti/panda/panda.c index b4271fb58a..fc8c0b4bc6 100644 --- a/board/ti/panda/panda.c +++ b/board/ti/panda/panda.c @@ -24,15 +24,21 @@ #include <common.h> #include <asm/arch/sys_proto.h> #include <asm/arch/mmc_host_def.h> +#include <asm/arch/clocks.h> +#include <asm/arch/gpio.h> #include "panda_mux_data.h" +#define PANDA_ULPI_PHY_TYPE_GPIO 182 + DECLARE_GLOBAL_DATA_PTR; const struct omap_sysinfo sysinfo = { "Board: OMAP4 Panda\n" }; +struct omap4_scrm_regs *const scrm = (struct omap4_scrm_regs *)0x4a30a000; + /** * @brief board_init * @@ -62,6 +68,59 @@ int board_eth_init(bd_t *bis) */ int misc_init_r(void) { + int phy_type; + u32 auxclk, altclksrc; + + /* EHCI is not supported on ES1.0 */ + if (omap_revision() == OMAP4430_ES1_0) + return 0; + + gpio_direction_input(PANDA_ULPI_PHY_TYPE_GPIO); + phy_type = gpio_get_value(PANDA_ULPI_PHY_TYPE_GPIO); + + if (phy_type == 1) { + /* ULPI PHY supplied by auxclk3 derived from sys_clk */ + debug("ULPI PHY supplied by auxclk3\n"); + + auxclk = readl(&scrm->auxclk3); + /* Select sys_clk */ + auxclk &= ~AUXCLK_SRCSELECT_MASK; + auxclk |= AUXCLK_SRCSELECT_SYS_CLK << AUXCLK_SRCSELECT_SHIFT; + /* Set the divisor to 2 */ + auxclk &= ~AUXCLK_CLKDIV_MASK; + auxclk |= AUXCLK_CLKDIV_2 << AUXCLK_CLKDIV_SHIFT; + /* Request auxilary clock #3 */ + auxclk |= AUXCLK_ENABLE_MASK; + + writel(auxclk, &scrm->auxclk3); + } else { + /* ULPI PHY supplied by auxclk1 derived from PER dpll */ + debug("ULPI PHY supplied by auxclk1\n"); + + auxclk = readl(&scrm->auxclk1); + /* Select per DPLL */ + auxclk &= ~AUXCLK_SRCSELECT_MASK; + auxclk |= AUXCLK_SRCSELECT_PER_DPLL << AUXCLK_SRCSELECT_SHIFT; + /* Set the divisor to 16 */ + auxclk &= ~AUXCLK_CLKDIV_MASK; + auxclk |= AUXCLK_CLKDIV_16 << AUXCLK_CLKDIV_SHIFT; + /* Request auxilary clock #3 */ + auxclk |= AUXCLK_ENABLE_MASK; + + writel(auxclk, &scrm->auxclk1); + } + + altclksrc = readl(&scrm->altclksrc); + + /* Activate alternate system clock supplier */ + altclksrc &= ~ALTCLKSRC_MODE_MASK; + altclksrc |= ALTCLKSRC_MODE_ACTIVE; + + /* enable clocks */ + altclksrc |= ALTCLKSRC_ENABLE_INT_MASK | ALTCLKSRC_ENABLE_EXT_MASK; + + writel(altclksrc, &scrm->altclksrc); + return 0; } |