diff options
author | Wolfgang Denk <wd@denx.de> | 2011-09-04 21:12:18 +0200 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2011-09-04 21:12:18 +0200 |
commit | 6dfbf49c6dc3687efbc6d7f9e25bb46ed2d6c833 (patch) | |
tree | 154fe4abb74f5e03962506168c7d8c4869f7ac8a /board/davinci/da8xxevm | |
parent | dc344589ded4fb4d63ba7f0cdf670e2ffcf5e5a0 (diff) | |
parent | 38a77c3adb3ee559b135217769f5c49f3c8b62c9 (diff) |
Merge branch 'master' of git://git.denx.de/u-boot-arm
* 'master' of git://git.denx.de/u-boot-arm: (145 commits)
beagleboard: enable HUB power on all variants of the BeagleBoard
dm3730: enable dpll5
ehci-hcd: Allow cleanups to happen gracefully on a timeout.
OMAP3: Add DSS driver for OMAP3
led: Remove state-saving of led for toggle functionality and add toggle option to led command
led: Fixed setting of STATUS_LED_BIT1 when led_name is 'all'
led: correct off/on locations in structure
led: added cmd_led to Makefile
BeagleBoard: fix LED 0/1 in driver
Corrected LED name match finding avoiding extraneous Usage printouts
BeagleBoard: config: updated default configuration
BeagleBoard: config: Enabled multibus support for I2C in configuration
BeagleBoard: config: add optargs/buddy/camera
BeagleBoard: config: increase command-line functionality
BeagleBoard: config: make mtest run
BeagleBoard: config: enable DSS
BeagleBoard: config: enable asix driver and dhcp
BeagleBoard: config: enable networking
BeagleBoard: config: decrease bootdelay to 2 seconds
BeagleBoard: config: use uImage.beagle for tftp
BeagleBoard: config: hardcode MAC for onboard SMSC
BeagleBoard: config: load kernel from MMC ext, not FAT
BeagleBoard: Configure DVI/S-video
BeagleBoard: Added userbutton command
BeagleBoard: turn off clocks in ehci_stop
USB: Remove __attribute__ ((packed)) for struct ehci_hccr and ehci_hcor
beagleboard: add support for xM revision C
beagle: pass expansionboard name in bootargs
OMAP: Remove omapfb.debug=y from Beagle and Overo env settings
OMAP3 Beagle Pin Mux initialization glitch fix
da850: modifications for Logic PD Rev.3 AM18xx EVM
da850: fix the channel number for EMAC teardown init
da850: add support for Spectrum Digital AM18xx EVM
da850: add support to wake up DSP during board init
da850: modify the U-Boot prompt string
da850: add NOR boot mode support
da8xx: add support for multiple PLL controllers
da850: indicate cache usage disable in config file
dm365: modify boot prompt from dm365 to dm36x
dm365: disable cache usage due to coherency issues
dm6446: disable cache usage due to coherency issues
OMAP3: Remove legacy mmc driver
devkit8000: Use generic MMC driver
TI OMAP3 SDP3430: Use generic MMC driver
AM3517 CraneBoard: Use generic MMC driver
OMAP3: pandora: Use generic MMC driver
OMAP3: Zoom2: Use generic MMC driver
OMAP3: Zoom1: Use generic MMC driver
OMAP3: DIG297: Use generic MMC driver
OMAP3: CM-T35: Use generic MMC driver
am3517evm: Use generic MMC driver
omap3evm: Use generic MMC driver
omap3:clock: check cpu_family before enabling clks for IVA & CAM
omap3:clock: configure GFX clock to 200MHz for AM/DM37x
OMAP3/4: Increase console I/O buffer size
PXA: vpac270: Remove re-defined CONFIG_SYS_TEXT_BASE
PXA: Fix CSB226, fix monitor length
PXA: Fix Lubbock, remove redundant parenthesis
armv7: cache: remove flush on un-aligned invalidate
armv7: stronger barrier for cache-maintenance operations
omap: enable caches at system start-up
arm: do not force d-cache enable on all boards
ORIGEN: Add MMC SPL support
ARMV7: Add support for Samsung ORIGEN board
i2c:gpio:s5p: Enable I2C GPIO on the GONI target
i2c:gpio:s5p: I2C GPIO Software implementation (via soft_i2c)
Tegra2: Use clock and pinmux functions to simplify code
Tegra2: Add additional pin multiplexing features
Tegra2: Add more clock support
Tegra2: Add microsecond timer function
ARM: remove broken "at91rm9200dk" board
ARM: remove broken "m501sk" board
ARM: remove broken "kb9202" board
ARM: remove broken "csb637" board
ARM: remove broken "cmc_pu2" board
ARM: remove broken "at91cap9adk" board
ARM: remove broken "voiceblue" board
ARM: remove broken "smdk2400" board
ARM: remove broken "sbc2410x" board
ARM: remove broken "netstar" board
ARM: remove broken "mx1fs2" board
ARM: remove broken "lpd7a40x" boards
ARM: remove broken "edb93xx" boards
ARM: remove broken "B2" board
ARM: remove broken "armadillo" board
ARM: remove broken "assabet" board
ARM: versatile: drop warnings
IMX: scb9328: drop warnings
MX31: imx31_litekit: make use of GPIO framework
MX31: mx31ads: make use of GPIO framework
MX5: mx51evk: make use of GPIO framework
MX35: mx35pdk: make use of GPIO framework
MX5: mx53loco: make use of GPIO framework
MX5: mx53evk: make use of GPIO framework
MX5: vision2: make use of GPIO framework
MX5: mx53smd: make use of GPIO framework
MX5: mx53ard: make use of GPIO framework
MX25: zmx25: make use of GPIO framework
MX5: efikamx: make use of GPIO framework
MX31: QONG: make use of GPIO framework
MX35: make use of GPIO framework for MX35 processor
MX5: make use of GPIO framework for MX5 processor
MX31: make use of GPIO framework for MX31 processor
MX25: make use of GPIO framework for MX25 processor
IMX: uniform GPIO interface using GPIO framework
MX: MX35 / MX5: uniform clock command with powerpc
MX35: MX35PDK: support additional RAM on CSD1
mx53: ddr3: Update DD3 initialization
ARM: MX51: PLL errata workaround
ARM: versatilepb : drop warnings due to double definitions
omap4: increase SRAM budget to fix build error
omap4: fix build warning due to signed unsigned comparison
mkimage: Fix 'Unknown OMAP image type - 5'
omap: fix gpio related build breaks
gpio:samsung: s5p_ suffix add for GPIO functions (C210_universal)
SMDKV310: MMC SPL: Remove unwanted dummy functions
SMDKV310: Fix undefined reference error
SMDKV310: Fix build error for smdkv310 board
gpio:samsung s5p_ suffix add for GPIO functions
mmc: S5P: Support DMA restarts at buffer boundaries
SMDKV310: Fix host compilation of mkv310_image
arm: fix bd pointer dereference prior initialization
arm, lib/board.c: use gd->ram_size instead of bd->bi_memsize
mx5: Remove CONFIG_L2_OFF and CONFIG_SYS_L2CACHE_OFF
MX31: removed warnings due to clock.h
integrator: convert to new build system
integratorcp: make the board compile
integratorap: remove hardcoded 32MB memory cmdline
...
Diffstat (limited to 'board/davinci/da8xxevm')
-rw-r--r-- | board/davinci/da8xxevm/da850evm.c | 123 |
1 files changed, 123 insertions, 0 deletions
diff --git a/board/davinci/da8xxevm/da850evm.c b/board/davinci/da8xxevm/da850evm.c index 73eaa48b0b..2f950e7bdf 100644 --- a/board/davinci/da8xxevm/da850evm.c +++ b/board/davinci/da8xxevm/da850evm.c @@ -30,6 +30,7 @@ #include <asm/arch/emac_defs.h> #include <asm/io.h> #include <asm/arch/davinci_misc.h> +#include <hwconfig.h> DECLARE_GLOBAL_DATA_PTR; @@ -105,6 +106,57 @@ const struct pinmux_config nand_pins[] = { { pinmux(12), 1, 5 }, { pinmux(12), 1, 6 } }; +#elif defined(CONFIG_USE_NOR) +/* NOR pin muxer settings */ +const struct pinmux_config nor_pins[] = { + /* GP0[11] is required for NOR to work on Rev 3 EVMs */ + { pinmux(0), 8, 4 }, /* GP0[11] */ + { pinmux(5), 1, 6 }, + { pinmux(6), 1, 6 }, + { pinmux(7), 1, 0 }, + { pinmux(7), 1, 4 }, + { pinmux(7), 1, 5 }, + { pinmux(8), 1, 0 }, + { pinmux(8), 1, 1 }, + { pinmux(8), 1, 2 }, + { pinmux(8), 1, 3 }, + { pinmux(8), 1, 4 }, + { pinmux(8), 1, 5 }, + { pinmux(8), 1, 6 }, + { pinmux(8), 1, 7 }, + { pinmux(9), 1, 0 }, + { pinmux(9), 1, 1 }, + { pinmux(9), 1, 2 }, + { pinmux(9), 1, 3 }, + { pinmux(9), 1, 4 }, + { pinmux(9), 1, 5 }, + { pinmux(9), 1, 6 }, + { pinmux(9), 1, 7 }, + { pinmux(10), 1, 0 }, + { pinmux(10), 1, 1 }, + { pinmux(10), 1, 2 }, + { pinmux(10), 1, 3 }, + { pinmux(10), 1, 4 }, + { pinmux(10), 1, 5 }, + { pinmux(10), 1, 6 }, + { pinmux(10), 1, 7 }, + { pinmux(11), 1, 0 }, + { pinmux(11), 1, 1 }, + { pinmux(11), 1, 2 }, + { pinmux(11), 1, 3 }, + { pinmux(11), 1, 4 }, + { pinmux(11), 1, 5 }, + { pinmux(11), 1, 6 }, + { pinmux(11), 1, 7 }, + { pinmux(12), 1, 0 }, + { pinmux(12), 1, 1 }, + { pinmux(12), 1, 2 }, + { pinmux(12), 1, 3 }, + { pinmux(12), 1, 4 }, + { pinmux(12), 1, 5 }, + { pinmux(12), 1, 6 }, + { pinmux(12), 1, 7 } +}; #endif #ifdef CONFIG_DRIVER_TI_EMAC_USE_RMII @@ -114,6 +166,64 @@ const struct pinmux_config nand_pins[] = { #endif #endif /* CONFIG_DRIVER_TI_EMAC */ +void dsp_lpsc_on(unsigned domain, unsigned int id) +{ + dv_reg_p mdstat, mdctl, ptstat, ptcmd; + struct davinci_psc_regs *psc_regs; + + psc_regs = davinci_psc0_regs; + mdstat = &psc_regs->psc0.mdstat[id]; + mdctl = &psc_regs->psc0.mdctl[id]; + ptstat = &psc_regs->ptstat; + ptcmd = &psc_regs->ptcmd; + + while (*ptstat & (0x1 << domain)) + ; + + if ((*mdstat & 0x1f) == 0x03) + return; /* Already on and enabled */ + + *mdctl |= 0x03; + + *ptcmd = 0x1 << domain; + + while (*ptstat & (0x1 << domain)) + ; + while ((*mdstat & 0x1f) != 0x03) + ; /* Probably an overkill... */ +} + +static void dspwake(void) +{ + unsigned *resetvect = (unsigned *)DAVINCI_L3CBARAM_BASE; + u32 val; + + /* if the device is ARM only, return */ + if ((readl(CHIP_REV_ID_REG) & 0x3f) == 0x10) + return; + + if (hwconfig_subarg_cmp_f("dsp", "wake", "no", NULL)) + return; + + *resetvect++ = 0x1E000; /* DSP Idle */ + /* clear out the next 10 words as NOP */ + memset(resetvect, 0, sizeof(unsigned) *10); + + /* setup the DSP reset vector */ + writel(DAVINCI_L3CBARAM_BASE, HOST1CFG); + + dsp_lpsc_on(1, DAVINCI_LPSC_GEM); + val = readl(PSC0_MDCTL + (15 * 4)); + val |= 0x100; + writel(val, (PSC0_MDCTL + (15 * 4))); +} + +int misc_init_r(void) +{ + dspwake(); + return 0; +} + static const struct pinmux_resource pinmuxes[] = { #ifdef CONFIG_SPI_FLASH PINMUX_ITEM(spi1_pins), @@ -122,6 +232,8 @@ static const struct pinmux_resource pinmuxes[] = { PINMUX_ITEM(i2c_pins), #ifdef CONFIG_NAND_DAVINCI PINMUX_ITEM(nand_pins), +#elif defined(CONFIG_USE_NOR) + PINMUX_ITEM(nor_pins), #endif }; @@ -168,6 +280,7 @@ u32 get_board_rev(void) int board_init(void) { + u32 val; #ifndef CONFIG_USE_IRQ irq_init(); #endif @@ -215,6 +328,16 @@ int board_init(void) if (davinci_configure_pin_mux_items(pinmuxes, ARRAY_SIZE(pinmuxes))) return 1; +#ifdef CONFIG_USE_NOR + /* Set the GPIO direction as output */ + clrbits_be32((u32 *)GPIO_BANK0_REG_DIR_ADDR, (0x01 << 11)); + + /* Set the output as low */ + val = readl(GPIO_BANK0_REG_SET_ADDR); + val |= (0x01 << 11); + writel(val, GPIO_BANK0_REG_CLR_ADDR); +#endif + #ifdef CONFIG_DRIVER_TI_EMAC if (davinci_configure_pin_mux(emac_pins, ARRAY_SIZE(emac_pins)) != 0) return 1; |