Commit Graph

11742 Commits

Author SHA1 Message Date
Balaji T K 3e664f6d50 ARMV7: OMAP4: twl6030 add battery charging support
Add battery charging support twl6030 driver.
Add support for battery voltage and current measurements.
Add command to get battery status and start/stop battery charging from USB.

Signed-off-by: Balaji T K <balajitk@ti.com>
Tested-by: Steve Sakoman <steve.sakoman@linaro.org>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-12-11 10:56:01 -05:00
Sandeep Paulraj 917a62c0d2 Merge branch 'next' of git://git.denx.de/u-boot into next 2010-12-11 10:35:40 -05:00
Wolfgang Denk 2ced53e1ad Move LDSCRIPT definitions to board config files.
Recent cleanup actions resulted in a number of config.mk files that
contained only LDSCRIPT definitions.  Move these into th respective
board config files and remove the now empty config.mk files.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
Cc: Detlev Zundel <dzu@denx.de>
Cc: Heiko Schocher <hs@denx.de>
Cc: Andre Schwarz <andre.schwarz@matrix-vision.de>
Cc: Peter De Schrijver <p2@mind.be>
Acked-by: Detlev Zundel < dzu@denx.de>
Acked-by: Andre Schwarz <andre.schwarz@matrix-vision.de>
Acked-by: Heiko Schocher<hs@denx.de>
Acked-by: Matthias Fuchs <matthias.fuchs@esd.eu>
2010-12-09 10:27:41 +01:00
Wolfgang Denk 263d5c2f84 Remove redundant config.mk files
Recent cleanup actions resulted in a number of config.mk files that
contained only redundant entries like

	PLATFORM_CPPFLAGS += -I$(TOPDIR)

or settings of variables that were not used anywhere in the code, like

	TEXT_END  = 0xfe080000

Remove these unnecessary files.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Scott McNutt <smcnutt@psyent.com>
Cc: Wolfgang Wegner <w.wegner@astro-kom.de>
Cc: Josef Wagner <Wagner@Microsys.de>
Cc: Tolunay Orkun <torkun@nextio.com>
Cc: Frank Panno <fpanno@delphintech.com>
Cc: Heiko Schocher <hs@denx.de>
Cc: Brad Kemp <Brad.Kemp@seranoa.com>
Acked-by: Heiko Schocher<hs@denx.de>
2010-12-09 10:25:56 +01:00
Stefano Babic 76bfe76b54 Davinci: add support for the ea20 board
This board uses the OMAP-L138 SOM stacked on a
custom baseboard. It supports SPI Flash, Ethernet
with RMII.

Signed-off-by: Stefano Babic <sbabic@denx.de>
Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-12-09 10:24:12 +01:00
Stefano Babic a2f2eb76e4 Davinci 8xx: Move common functions to share code
As more Davinci 8xx board can be added, move common code
to be shared between boards.

 * rebased ontop of Sugosh's patches
 * moving the HAWKBOARD_KICK{0,1}_UNLOCK defines to
   arch/arm/include/asm/arch-davinci/davinci_misc.h from to
   arch/arm/include/asm/arch-davinci/da8xx_common.h
 * don't define dram functions in PRELOADER
 * move sync_env_enetaddr into existing EMAC ifdef
 * use misc.c in hawkboard nand_spl

Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
Signed-off-by: Stefano Babic <sbabic@denx.de>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-12-09 10:24:12 +01:00
Sudhakar Rajashekhara df48676aea da850: Add RMII support for EMAC
This patch is a port of the work by Sudhakar Rajeshekhara in commit
ab3effbcad8851cc65dc5241a01c064d2030a3b2 of
git://arago-project.org/git/people/sandeep/u-boot-davinci.git.

The da850 UI board has on it an RMII PHY which can be used if the MDC line
to the MII PHY on the baseboard is disabled and the RMII PHY is enabled by
configuring the values of some GPIO pins on the IO expander of the UI board.
This patch implements disabling that line via GPIO2[6], configuring the UI
board's IO expander and setting only the pinmux settings that are needed for
RMII operation.

Tested on da850evm by adding a define for CONFIG_DRIVER_TI_EMAC_USE_RMII.

Signed-off-by: Sudhakar Rajashekhara <sudhakar.raj@ti.com>
Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
CC: Sandeep Paulraj <s-paulraj@ti.com>
CC: Ben Warren <biggerbadderben@gmail.com>
CC: Mike Frysinger <vapier@gentoo.org>
CC: Sughosh Ganu <urwithsughosh@gmail.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-12-09 10:24:12 +01:00
Sughosh Ganu dfddb5e6ba Add board support for hawkboard
The patch adds basic board support for TI's OMAP-L138 based
Hawkboard. This board is pretty similar to the da850 EVM. Support for
nand and network access is added in this version.

The following bootup procedure is used.

At reset, the Rom Boot Loader(RBL), initialises the ddr and the nand
controllers and copies the second stage bootloader(nand_spl) to
RAM. The secondary bootloader then copies u-boot from a predefined
location in the nand flash to the RAM, and passes control to the
u-boot image.

Three config options are supported
* hawkboard_config - Used to create the u-boot.bin. Tftp the
 u-boot.bin image to the RAM from u-boot, and flash to the nand flash
 at address 0xe0000.

* hawkboard_nand_config - Used to generate the secondary
 bootloader(nand_spl) image. This creates an elf file u-boot-spl
 under nand_spl/. Create an AIS signed image using this file, and
 flash it to the nand flash at address 0x20000. The ais file should
 fit in one block.

* hawkboard_uart_config - This is same as the first image, but with
 the TEXT_BASE as expected by the RBL(0xc1080000). Create the AIS

Signed-off-by: Sughosh Ganu <urwithsughosh@gmail.com>
Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-12-09 10:24:11 +01:00
Sughosh Ganu 3258dcae81 Remove board_init_f function from nand_boot.c
Remove the board_init_f function from nand_spl/nand_boot.c. This
 function is to be defined by all boards using the nand_spl
 functionality in their individual board directory.

 Currently this function was being used by the smdk6400 board. Added
 the board specific function definition.

Signed-off-by: Sughosh Ganu <urwithsughosh@gmail.com>
Acked-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-12-09 10:24:11 +01:00
Sughosh Ganu a63fbf6730 Move and rename common headers from under
board/davinci.

 Move the davinci common headers to the architecture specific
 include file path.

Signed-off-by: Sughosh Ganu <urwithsughosh@gmail.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-12-09 10:24:11 +01:00
Stefano Babic b5d9791f8c da850: Enable SPI Flash
The patch was already posted to the arago project,
but not yet to mainline. It allows to save environment into
the spi flash. Tested on LogiPD tmdxl138.

Signed-off-by: Sudhakar Rajashekhara <sudhakar.raj@ti.com>
Signed-off-by: Stefano Babic <sbabic@denx.de>
CC: Detlev Zundev <dzu@denx.de>
CC: Ben Gardiner <bengardiner@nanometrics.ca>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-12-09 10:24:11 +01:00
Sudhakar Rajashekhara f177db3011 da8xx: Add cpu_is_da8xx macros
Signed-off-by: Sudhakar Rajashekhara <sudhakar.raj@ti.com>
CC: Stefano Babic <sbabic@denx.de>
CC: Detlev Zundev <dzu@denx.de>
CC: Ben Gardiner <bengardiner@nanometrics.ca>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-12-09 10:24:10 +01:00
Rabin Vincent ed8456f64d pl01x: use C structs and readl/writel
Use C structs for registers, and use readl/writel instead of custom
accessors.

Acked-by: Michael Brandt <michael.brandt@stericsson.com>
Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
2010-12-09 10:24:10 +01:00
Wolfgang Wegner 9d8461cc69 add Xilinx_abort_fn to Xilinx_Spartan3_Slave_Serial_fns
Currently the hardware was left in an undefined state in case Spartan3
serial load failed. This patch adds Xilinx_abort_fn to give the board
a possibility to clean up in this case.

Signed-off-by: Wolfgang Wegner <w.wegner@astro-kom.de>
2010-12-09 10:24:10 +01:00
Mike Frysinger 3f7cfeea2d ext2: constify file/dir names
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-12-09 10:24:09 +01:00
Mike Frysinger 32ff4b7fe4 stdio: constify "name" arg in public api
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-12-09 10:24:09 +01:00
Wolfgang Denk fb69abf269 Merge branch 'next' of git://git.denx.de/u-boot-arm into next 2010-11-30 22:13:15 +01:00
Rabin Vincent 72d5e44c95 pl01x: use C structs and readl/writel
Use C structs for registers, and use readl/writel instead of custom
accessors.

Acked-by: Michael Brandt <michael.brandt@stericsson.com>
Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
2010-11-30 22:06:33 +01:00
Wolfgang Wegner b0bc8b70ff add Xilinx_abort_fn to Xilinx_Spartan3_Slave_Serial_fns
Currently the hardware was left in an undefined state in case Spartan3
serial load failed. This patch adds Xilinx_abort_fn to give the board
a possibility to clean up in this case.

Signed-off-by: Wolfgang Wegner <w.wegner@astro-kom.de>
2010-11-30 21:59:21 +01:00
Stefano Babic 649a33e434 Davinci: add support for the ea20 board
This board uses the OMAP-L138 SOM stacked on a
custom baseboard. It supports SPI Flash, Ethernet
with RMII.

Signed-off-by: Stefano Babic <sbabic@denx.de>
Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-11-30 11:47:45 -05:00
Stefano Babic 6d1c649f44 Davinci 8xx: Move common functions to share code
As more Davinci 8xx board can be added, move common code
to be shared between boards.

 * rebased ontop of Sugosh's patches
 * moving the HAWKBOARD_KICK{0,1}_UNLOCK defines to
   arch/arm/include/asm/arch-davinci/davinci_misc.h from to
   arch/arm/include/asm/arch-davinci/da8xx_common.h
 * don't define dram functions in PRELOADER
 * move sync_env_enetaddr into existing EMAC ifdef
 * use misc.c in hawkboard nand_spl

Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
Signed-off-by: Stefano Babic <sbabic@denx.de>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-11-30 11:32:59 -05:00
Sudhakar Rajashekhara d26074012b da850: Add RMII support for EMAC
This patch is a port of the work by Sudhakar Rajeshekhara in commit
ab3effbcad8851cc65dc5241a01c064d2030a3b2 of
git://arago-project.org/git/people/sandeep/u-boot-davinci.git.

The da850 UI board has on it an RMII PHY which can be used if the MDC line
to the MII PHY on the baseboard is disabled and the RMII PHY is enabled by
configuring the values of some GPIO pins on the IO expander of the UI board.
This patch implements disabling that line via GPIO2[6], configuring the UI
board's IO expander and setting only the pinmux settings that are needed for
RMII operation.

Tested on da850evm by adding a define for CONFIG_DRIVER_TI_EMAC_USE_RMII.

Signed-off-by: Sudhakar Rajashekhara <sudhakar.raj@ti.com>
Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
CC: Sandeep Paulraj <s-paulraj@ti.com>
CC: Ben Warren <biggerbadderben@gmail.com>
CC: Mike Frysinger <vapier@gentoo.org>
CC: Sughosh Ganu <urwithsughosh@gmail.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-11-30 11:27:44 -05:00
Sughosh Ganu 48571ff005 Add board support for hawkboard
The patch adds basic board support for TI's OMAP-L138 based
Hawkboard. This board is pretty similar to the da850 EVM. Support for
nand and network access is added in this version.

The following bootup procedure is used.

At reset, the Rom Boot Loader(RBL), initialises the ddr and the nand
controllers and copies the second stage bootloader(nand_spl) to
RAM. The secondary bootloader then copies u-boot from a predefined
location in the nand flash to the RAM, and passes control to the
u-boot image.

Three config options are supported
* hawkboard_config - Used to create the u-boot.bin. Tftp the
 u-boot.bin image to the RAM from u-boot, and flash to the nand flash
 at address 0xe0000.

* hawkboard_nand_config - Used to generate the secondary
 bootloader(nand_spl) image. This creates an elf file u-boot-spl
 under nand_spl/. Create an AIS signed image using this file, and
 flash it to the nand flash at address 0x20000. The ais file should
 fit in one block.

* hawkboard_uart_config - This is same as the first image, but with
 the TEXT_BASE as expected by the RBL(0xc1080000). Create the AIS

Signed-off-by: Sughosh Ganu <urwithsughosh@gmail.com>
Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-11-30 11:25:01 -05:00
Sughosh Ganu 45b8679c81 Remove board_init_f function from nand_boot.c
Remove the board_init_f function from nand_spl/nand_boot.c. This
 function is to be defined by all boards using the nand_spl
 functionality in their individual board directory.

 Currently this function was being used by the smdk6400 board. Added
 the board specific function definition.

Signed-off-by: Sughosh Ganu <urwithsughosh@gmail.com>
Acked-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-11-28 20:21:58 -05:00
Sughosh Ganu d7f9b503a8 Move and rename common headers from under
board/davinci.

 Move the davinci common headers to the architecture specific
 include file path.

Signed-off-by: Sughosh Ganu <urwithsughosh@gmail.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-11-28 20:21:27 -05:00
Stefano Babic d73a8a1b8c da850: Enable SPI Flash
The patch was already posted to the arago project,
but not yet to mainline. It allows to save environment into
the spi flash. Tested on LogiPD tmdxl138.

Signed-off-by: Sudhakar Rajashekhara <sudhakar.raj@ti.com>
Signed-off-by: Stefano Babic <sbabic@denx.de>
CC: Detlev Zundev <dzu@denx.de>
CC: Ben Gardiner <bengardiner@nanometrics.ca>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-11-28 20:17:35 -05:00
Sudhakar Rajashekhara a131148efe da8xx: Add cpu_is_da8xx macros
Signed-off-by: Sudhakar Rajashekhara <sudhakar.raj@ti.com>
CC: Stefano Babic <sbabic@denx.de>
CC: Detlev Zundev <dzu@denx.de>
CC: Ben Gardiner <bengardiner@nanometrics.ca>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-11-28 20:17:30 -05:00
Mike Frysinger c87f6457bb ext2: constify file/dir names
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-11-28 21:58:51 +01:00
Mike Frysinger d7be3056de stdio: constify "name" arg in public api
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-11-28 21:58:48 +01:00
Mike Frysinger 5a442c0add boot cmds: convert to getenv_yesno() with autostart
Use the new helper func to clean up duplicate logic handling of the
autostart env var.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-11-28 21:58:30 +01:00
Mike Frysinger 543f0a3819 ctype: constify lookup table
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-11-28 21:58:29 +01:00
Mike Frysinger 7edb186fcf image: constify lookup tables
These are pure lookup tables -- no need to be writable.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-11-28 21:58:27 +01:00
Mike Frysinger fc9903f38d cmd_itest: constify & localize op table
No one else needs this table.  While we're here, use the standard
ARRAY_SIZE helper macro.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-11-28 21:58:26 +01:00
Mike Frysinger bdbc1303cb cmd_date: constify
Many strings in this file need not be writable.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-11-28 21:58:24 +01:00
Mike Frysinger 908c6b627f string_to_ip: constify "s" arg
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-11-28 21:56:39 +01:00
Mike Frysinger 2e3ef6e4e4 string_to_VLAN: constify "var" arg
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-11-28 21:56:12 +01:00
Mike Frysinger b920ee9db2 copy_filename: constify "src" arg
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-11-28 21:55:15 +01:00
Mike Frysinger 722b061b6f autocomplete: remove runtime handler install
Rather than add runtime overhead of installing completion handlers, do it
statically at build time.  This requires a new build time helper macro to
declare a command and the completion handler at the same time.  Then we
convert the env related funcs over to this.

This gives an opportunity to also unify the U_BOOT_CMD macros.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-11-28 21:49:27 +01:00
Mike Frysinger 882b7d726f do_reset: unify duplicate prototypes
The duplication of the do_reset prototype has gotten out of hand,
and they're not all in sync.  Unify them all in command.h.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-11-28 21:47:24 +01:00
Mike Frysinger 7842fb7c4f do_bootd: unify duplicate prototypes
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-11-28 21:46:47 +01:00
Mike Frysinger 36ebb78779 do_bootm: unify duplicate prototypes
The duplication of the do_bootm prototype has gotten out of hand,
and they're pretty much all outdated (wrt constness).  Unify them
all in command.h.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-11-28 21:45:32 +01:00
Mike Frysinger 40b484a3df command_t: punt unused type
The recent command clean up to constify the argv option to command funcs
missed the command_t type itself.  This is probably because there are no
build time warnings from it because no one is actually using this thing.
So just punt it rather than fix it.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-11-28 21:42:56 +01:00
Mike Frysinger 3a5ee0b1d6 cmd_mii: localize & constify local funcs/data
No need for these structures to be writable or global.

While we're here, also drop local versions of the ARRAY_SIZE macro.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-11-28 21:40:35 +01:00
Wolfgang Denk d0d2271f8c Prepare v2010.12-rc2
Signed-off-by: Wolfgang Denk <wd@denx.de>
2010-11-28 19:48:11 +01:00
Anatolij Gustschin 34bbb8fb46 cfi_flash: fix bug introduced while recent change to flash_get_size()
commit ec50a8e389
"cfi_flash: handle 'chip size exceeds address window' situation"
added 3rd argument to flash_get_size() but didn't fix all the
function calls from the board specific code. Many boards have
their own flash_get_size() definitions in the board code and
use them there, but some boards (e.g. tqm834x, tqm85xx, pdm360ng)
use flash_get_size() from the cfi_flash.c driver.

The bug shows up if the value of the "max_size" argument (which
is not defined when calling the function with two arguments)
happens to be less than "info->size". In this case on the
affected boards we end up with a bank of reduced size and
in the worst case might even be not able to update U-Boot or
to boot the kernel from flash:

=> fli

Bank # 1: CFI conformant FLASH (32 x 16)  Size: 0 kB in 1 Sectors
  AMD Standard command set, Manufacturer ID: 0x01, Device ID: 0x227E
  Erase timeout: 4096 ms, write timeout: 1 ms
  Buffer write timeout: 3 ms, buffer size: 64 bytes

  Sector Start Addresses:
  F0000000   RO

Bank # 2: CFI conformant FLASH (32 x 16)  Size: 128 MB in 512 Sectors
  AMD Standard command set, Manufacturer ID: 0x01, Device ID: 0x227E
  Erase timeout: 4096 ms, write timeout: 1 ms
  Buffer write timeout: 3 ms, buffer size: 64 bytes

  Sector Start Addresses:
  F8000000        F8040000        F8080000        F80C0000        F8100000
  F8140000        F8180000        F81C0000        F8200000        F8240000
  ...

E.g., updating U-Boot is not possible now:

=> protect off ${u-boot_addr} +${u-boot_size}
Error: end address (0xf007ffff) not in flash!
Bad address format
=> era ${u-boot_addr} +${u-boot_size}
Error: end address (0xf007ffff) not in flash!
Bad address format

This patch removes the 3rd argument of flash_get_size() again
and sets "max_size" in the function itself instead of passing
it as a function argument.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
2010-11-28 19:41:11 +01:00
Sandeep Paulraj b485faa602 DaVinci: DM355 Leopard : Fix for ARM Relocation support
Fix for ARM Relocation support

Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-11-28 17:58:13 +01:00
Sandeep Paulraj 47fefac4c9 DaVinci DM365: Fix for ARM Relocation support
Fix for ARM Relocation support

Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-11-28 17:58:12 +01:00
Sandeep Paulraj 44df860b8e DaVinci DM355: Fix for ARM Relocation support
Fix for ARM Relocation support

Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-11-28 17:58:11 +01:00
Wolfgang Denk d84e19ad2e Merge branch 'master' of git://git.denx.de/u-boot-ppc4xx 2010-11-28 17:44:00 +01:00
Dirk Behme 71ae5f7a3f Fix compiler warning in fdt_support.c
Fix compiler warning

fdt_support.c: In function 'of_bus_default_count_cells':
fdt_support.c:957: warning: passing argument 1 of '__swab32p' discards qualifiers from pointer target type
fdt_support.c:965: warning: passing argument 1 of '__swab32p' discards qualifiers from pointer target type

be32_to_cpup() expects an 'u32 *' while prop is 'const u32 *'.

Signed-off-by: Dirk Behme <dirk.behme@googlemail.com>
2010-11-28 12:41:53 +01:00