Commit Graph

13979 Commits

Author SHA1 Message Date
Marek Vasut
b18eabfa5f IDE: Fix complaints about strict aliasing in cmd_ide.c
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
2011-10-01 21:53:39 +02:00
Simon Glass
857c283e9b Small refactor to remove duplicate serial code
This tidies up duplicate code, and checks that default_serial_console() does
in fact produce a device.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>
2011-10-01 21:52:48 +02:00
Sergei Shtylyov
025421eab4 fat: replace LINEAR_PREFETCH_SIZE with PREFETCH_BLOCKS
Currently in do_fat_read() when reading FAT sectors, we have to divide down
LINEAR_PREFETCH_SIZE by the sector size, whereas it's defined as 2 sectors
worth of bytes. In order to avoid redundant multiplication/division, introduce
#define PREFETCH_BLOCKS instead of #define LINEAR_PREFETCH_SIZE.

Signed-off-by: Sergei Shtylyov <sshtylyov@mvista.com>
2011-10-01 21:52:19 +02:00
Sergei Shtylyov
40e219165b fat: root directory cluster only makes sense for FAT32
The root directory cluster field only exists in a FAT32 boot sector, so the
'root_cluster' variable in do_fat_read() contains garbage in case of FAT12/16.
Make it contain 0 instead as this is what is passed to get_vfatname() in that
case anyway.

Signed-off-by: Sergei Shtylyov <sshtylyov@mvista.com>
2011-10-01 21:52:06 +02:00
Sergei Shtylyov
60b36f0fc7 fat: cannot compare bytes and sectors
The code multiples the FAT size in sectors by the sector size and then tries to
compare that to the number of sectors in the 'getsize' variable.  While fixing
this, also change the initial value of 'getsize' as the division of FATBUFSIZE
by the sector size gets us FATBUFBLOCKS.

Signed-off-by: Sergei Shtylyov <sshtylyov@mvista.com>
2011-10-01 21:51:23 +02:00
Sergei Shtylyov
ac4977719e fat: fix crash with big sector size
Apple iPod nanos have sector sizes of 2 or 4 KiB, which crashes U-Boot when it
tries to read the boot sector into 512-byte buffer situated on stack. Make the
FAT code indifferent to the sector size.

Signed-off-by: Sergei Shtylyov <sshtylyov@mvista.com>
2011-10-01 21:50:39 +02:00
Wolfgang Denk
1e02c20ac9 Merge branch 'sf' of git://git.denx.de/u-boot-blackfin
* 'sf' of git://git.denx.de/u-boot-blackfin:
  sf: eon: add support for EN25Q32B parts
  cmd_sf: add "update" subcommand to do smart SPI flash update
2011-10-01 21:44:07 +02:00
Wolfgang Denk
97d7ab8a8e Merge branch 'post' of git://git.denx.de/u-boot-blackfin
* 'post' of git://git.denx.de/u-boot-blackfin:
  Blackfin: uart: implement loop callback for post
  Blackfin: bf537-stamp/bf548-ezkit: update POST flash block range
  Blackfin: post: generalize led/button tests with GPIOs
  Blackfin: bf537-stamp: drop uart/flash post tests
  Blackfin: post: drop custom test list
  Blackfin: bf537-stamp: convert to gpio post hotkey
2011-10-01 21:42:21 +02:00
Marek Vasut
af708cbaae EfikaSB: Add preliminary EfikaSB support
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Stefano Babic <sbabic@denx.de>
2011-09-30 22:01:06 +02:00
Marek Vasut
0ef4fc533a EfikaMX: Add imximage config for Efika SB
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Stefano Babic <sbabic@denx.de>
2011-09-30 22:01:06 +02:00
Marek Vasut
e063342c0e ATA: Squash warnings in mxc_ata.
mxc_ata.c: In function ‘set_ata_bus_timing’:
mxc_ata.c:118: warning: dereferencing type-punned pointer will break
strict-aliasing rules
mxc_ata.c:125: warning: dereferencing type-punned pointer will break
strict-aliasing rules
mxc_ata.c:129: warning: dereferencing type-punned pointer will break
strict-aliasing rules

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Stefano Babic <sbabic@denx.de>
2011-09-30 22:01:06 +02:00
Fabio Estevam
db545e49b7 vision2: Place machine ID into board config
Let common code set the machine ID.

Cc: Stefano Babic <sbabic@denx.de>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Stefano Babic <sbabic@denx.de>
2011-09-30 22:01:05 +02:00
Fabio Estevam
e6ec1761cd zmx25: Fix build warning due to 'get_reset_cause' defined but not used
When building the zmx25 target we get:

Configuring for zmx25 board...
generic.c:108: warning: 'get_reset_cause' defined but not used

Fix this warning by defining get_reset_cause only if CONFIG_DISPLAY_CPUINFO is defined.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Stefano Babic <sbabic@denx.de>
2011-09-30 22:01:05 +02:00
Fabio Estevam
9ba24f17b2 zmx25: Place machine ID into board config
Let common code set the machine ID.

Cc: Matthias Weisser <weisserm@arcor.de>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
2011-09-30 22:01:05 +02:00
Fabio Estevam
5a9361c267 zmx25: Remove dram_init_banksize()
As only one RAM bank is used we can rely on the code from arch/arm/lib/board.c

Cc: Matthias Weisser <weisserm@arcor.de>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Stefano Babic <sbabic@denx.de>
2011-09-30 22:01:05 +02:00
Marek Vasut
db84140bb7 I2C: mxc_i2c rework
Rewrite the mxc_i2c driver.
 * This version is much closer to Linux implementation.
 * Fixes IPG_PERCLK being incorrectly used as clock source
 * Fixes behaviour of the driver on iMX51
 * Clean up coding style a bit ;-)

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Heiko Schocher <hs@denx.de>
Cc: Jason Hui <jason.hui@linaro.org>
Acked-by: Jason Liu <jason.hui@linro.org>
Acked-by: Heiko Schocher <hs@denx.de>
Tested-by: Jason Liu <jason.hui@linro.org>
2011-09-30 22:01:05 +02:00
Marek Vasut
37a6d2085e MX5: Clean up the output of "clocks" command
The new output looks like this:
> clocks
PLL1            800 MHz
PLL2            665 MHz
PLL3            216 MHz

AHB          133000 kHz
IPG           66500 kHz
IPG PERCLK   665000 kHz

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Acked-by: Stefano Babic <sbabic@denx.de>
Acked-by: Jason Liu <jason.hui@linaro.org>
2011-09-30 22:01:05 +02:00
Marek Vasut
95c0eb198d MX5: Add AHB clock reporting and fix IPG clock reporting
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Jason Liu <jason.hui@linaro.org>
Acked-by: Jason Liu <jason.hui@linaro.org>
2011-09-30 22:01:05 +02:00
Marek Vasut
bf2eaf5112 MX5: Modify the PLL decoding algorithm
The PLL decoding algorithm didn't take into account many configuration bits.
Adjust it according to Linux kernel. Also, add PLL4 for MX53.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Jason Hui <jason.hui@linaro.org>
Tested-by: Jason Liu <Jason.hui@linaro.org>
2011-09-30 22:01:05 +02:00
Fabio Estevam
00e11a4397 mx53evk: Place machine ID into board config
Let common code set the machine ID.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Stefano Babic <sbabic@denx.de>
Acked-by: Jason Liu <jason.hui@linaro.org>
2011-09-30 22:01:04 +02:00
Fabio Estevam
7c2eabab0d mx53ard: Place machine ID into board config
Let common code set the machine ID.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
2011-09-30 22:01:04 +02:00
Fabio Estevam
c4c596fb46 mx53smd: Place machine ID into board config
Let common code set the machine ID.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
2011-09-30 22:01:04 +02:00
Fabio Estevam
9df82896c5 mx53loco: Place machine ID into board config
Let common code set the machine ID.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Jason Liu <jason.hui@linaro.org>
2011-09-30 22:01:04 +02:00
Fabio Estevam
4cd300ef16 mx51evk: Place machine ID into board config
Let common code set the machine ID.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
2011-09-30 22:01:04 +02:00
Fabio Estevam
4c41438730 imx31_litekit: Place machine ID into board config
Let common code set the machine ID.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
2011-09-30 22:01:04 +02:00
Fabio Estevam
da3598ac7a mx31ads: Place machine ID into board config
Let common code set the machine ID.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
2011-09-30 22:01:04 +02:00
Fabio Estevam
f39c008e92 mx25pdk: Place machine ID into board config
Let common code set the machine ID.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
2011-09-30 22:01:03 +02:00
Fabio Estevam
9aa3c6a1ee mx31pdk: Place machine ID into board config
Let common code set the machine ID.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
2011-09-30 22:01:03 +02:00
Fabio Estevam
7a5faf089b imx31_litekit: Remove dram_init_banksize()
As only one RAM bank is used we can rely on the code from arch/arm/lib/board.c

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
2011-09-30 22:01:03 +02:00
Fabio Estevam
14c7817b87 mx31ads: Remove dram_init_banksize()
As only one RAM bank is used we can rely on the code from arch/arm/lib/board.c

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
2011-09-30 22:01:03 +02:00
Fabio Estevam
c3f4f31bcb mx25pdk: Remove dram_init_banksize()
As only one RAM bank is used we can rely on the code from arch/arm/lib/board.c

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
2011-09-30 22:01:03 +02:00
Fabio Estevam
9bd72ebd0e mx31pdk: Remove dram_init_banksize()
As only one RAM bank is used we can rely on the code from arch/arm/lib/board.c

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
2011-09-30 22:01:03 +02:00
Marek Vasut
8edcc6f221 FEC: Move imx_get_mac_from_fuse() definition to fec_mxc.h
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Ben Warren <biggerbadderben@gmail.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Detlev Zundel <dzu@denx.de>
2011-09-30 22:01:03 +02:00
Marek Vasut
17fb268cf7 FEC: Squish "got MAC from fuse" message, make it debug()
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Ben Warren <biggerbadderben@gmail.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Detlev Zundel <dzu@denx.de>
2011-09-30 22:01:02 +02:00
Marek Vasut
e382fb4873 FEC: Add timeout for chip reset
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Ben Warren <biggerbadderben@gmail.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Detlev Zundel <dzu@denx.de>
2011-09-30 22:01:02 +02:00
Marek Vasut
2e5f44213f FEC: Allow registering MII postconfiguration callback
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Ben Warren <biggerbadderben@gmail.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Detlev Zundel <dzu@denx.de>
2011-09-30 22:01:02 +02:00
Marek Vasut
9e27e9dca1 FEC: Allow multiple FECes
This patch allows user to register multiple FEC controllers. To preserve
compatibility with older boards, the mxcfec_register() call is still in place.
To use multiple controllers, new macro is in place, the mxcfec_register_multi(),
which takes more arguments. The syntax is:

mxcfec_register_multi(bd, FEC ID, FEC PHY ID on the MII bus, base address);

To disable the fecmxc_register() compatibility stuff, define the macro
CONFIG_FEC_MXC_MULTI. This will remove the requirement for defining IMX_FEC_BASE
and CONFIG_FEC_MXC_PHYADDR.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Ben Warren <biggerbadderben@gmail.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Detlev Zundel <dzu@denx.de>
2011-09-30 22:01:01 +02:00
Marek Vasut
d133b881b9 FEC: Abstract access to fec->eth in MII operations
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Ben Warren <biggerbadderben@gmail.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Detlev Zundel <dzu@denx.de>
2011-09-30 22:01:01 +02:00
Marek Vasut
392b850233 FEC: Allow selection of MII mode via CONFIG_FEC_XCV_TYPE
The default is MII100, which was hardcoded previously in the driver.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Ben Warren <biggerbadderben@gmail.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Detlev Zundel <dzu@denx.de>
2011-09-30 22:01:01 +02:00
Marek Vasut
a50a90c90e FEC: Add RMII mode support
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Ben Warren <biggerbadderben@gmail.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Detlev Zundel <dzu@denx.de>
2011-09-30 22:01:01 +02:00
Marek Vasut
9eb3770b7b FEC: Kill mode select FIXME's
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Ben Warren <biggerbadderben@gmail.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Detlev Zundel <dzu@denx.de>
2011-09-30 22:01:01 +02:00
Marek Vasut
77dbd6ab7f FEC: Use defined constant instead of magic number
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Ben Warren <biggerbadderben@gmail.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Detlev Zundel <dzu@denx.de>
2011-09-30 22:01:01 +02:00
Marek Vasut
879cf26130 FEC: Use proper accessor to read register in debug call
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Ben Warren <biggerbadderben@gmail.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Detlev Zundel <dzu@denx.de>
2011-09-30 22:01:01 +02:00
Jason Liu
50cf807343 cosmetic: fsl_pmic: cosmetic for the help message
This is cosmetic patch for the help message:

Before:
pmic dump [numregs] dump registers
After:
pmic dump [numregs] - dump registers

Signed-off-by: Jason Liu <jason.hui@linaro.org>
Acked-by: Stefano Babic <sbabic@denx.de>
2011-09-30 22:01:00 +02:00
Marek Vasut
b7171d92c6 EfikaMX: Adjust undocumented magic constant in config file
This magic constant with zero documentation, when it's last 8 bits are set to
0x45, configures correctly the PERCLK dividers. Therefore the I2C operates
correctly when divider computed from PERCLK.

Note: This constant is written to CBCDR register in
arch/arm/cpu/armv7/mx5/lowlevel_init.S, but it's written only once. The register
is accessed three more times in the file, with different values written to it
each time.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
2011-09-30 22:01:00 +02:00
Fabio Estevam
610b53e29b MX31: Disable watchdog during low-power modes
Turn on the watchdog WDZST bit so that watchdog timer does not count during low power modes.

Prior to applying this patch mx31pdk board got watchdog resets because when it booted in the Linux prompt
and there was no activity, the system entered into idle mode while watchdog timer was still active.

Fix this by disabling watchdog timer during idle mode.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
2011-09-30 22:01:00 +02:00
Fabio Estevam
419adbfbcb MX25: Add initial support for MX25PDK
Add the initial support for MX25PDK booting from SD card via internal boot.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
2011-09-30 22:01:00 +02:00
Fabio Estevam
e6d9b9785c MX25: tx25: Avoid the usage of extern in C file
Avoid the usage of extern in C file as pointed out by checkpatch.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
2011-09-30 22:01:00 +02:00
Fabio Estevam
b6e6ebbf3d mx31pdk: Change the prompt as per other i.MX boards
Change the prompt as done in other i.MX boards.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
2011-09-30 22:01:00 +02:00
Fabio Estevam
b6ce47964d MX31: Improve readability for reset cause
Currently the reset cause is printed like:
CPU:   Freescale i.MX31 rev 2.0 at 531 MHz.Reset cause: POR

Improve readability by adding a new line like it is done on other i.MX boards.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
2011-09-30 22:01:00 +02:00