]> git.kernelconcepts.de Git - karo-tx-uboot.git/log
karo-tx-uboot.git
11 years agomx28: Rename regs-power.h to regs-power-mx28.h
Marek Vasut [Sat, 24 Nov 2012 14:15:51 +0000 (14:15 +0000)]
mx28: Rename regs-power.h to regs-power-mx28.h

The i.MX23 has different register layout and bit placement in the
power supply. Thus, in order to be able to add support for MX23,
rename the MX28's regs-power.h to regs-power-mx28.h . Moreover,
add ifdef around inclusion of regs-*-mx28.h in imx-regs.h so the
MX23 boards will include proper set of registers.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
11 years agomx28: Remove SET, CLR, TOG ops from PLLxCTRL1 registers
Marek Vasut [Sat, 24 Nov 2012 14:03:21 +0000 (14:03 +0000)]
mx28: Remove SET, CLR, TOG ops from PLLxCTRL1 registers

These registers don't have _SET, _CLR and _TOG at the respective offsets
available, these registers has to be toggled via R-M-W if needed. Thus do
not export these offsets anymore.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Acked-by: Otavio Salvador <otavio@ossystems.com.br>
11 years agomx28: Fix typo in POWER_DCLIMITS_NEGLIMIT_OFFSET
Marek Vasut [Wed, 21 Nov 2012 17:02:59 +0000 (17:02 +0000)]
mx28: Fix typo in POWER_DCLIMITS_NEGLIMIT_OFFSET

The POWER_DCLIMITS_NEGLIMIT_OFFSET bit in mx28 power supply block is
not called POWER_DCLIMITS_NETLIMIT_OFFSET, but POWER_DCLIMITS_NEGLIMIT_OFFSET.
Correct the name in the header file.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
11 years agomx28: Fix typo in POWER_MINPWR_VBG_OFF
Marek Vasut [Wed, 21 Nov 2012 16:50:39 +0000 (16:50 +0000)]
mx28: Fix typo in POWER_MINPWR_VBG_OFF

The POWER_MINPWR_VBG_OFF bit in mx28 power supply block is not called
POWER_MINPWR_FBG_OFF, but POWER_MINPWR_VBG_OFF. Correct the name in the
header file.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
11 years agomx5: Mark lowlevel_init board-specific code
Benoît Thébaudeau [Mon, 5 Nov 2012 10:07:04 +0000 (10:07 +0000)]
mx5: Mark lowlevel_init board-specific code

The mx5 lowlevel_init.S contains board-specific code based on the reference
design. Let's keep it since it avoids creating new lowlevel_init files and it
may be used by many boards. But add a config to make it optional in order not to
cause issues on boards not following this part of the reference design.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Matt Sealey <matt@genesi-usa.com>
Acked-by: Stefano Babic <sbabic@denx.de>
11 years agoehci-mxc: Fix host power mask bit for i.MX25
Benoît Thébaudeau [Fri, 16 Nov 2012 06:46:24 +0000 (06:46 +0000)]
ehci-mxc: Fix host power mask bit for i.MX25

The correct bit for H1_PM is 16, not 8, which is the DP pull-up impedance
selection bit.

This issue has been reported by Eric Bénard <eric@eukrea.com> and fixed by
Christoph Fritz <chf.fritz@googlemail.com> on Linux, from which these #define-s
had been copied.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Marek Vasut <marex@denx.de>
11 years agomx35pdk: Configure CONFIG_BOOTDELAY to one second
Fabio Estevam [Fri, 16 Nov 2012 05:09:10 +0000 (05:09 +0000)]
mx35pdk: Configure CONFIG_BOOTDELAY to one second

One second is enough time for users to react in case they want to stop the
booting process.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
11 years agomx31pdk: Configure CONFIG_BOOTDELAY to one second
Fabio Estevam [Fri, 16 Nov 2012 05:09:09 +0000 (05:09 +0000)]
mx31pdk: Configure CONFIG_BOOTDELAY to one second

One second is enough time for users to react in case they want to stop the
booting process.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
11 years agomx25pdk: Configure CONFIG_BOOTDELAY to one second
Fabio Estevam [Fri, 16 Nov 2012 05:09:08 +0000 (05:09 +0000)]
mx25pdk: Configure CONFIG_BOOTDELAY to one second

One second is enough time for users to react in case they want to stop the
booting process.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
11 years agomx51evk: Configure CONFIG_BOOTDELAY to one second
Fabio Estevam [Fri, 16 Nov 2012 05:09:07 +0000 (05:09 +0000)]
mx51evk: Configure CONFIG_BOOTDELAY to one second

One second is enough time for users to react in case they want to stop the
booting process.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
11 years agomx6qsabre_common: Configure CONFIG_BOOTDELAY to one second
Fabio Estevam [Fri, 16 Nov 2012 05:09:06 +0000 (05:09 +0000)]
mx6qsabre_common: Configure CONFIG_BOOTDELAY to one second

One second is enough time for users to react in case they want to stop the
booting process.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Jason Liu <r64343@freescale.com>
11 years agomx6qsabrelite: Configure CONFIG_BOOTDELAY to one second
Fabio Estevam [Fri, 16 Nov 2012 05:09:05 +0000 (05:09 +0000)]
mx6qsabrelite: Configure CONFIG_BOOTDELAY to one second

One second is enough time for users to react in case they want to stop the
booting process.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Jason Liu <r64343@freescale.com>
11 years agomx53loco: Configure CONFIG_BOOTDELAY to one second
Fabio Estevam [Fri, 16 Nov 2012 05:09:04 +0000 (05:09 +0000)]
mx53loco: Configure CONFIG_BOOTDELAY to one second

One second is enough time for users to react in case they want to stop the
booting process.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
11 years agomx28evk: Configure CONFIG_BOOTDELAY to one second
Fabio Estevam [Fri, 16 Nov 2012 05:09:03 +0000 (05:09 +0000)]
mx28evk: Configure CONFIG_BOOTDELAY to one second

One second is enough time for users to react in case they want to stop the
booting process.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
11 years agoehci-mxc: Fix host power mask bit for i.MX35
Benoît Thébaudeau [Fri, 16 Nov 2012 01:42:49 +0000 (01:42 +0000)]
ehci-mxc: Fix host power mask bit for i.MX35

The correct bit for H1_PM is 16, not 8, which is the DP pull-up impedance
selection bit.

This issue has been reported by Michael Burkey <mdburkey@gmail.com> and fixed by
Christoph Fritz <chf.fritz@googlemail.com> on Linux, from which these #define-s
had been copied.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Marek Vasut <marex@denx.de>
Acked-by: Stefano Babic <sbabic@denx.de>
11 years agomx6: clock: Only show CSPI clock if CSPI is enabled
Fabio Estevam [Fri, 16 Nov 2012 01:30:10 +0000 (01:30 +0000)]
mx6: clock: Only show CSPI clock if CSPI is enabled

If a board does not enable CSPI, there is no need to show the CSPI clock
frequency as part of the 'clock' command.

Reported-by: Dirk Behme <dirk.behme@gmail.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Dirk Behme <dirk.behme@gmail.com>
11 years agospi: mxc_spi: Fix spi clock glitch durant reset
Fabio Estevam [Thu, 15 Nov 2012 11:23:24 +0000 (11:23 +0000)]
spi: mxc_spi: Fix spi clock glitch durant reset

Measuring the spi clock line on a scope shows a 'glitch' during the reset of the
spi.

Fix this by toggling only the MXC_CSPICTRL_EN bit, so that the clock line becomes
always stable.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Stefano Babic <sbabic@denx.de>
11 years agospi: mxc_spi: Fix handling of chip select
Fabio Estevam [Thu, 15 Nov 2012 11:23:23 +0000 (11:23 +0000)]
spi: mxc_spi: Fix handling of chip select

In decode_cs() function the polarity of the chip select must be taken into
account.

Also, for the case of low active chip select, the CS was activated too early.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
11 years agomx5: Print CSPI clock in 'clock' command
Fabio Estevam [Thu, 15 Nov 2012 11:23:22 +0000 (11:23 +0000)]
mx5: Print CSPI clock in 'clock' command

Print CSPI clock in 'clock' command.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
11 years agomx5: Align SPI CS naming with i.MX53 reference manual
Fabio Estevam [Thu, 15 Nov 2012 11:23:21 +0000 (11:23 +0000)]
mx5: Align SPI CS naming with i.MX53 reference manual

Align SPI chip select naming with i.MX53 reference manual.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
11 years agoehci-mx5/6: Make board_ehci_hcd_init() optional
Benoît Thébaudeau [Tue, 13 Nov 2012 09:58:35 +0000 (09:58 +0000)]
ehci-mx5/6: Make board_ehci_hcd_init() optional

A custom board_ehci_hcd_init() may be unneeded, so add a weak default
implementation doing nothing.

By the way, use simple __weak from linux/compiler.h for
board_ehci_hcd_postinit() instead of weak alias with full attribute.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
11 years agomx35pdk: Add support for OTG
Benoît Thébaudeau [Tue, 13 Nov 2012 09:58:25 +0000 (09:58 +0000)]
mx35pdk: Add support for OTG

Add support for the OTG port on the mx35pdk Personality board.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Tested-by: Stefano Babic <sbabic@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Marek Vasut <marex@denx.de>
11 years agoehci-mxc: Add support for i.MX35
Benoît Thébaudeau [Tue, 13 Nov 2012 09:58:12 +0000 (09:58 +0000)]
ehci-mxc: Add support for i.MX35

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
11 years agoehci-mxc: Define host offsets
Benoît Thébaudeau [Tue, 13 Nov 2012 09:57:59 +0000 (09:57 +0000)]
ehci-mxc: Define host offsets

Some MXC SoCs like the i.MX35 have hosts located at unusual offsets, so prepare
to the introduction of i.MX35 support by defining the ehci-mxc hosts offsets at
SoC level.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
11 years agoehci-mxc: Make i.MX25 EHCI configurable
Benoît Thébaudeau [Tue, 13 Nov 2012 09:57:48 +0000 (09:57 +0000)]
ehci-mxc: Make i.MX25 EHCI configurable

Use EHCI MXC configuration options for i.MX25.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Matthias Weisser <weisserm@arcor.de>
11 years agoehci-mxc: Make EHCI power/oc polarities configurable
Benoît Thébaudeau [Tue, 13 Nov 2012 09:57:27 +0000 (09:57 +0000)]
ehci-mxc: Make EHCI power/oc polarities configurable

Make EHCI power and overcurrent polarities configurable. If not set, these new
configurartions keep the default register values so that existing board files
do not have to be changed.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
11 years agoehci-mx5: Add missing OC_DIS for i.MX53
Benoît Thébaudeau [Tue, 13 Nov 2012 09:57:14 +0000 (09:57 +0000)]
ehci-mx5: Add missing OC_DIS for i.MX53

The i.MX53 has MXC_H*_UCTRL_H*_OC_DIS_BIT bits to disable the oc pin.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
11 years agoehci-mx5: Fix *PM usage for i.MX53
Benoît Thébaudeau [Tue, 13 Nov 2012 09:56:59 +0000 (09:56 +0000)]
ehci-mx5: Fix *PM usage for i.MX53

The MXC_*_UCTRL_*PM_BIT bits are available only on i.MX51.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
11 years agoehci-mx5: Fix OPM usage
Benoît Thébaudeau [Tue, 13 Nov 2012 09:56:44 +0000 (09:56 +0000)]
ehci-mx5: Fix OPM usage

MXC_OTG_UCTRL_OPM_BIT disables (masks) the power/oc pins if set, like
MXC_H1_UCTRL_H1PM_BIT and MXC_H2_UCTRL_H2PM_BIT, not the opposite.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
11 years agoehci-mx5: Fix OC_DIS usage
Benoît Thébaudeau [Tue, 13 Nov 2012 09:56:30 +0000 (09:56 +0000)]
ehci-mx5: Fix OC_DIS usage

MXC_OTG_PHYCTRL_OC_DIS_BIT disables the oc pin if set, like MXC_H1_OC_DIS_BIT,
not the opposite.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
11 years agoehci-mx5: Clean up
Benoît Thébaudeau [Tue, 13 Nov 2012 09:56:15 +0000 (09:56 +0000)]
ehci-mx5: Clean up

Clean up ehci-mx5:
 - Fix column alignments.
 - Fix comments.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
11 years agoehci-mxc: Clean up
Benoît Thébaudeau [Tue, 13 Nov 2012 09:55:57 +0000 (09:55 +0000)]
ehci-mxc: Clean up

Clean up ehci-mxc:
 - Remove useless #if's.
 - Fix identation.
 - Issue a #error if used with an unsupported platform.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
11 years agomx31: Move EHCI definitions to ehci-fsl.h
Benoît Thébaudeau [Tue, 13 Nov 2012 09:55:30 +0000 (09:55 +0000)]
mx31: Move EHCI definitions to ehci-fsl.h

The EHCI definitions in i.MX31's imx-regs.h are MXC-generic, so move them to
ehci-fsl.h so that all MXC SoCs can use them.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
11 years agoarch-mx6: add mx6dl_pins.h
Troy Kisky [Tue, 23 Oct 2012 10:57:49 +0000 (10:57 +0000)]
arch-mx6: add mx6dl_pins.h

Only the values used in the sabrelite board are
added currently. Add more as other boards use them.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
11 years agoimx-common: cpu: add imx_ddr_size
Troy Kisky [Tue, 23 Oct 2012 10:57:48 +0000 (10:57 +0000)]
imx-common: cpu: add imx_ddr_size

Read memory setup registers to determine size
of available ram. This routine works for mx53/mx6x

I need this because when mx6solo called get_ram_size
with a too large maximum size, the system hanged.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
11 years agomx6: use CONFIG_MX6 instead of CONFIG_MX6Q
Troy Kisky [Tue, 23 Oct 2012 10:57:47 +0000 (10:57 +0000)]
mx6: use CONFIG_MX6 instead of CONFIG_MX6Q

Use CONFIG_MX6 when the particular processor
variant isn't important.

Reserve the use of CONFIG_MX6Q to
specifically test for quad cores variant.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
11 years agomx6: soc: update get_cpu_rev and get_imx_type for mx6solo/sololite
Troy Kisky [Tue, 23 Oct 2012 10:57:46 +0000 (10:57 +0000)]
mx6: soc: update get_cpu_rev and get_imx_type for mx6solo/sololite

Previously, the same value was returned for both mx6dl and mx6solo.
Check number of processors to differeniate.
Also, a freescale patch says that sololite has its cpu/rev
stored at 0x280 instead of 0x260.
I don't have a sololite to verify.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
11 years agoMerge git://git.denx.de/u-boot
Stefano Babic [Sat, 10 Nov 2012 07:05:54 +0000 (08:05 +0100)]
Merge git://git.denx.de/u-boot

11 years agoMerge branch 'master' of git://www.denx.de/git/u-boot-microblaze
Tom Rini [Fri, 9 Nov 2012 15:47:25 +0000 (08:47 -0700)]
Merge branch 'master' of git://www.denx.de/git/u-boot-microblaze

11 years agocommon/command.c: revert changes from commit 199adb60
Anatolij Gustschin [Thu, 8 Nov 2012 11:40:17 +0000 (12:40 +0100)]
common/command.c: revert changes from commit 199adb60

commit 199adb601ff34bdbbd0667fac80dfe0a87bffc2b "common/misc: sparse
fixes" broke the help command trying to fix the sparse error
"command.c:44:38: error: bad constant expression".

As Henrik points out, the fix was bad because the commit used
CONFIG_SYS_MAXARGS whereas the code intended to use the maximum
number of commands (not arguments to a command).

Revert command.c changes to the original code as asked by Wolfgang.

Reported-by: Henrik Nordström <henrik@henriknordstrom.net>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
11 years agomicroblaze: Fix compilation failure because of missing libdts
Michal Simek [Wed, 26 Sep 2012 12:24:05 +0000 (14:24 +0200)]
microblaze: Fix compilation failure because of missing libdts

Microblaze platform can use CONFIG_OF_EMBED option
but also it is necessary to support boards
which don't want to use this option.
U-Boot doesn't compile dts/libdts.o for #undef CONFIG_OF_EMBED
case that's why it should be guarded by ifdef.

Signed-off-by: Michal Simek <monstr@monstr.eu>
11 years agomicroblaze: Remove asm/bitops.h from asm/posix_types.h
Michal Simek [Wed, 7 Nov 2012 14:25:39 +0000 (15:25 +0100)]
microblaze: Remove asm/bitops.h from asm/posix_types.h

The patch
"include/linux/byteorder: import latest endian definitions from linux"
(sha1: eef1cf2d5cf1cae5fb76713e912263dedf110aeb)

Introduced a lot of compilation failures with unknow types.
include/linux/byteorder/big_endian.h:45:1: error: unknown type name '__le64'
include/linux/byteorder/big_endian.h: In function '__cpu_to_le64p':
include/linux/byteorder/big_endian.h:47:18: error: '__le64' undeclared (first use in this function)
include/linux/byteorder/big_endian.h:47:18: note: each undeclared identifier is reported only once for each function it appears in
include/linux/byteorder/big_endian.h:47:25: error: expected ';' before '__swab64p'
include/linux/byteorder/big_endian.h: At top level:
include/linux/byteorder/big_endian.h:49:1: error: unknown type name '__le64'
include/linux/byteorder/big_endian.h:53:1: error: unknown type name '__le32'
include/linux/byteorder/big_endian.h: In function '__cpu_to_le32p':
include/linux/byteorder/big_endian.h:55:18: error: '__le32' undeclared (first use in this function)
include/linux/byteorder/big_endian.h:55:25: error: expected ';' before '__swab32p'
include/linux/byteorder/big_endian.h: At top level:
include/linux/byteorder/big_endian.h:57:1: error: unknown type name '__le32'
include/linux/byteorder/big_endian.h:61:1: error: unknown type name '__le16'
...

Removing asm/bitops.h solved this problem.

Signed-off-by: Michal Simek <monstr@monstr.eu>
11 years agomicroblaze: Flush caches before enabling them
Michal Simek [Tue, 25 Sep 2012 08:13:35 +0000 (10:13 +0200)]
microblaze: Flush caches before enabling them

Flushing caches is necessary because of soft reset
which doesn't clear caches.

Signed-off-by: Michal Simek <monstr@monstr.eu>
Reviewed-by: Marek Vasut <marex@denx.de>
11 years agomicroblaze: Fix byteorder for microblaze
Michal Simek [Wed, 26 Sep 2012 13:24:51 +0000 (15:24 +0200)]
microblaze: Fix byteorder for microblaze

Just remove ancient code.

Signed-off-by: Michal Simek <monstr@monstr.eu>
Acked-by: Stephan Linz <linz@li-pro.net>
Reviewed-by: Marek Vasut <marex@denx.de>
11 years agomicroblaze: Fix compilation warning in ext2_find_next_zero_bit
Michal Simek [Wed, 26 Sep 2012 12:42:38 +0000 (14:42 +0200)]
microblaze: Fix compilation warning in ext2_find_next_zero_bit

ext2_find_next_zero_bit must be also static if __swab32 is also static.

Warning:
include/asm/bitops.h:369:22: warning: '__fswab32' is static but
used in inline function 'ext2_find_next_zero_bit'
which is not static [enabled by default]

Signed-off-by: Michal Simek <monstr@monstr.eu>
Acked-by: Stephan Linz <linz@li-pro.net>
11 years agoMerge branch 'master' of git://git.denx.de/u-boot-avr32
Tom Rini [Mon, 5 Nov 2012 16:46:45 +0000 (09:46 -0700)]
Merge branch 'master' of git://git.denx.de/u-boot-avr32

11 years agoMerge branch 'master' of git://git.denx.de/u-boot-arm
Tom Rini [Mon, 5 Nov 2012 14:42:00 +0000 (07:42 -0700)]
Merge branch 'master' of git://git.denx.de/u-boot-arm

11 years agoMakefile: use EXTRAVERSION for -rc? tag
Wolfgang Denk [Mon, 5 Nov 2012 00:50:54 +0000 (17:50 -0700)]
Makefile: use EXTRAVERSION for -rc? tag

When using SUBLEVEL for the -rc? tag, this results in an ugly version
string like "2013.01.-rc1" - let's use EXTRAVERSION instead to get the
simple "2013.01-rc1"

Signed-off-by: Wolfgang Denk <wd@denx.de>
Signed-off-by: Tom Rini <trini@ti.com>
11 years agoPrepare v2013.01-rc1 v2013.01-rc1
Tom Rini [Sun, 4 Nov 2012 18:44:08 +0000 (11:44 -0700)]
Prepare v2013.01-rc1

Signed-off-by: Tom Rini <trini@ti.com>
11 years agopatman: Add additional tags to ignore
Simon Glass [Fri, 2 Nov 2012 06:38:43 +0000 (06:38 +0000)]
patman: Add additional tags to ignore

The BRANCH= tag can be used to indicate the destination branch for a
commit. Ignore this tag.

Also ignore the gerrit 'Commit-Ready:' tag.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agousb gadget ether: Fix warning in is_eth_addr_valid()
Tom Rini [Wed, 31 Oct 2012 13:30:41 +0000 (13:30 +0000)]
usb gadget ether: Fix warning in is_eth_addr_valid()

The gadget ethernet driver needs to keep copies of the MAC address (at
both endpoints) as strings so it needs a custom function for validation
of the MAC.  It was not however performing a totally correct check and
also was emitting a warning about a set but unused variable.  The
solution to both is that after checking the string contents we use the
standard test for a valid MAC.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Marek Vasut <marex@denx.de>
Signed-off-by: Tom Rini <trini@ti.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
11 years agodrivers/serial/serial_ns16550.c: sparse fixes
Kim Phillips [Mon, 29 Oct 2012 13:34:47 +0000 (13:34 +0000)]
drivers/serial/serial_ns16550.c: sparse fixes

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
11 years agodrivers/mtd/nand: sparse fixes
Kim Phillips [Mon, 29 Oct 2012 13:34:46 +0000 (13:34 +0000)]
drivers/mtd/nand: sparse fixes

nand_ecc.c:82:5: warning: symbol 'nand_calculate_ecc' was not declared. Should it be static?
nand_ecc.c:155:5: warning: symbol 'nand_correct_data' was not declared. Should it be static?
nand_base.c:2854:1: error: directive in argument list
nand_base.c:2856:1: error: directive in argument list

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Acked-by: Scott Wood <scottwood@freescale.com>
11 years agodrivers/mtd/cfi_flash.c: sparse fixes
Kim Phillips [Mon, 29 Oct 2012 13:34:45 +0000 (13:34 +0000)]
drivers/mtd/cfi_flash.c: sparse fixes

cfi_flash.c:756:43: warning: Using plain integer as NULL pointer
cfi_flash.c:1150:52: warning: cast to non-scalar
cfi_flash.c:1433:46: warning: cast truncates bits from constant value (890089 becomes 89)
cfi_flash.c:1490:61: warning: cast truncates bits from constant value (1f001f becomes 1f)
cfi_flash.c:1508:61: warning: cast truncates bits from constant value (10001 becomes 1)
cfi_flash.c:1738:63: warning: cast truncates bits from constant value (10001 becomes 1)
cfi_flash.c:1857:6: warning: symbol '__flash_cmd_reset' was not declared. Should it be static?

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
11 years agodrivers/mmc/fsl_esdhc.c: sparse fixes
Kim Phillips [Mon, 29 Oct 2012 13:34:44 +0000 (13:34 +0000)]
drivers/mmc/fsl_esdhc.c: sparse fixes

fsl_esdhc.c:71:6: warning: symbol 'esdhc_xfertyp' was not declared. Should it be static?
fsl_esdhc.c:413:6: warning: symbol 'set_sysctl' was not declared. Should it be st

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
11 years agodrivers/mmc/mmc.c: sparse fixes
Kim Phillips [Mon, 29 Oct 2012 13:34:43 +0000 (13:34 +0000)]
drivers/mmc/mmc.c: sparse fixes

mmc.c:137:5: warning: symbol 'mmc_send_cmd' was not declared. Should it be static?
mmc.c:203:5: warning: symbol 'mmc_send_status' was not declared. Should it be static?
mmc.c:247:5: warning: symbol 'mmc_set_blocklen' was not declared. Should it be static?
mmc.c:440:5: warning: symbol 'mmc_read_blocks' was not declared. Should it be static?
mmc.c:510:5: warning: symbol 'mmc_go_idle' was not declared. Should it be static?
mmc.c:532:1: warning: symbol 'sd_send_op_cond' was not declared. Should it be static?
mmc.c:597:5: warning: symbol 'mmc_send_op_cond' was not declared. Should it be static?
mmc.c:661:5: warning: symbol 'mmc_send_ext_csd' was not declared. Should it be static?
mmc.c:683:5: warning: symbol 'mmc_switch' was not declared. Should it be static?
mmc.c:705:5: warning: symbol 'mmc_change_freq' was not declared. Should it be static?
mmc.c:775:5: warning: symbol 'sd_switch' was not declared. Should it be static?
mmc.c:796:5: warning: symbol 'sd_change_freq' was not declared. Should it be static?
mmc.c:935:6: warning: symbol 'mmc_set_ios' was not declared. Should it be static?
mmc.c:953:6: warning: symbol 'mmc_set_bus_width' was not declared. Should it be static?
mmc.c:1108:26: warning: dubious: !x & y
mmc.c:960:5: warning: symbol 'mmc_startup' was not declared. Should it be static?
mmc.c:1243:5: warning: symbol 'mmc_send_if_cond' was not declared. Should it be s

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
11 years agodrivers/input/input.c: sparse fix
Kim Phillips [Mon, 29 Oct 2012 13:34:42 +0000 (13:34 +0000)]
drivers/input/input.c: sparse fix

input.c:97:5: warning: symbol 'input_queue_ascii' was not declared. Should it be

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Acked-by: Simon Glass <sjg@chromium.org>
11 years agodrivers/gpio/mpc83xx_gpio.c: sparse fixes
Kim Phillips [Mon, 29 Oct 2012 13:34:41 +0000 (13:34 +0000)]
drivers/gpio/mpc83xx_gpio.c: sparse fixes

mpc83xx_gpio.c:166:26: warning: non-ANSI function declaration of function 'mpc83xx_gpio_init_f'
mpc83xx_gpio.c:190:26: warning: non-ANSI function declaration of function 'mpc83xx_gpio_init_r'

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
11 years agodrivers/block/: sparse fixes
Kim Phillips [Mon, 29 Oct 2012 13:34:40 +0000 (13:34 +0000)]
drivers/block/: sparse fixes

sata_sil.c:371:7: warning: symbol 'sil_sata_rw_lba28' was not declared. Should it be static?
sata_sil.c:399:7: warning: symbol 'sil_sata_rw_lba48' was not declared. Should it be static?
sata_sil.c:429:6: warning: symbol 'sil_sata_cmd_flush_cache' was not declared. Should it be static?
sata_sil.c:441:6: warning: symbol 'sil_sata_cmd_flush_cache_ext' was not declared. Should it be static?
sata_sil.c:489:7: warning: symbol 'sata_read' was not declared. Should it be static?
sata_sil.c:505:7: warning: symbol 'sata_write' was not declared. Should it be static?
sata_sil.c:526:5: warning: symbol 'init_sata' was not declared. Should it be static?
sata_sil.c:588:5: warning: symbol 'scan_sata' was not declared. Should it be static?
fsl_sata.c:59:6: warning: symbol 'dprint_buffer' was not declared. Should it be static?
fsl_sata.c:187:42: warning: incorrect type in assignment (different base types)
fsl_sata.c:187:42:    expected unsigned int [unsigned] [usertype] cda
fsl_sata.c:187:42:    got restricted __le32 [usertype] <noident>
fsl_sata.c:291:6: warning: symbol 'fsl_sata_hardware_reset' was not declared. Should it be static?
fsl_sata.c:418:27: warning: incorrect type in assignment (different base types)
fsl_sata.c:418:27:    expected unsigned int [unsigned] [usertype] dba
fsl_sata.c:418:27:    got restricted __le32 [usertype] <noident>
fsl_sata.c:424:41: warning: incorrect type in assignment (different base types)
fsl_sata.c:424:41:    expected unsigned int [unsigned] [usertype] ext_c_ddc
fsl_sata.c:424:41:    got restricted __le32 [usertype] <noident>
fsl_sata.c:431:41: warning: incorrect type in assignment (different base types)
fsl_sata.c:431:41:    expected unsigned int [unsigned] [usertype] ext_c_ddc
fsl_sata.c:431:41:    got restricted __le32 [usertype] <noident>
fsl_sata.c:442:22: warning: incorrect type in assignment (different base types)
fsl_sata.c:442:22:    expected unsigned int [unsigned] [usertype] cda
fsl_sata.c:442:22:    got restricted __le32 [usertype] <noident>
fsl_sata.c:446:31: warning: incorrect type in assignment (different base types)
fsl_sata.c:446:31:    expected unsigned int [unsigned] [usertype] prde_fis_len
fsl_sata.c:446:31:    got restricted __le32 [usertype] <noident>
fsl_sata.c:448:22: warning: incorrect type in assignment (different base types)
fsl_sata.c:448:22:    expected unsigned int [unsigned] [usertype] ttl
fsl_sata.c:448:22:    got restricted __le32 [usertype] <noident>
fsl_sata.c:460:28: warning: incorrect type in assignment (different base types)
fsl_sata.c:460:28:    expected unsigned int [unsigned] [usertype] attribute
fsl_sata.c:460:28:    got restricted __le32 [usertype] <noident>
fsl_sata.c:623:6: warning: symbol 'fsl_sata_flush_cache' was not declared. Should it be static?
fsl_sata.c:667:5: warning: symbol 'fsl_sata_rw_ncq_cmd' was not declared. Should it be static?
fsl_sata.c:710:6: warning: symbol 'fsl_sata_flush_cache_ext' was not declared. Should it be static?
fsl_sata.c:725:6: warning: symbol 'fsl_sata_software_reset' was not declared. Should it be static?
fsl_sata.c:760:5: warning: symbol 'ata_low_level_rw_lba48' was not declared. Should it be static?
fsl_sata.c:795:5: warning: symbol 'ata_low_level_rw_lba28' was not declared. Should it be static?

the following compiler warnings show up after fixing the above, so
remove those three functions:

fsl_sata.c:59:13: warning: 'dprint_buffer' defined but not used [-Wunused-function]
fsl_sata.c:291:13: warning: 'fsl_sata_hardware_reset' defined but not used [-Wunused-function]
fsl_sata.c:726:13: warning: 'fsl_sata_software_reset' defined but not used [-Wunused-function]

Other than that, the following are fixed by __iomem annotation:

fsl_sata.c:84:39: warning: incorrect type in argument 1 (different address spaces)
fsl_sata.c:84:39:    expected unsigned int const volatile [noderef] <asn:2>*addr
fsl_sata.c:84:39:    got unsigned int volatile *addr
fsl_sata.c:172:26: warning: incorrect type in argument 1 (different address spaces)
fsl_sata.c:172:26:    expected unsigned int const volatile [noderef] <asn:2>*addr
fsl_sata.c:172:26:    got unsigned int *<noident>
fsl_sata.c:175:19: warning: incorrect type in argument 1 (different address spaces)
fsl_sata.c:175:19:    expected unsigned int volatile [noderef] <asn:2>*addr
fsl_sata.c:175:19:    got unsigned int *<noident>
fsl_sata.c:181:19: warning: incorrect type in argument 1 (different address spaces)
fsl_sata.c:181:19:    expected unsigned int volatile [noderef] <asn:2>*addr
fsl_sata.c:181:19:    got unsigned int *<noident>
fsl_sata.c:184:26: warning: incorrect type in argument 1 (different address spaces)
fsl_sata.c:184:26:    expected unsigned int const volatile [noderef] <asn:2>*addr
fsl_sata.c:184:26:    got unsigned int *<noident>
fsl_sata.c:186:19: warning: incorrect type in argument 1 (different address spaces)
fsl_sata.c:186:19:    expected unsigned int volatile [noderef] <asn:2>*addr
fsl_sata.c:186:19:    got unsigned int *<noident>
fsl_sata.c:189:26: warning: incorrect type in argument 1 (different address spaces)
fsl_sata.c:189:26:    expected unsigned int const volatile [noderef] <asn:2>*addr
fsl_sata.c:189:26:    got unsigned int *<noident>
fsl_sata.c:191:19: warning: incorrect type in argument 1 (different address spaces)
fsl_sata.c:191:19:    expected unsigned int volatile [noderef] <asn:2>*addr
fsl_sata.c:191:19:    got unsigned int *<noident>
fsl_sata.c:194:26: warning: incorrect type in argument 1 (different address spaces)
fsl_sata.c:194:26:    expected unsigned int const volatile [noderef] <asn:2>*addr
fsl_sata.c:194:26:    got unsigned int *<noident>
fsl_sata.c:195:19: warning: incorrect type in argument 1 (different address spaces)
fsl_sata.c:195:19:    expected unsigned int volatile [noderef] <asn:2>*addr
fsl_sata.c:195:19:    got unsigned int *<noident>
fsl_sata.c:198:19: warning: incorrect type in argument 1 (different address spaces)
fsl_sata.c:198:19:    expected unsigned int volatile [noderef] <asn:2>*addr
fsl_sata.c:198:19:    got unsigned int *<noident>
fsl_sata.c:201:19: warning: incorrect type in argument 1 (different address spaces)
fsl_sata.c:201:19:    expected unsigned int volatile [noderef] <asn:2>*addr
fsl_sata.c:201:19:    got unsigned int *<noident>
fsl_sata.c:204:26: warning: incorrect type in argument 1 (different address spaces)
fsl_sata.c:204:26:    expected unsigned int const volatile [noderef] <asn:2>*addr
fsl_sata.c:204:26:    got unsigned int *<noident>
fsl_sata.c:205:19: warning: incorrect type in argument 1 (different address spaces)
fsl_sata.c:205:19:    expected unsigned int volatile [noderef] <asn:2>*addr
fsl_sata.c:205:19:    got unsigned int *<noident>
fsl_sata.c:208:26: warning: incorrect type in argument 1 (different address spaces)
fsl_sata.c:208:26:    expected unsigned int const volatile [noderef] <asn:2>*addr
fsl_sata.c:208:26:    got unsigned int *<noident>
fsl_sata.c:209:19: warning: incorrect type in argument 1 (different address spaces)
fsl_sata.c:209:19:    expected unsigned int volatile [noderef] <asn:2>*addr
fsl_sata.c:209:19:    got unsigned int *<noident>
fsl_sata.c:212:26: warning: incorrect type in argument 1 (different address spaces)
fsl_sata.c:212:26:    expected unsigned int const volatile [noderef] <asn:2>*addr
fsl_sata.c:212:26:    got unsigned int *<noident>
fsl_sata.c:213:19: warning: incorrect type in argument 1 (different address spaces)
fsl_sata.c:213:19:    expected unsigned int volatile [noderef] <asn:2>*addr
fsl_sata.c:213:19:    got unsigned int *<noident>
fsl_sata.c:216:19: warning: incorrect type in argument 1 (different address spaces)
fsl_sata.c:216:19:    expected unsigned int volatile [noderef] <asn:2>*addr
fsl_sata.c:216:19:    got unsigned int *<noident>
fsl_sata.c:219:19: warning: incorrect type in argument 1 (different address spaces)
fsl_sata.c:219:19:    expected unsigned int volatile [noderef] <asn:2>*addr
fsl_sata.c:219:19:    got unsigned int *<noident>
fsl_sata.c:222:19: warning: incorrect type in argument 1 (different address spaces)
fsl_sata.c:222:19:    expected unsigned int volatile [noderef] <asn:2>*addr
fsl_sata.c:222:19:    got unsigned int *<noident>
fsl_sata.c:225:26: warning: incorrect type in argument 1 (different address spaces)
fsl_sata.c:225:26:    expected unsigned int const volatile [noderef] <asn:2>*addr
fsl_sata.c:225:26:    got unsigned int *<noident>
fsl_sata.c:227:19: warning: incorrect type in argument 1 (different address spaces)
fsl_sata.c:227:19:    expected unsigned int volatile [noderef] <asn:2>*addr
fsl_sata.c:227:19:    got unsigned int *<noident>
fsl_sata.c:242:26: warning: incorrect type in argument 1 (different address spaces)
fsl_sata.c:242:26:    expected unsigned int const volatile [noderef] <asn:2>*addr
fsl_sata.c:242:26:    got unsigned int *<noident>
fsl_sata.c:256:32: warning: incorrect type in argument 1 (different address spaces)
fsl_sata.c:256:32:    expected unsigned int const volatile [noderef] <asn:2>*addr
fsl_sata.c:256:32:    got unsigned int *<noident>
fsl_sata.c:262:26: warning: incorrect type in argument 1 (different address spaces)
fsl_sata.c:262:26:    expected unsigned int const volatile [noderef] <asn:2>*addr
fsl_sata.c:262:26:    got unsigned int *<noident>
fsl_sata.c:274:53: warning: incorrect type in argument 1 (different address spaces)
fsl_sata.c:274:53:    expected unsigned int const volatile [noderef] <asn:2>*addr
fsl_sata.c:274:53:    got unsigned int *<noident>
fsl_sata.c:275:53: warning: incorrect type in argument 1 (different address spaces)
fsl_sata.c:275:53:    expected unsigned int const volatile [noderef] <asn:2>*addr
fsl_sata.c:275:53:    got unsigned int *<noident>
fsl_sata.c:276:53: warning: incorrect type in argument 1 (different address spaces)
fsl_sata.c:276:53:    expected unsigned int const volatile [noderef] <asn:2>*addr
fsl_sata.c:276:53:    got unsigned int *<noident>
fsl_sata.c:277:53: warning: incorrect type in argument 1 (different address spaces)
fsl_sata.c:277:53:    expected unsigned int const volatile [noderef] <asn:2>*addr
fsl_sata.c:277:53:    got unsigned int *<noident>
fsl_sata.c:278:53: warning: incorrect type in argument 1 (different address spaces)
fsl_sata.c:278:53:    expected unsigned int const volatile [noderef] <asn:2>*addr
fsl_sata.c:278:53:    got unsigned int *<noident>
fsl_sata.c:279:53: warning: incorrect type in argument 1 (different address spaces)
fsl_sata.c:279:53:    expected unsigned int const volatile [noderef] <asn:2>*addr
fsl_sata.c:279:53:    got unsigned int *<noident>
fsl_sata.c:280:53: warning: incorrect type in argument 1 (different address spaces)
fsl_sata.c:280:53:    expected unsigned int const volatile [noderef] <asn:2>*addr
fsl_sata.c:280:53:    got unsigned int *<noident>
fsl_sata.c:281:53: warning: incorrect type in argument 1 (different address spaces)
fsl_sata.c:281:53:    expected unsigned int const volatile [noderef] <asn:2>*addr
fsl_sata.c:281:53:    got unsigned int *<noident>
fsl_sata.c:282:53: warning: incorrect type in argument 1 (different address spaces)
fsl_sata.c:282:53:    expected unsigned int const volatile [noderef] <asn:2>*addr
fsl_sata.c:282:53:    got unsigned int *<noident>
fsl_sata.c:283:53: warning: incorrect type in argument 1 (different address spaces)
fsl_sata.c:283:53:    expected unsigned int const volatile [noderef] <asn:2>*addr
fsl_sata.c:283:53:    got unsigned int *<noident>
fsl_sata.c:284:53: warning: incorrect type in argument 1 (different address spaces)
fsl_sata.c:284:53:    expected unsigned int const volatile [noderef] <asn:2>*addr
fsl_sata.c:284:53:    got unsigned int *<noident>
fsl_sata.c:285:53: warning: incorrect type in argument 1 (different address spaces)
fsl_sata.c:285:53:    expected unsigned int const volatile [noderef] <asn:2>*addr
fsl_sata.c:285:53:    got unsigned int *<noident>
fsl_sata.c:286:53: warning: incorrect type in argument 1 (different address spaces)
fsl_sata.c:286:53:    expected unsigned int const volatile [noderef] <asn:2>*addr
fsl_sata.c:286:53:    got unsigned int *<noident>
fsl_sata.c:287:53: warning: incorrect type in argument 1 (different address spaces)
fsl_sata.c:287:53:    expected unsigned int const volatile [noderef] <asn:2>*addr
fsl_sata.c:287:53:    got unsigned int *<noident>
fsl_sata.c:288:53: warning: incorrect type in argument 1 (different address spaces)
fsl_sata.c:288:53:    expected unsigned int const volatile [noderef] <asn:2>*addr
fsl_sata.c:288:53:    got unsigned int *<noident>
fsl_sata.c:289:53: warning: incorrect type in argument 1 (different address spaces)
fsl_sata.c:289:53:    expected unsigned int const volatile [noderef] <asn:2>*addr
fsl_sata.c:289:53:    got unsigned int *<noident>
fsl_sata.c:290:53: warning: incorrect type in argument 1 (different address spaces)
fsl_sata.c:290:53:    expected unsigned int const volatile [noderef] <asn:2>*addr
fsl_sata.c:290:53:    got unsigned int *<noident>
fsl_sata.c:291:53: warning: incorrect type in argument 1 (different address spaces)
fsl_sata.c:291:53:    expected unsigned int const volatile [noderef] <asn:2>*addr
fsl_sata.c:291:53:    got unsigned int *<noident>
fsl_sata.c:292:53: warning: incorrect type in argument 1 (different address spaces)
fsl_sata.c:292:53:    expected unsigned int const volatile [noderef] <asn:2>*addr
fsl_sata.c:292:53:    got unsigned int *<noident>
fsl_sata.c:293:53: warning: incorrect type in argument 1 (different address spaces)
fsl_sata.c:293:53:    expected unsigned int const volatile [noderef] <asn:2>*addr
fsl_sata.c:293:53:    got unsigned int *<noident>
fsl_sata.c:294:53: warning: incorrect type in argument 1 (different address spaces)
fsl_sata.c:294:53:    expected unsigned int const volatile [noderef] <asn:2>*addr
fsl_sata.c:294:53:    got unsigned int *<noident>
fsl_sata.c:295:53: warning: incorrect type in argument 1 (different address spaces)
fsl_sata.c:295:53:    expected unsigned int const volatile [noderef] <asn:2>*addr
fsl_sata.c:295:53:    got unsigned int *<noident>
fsl_sata.c:296:53: warning: incorrect type in argument 1 (different address spaces)
fsl_sata.c:296:53:    expected unsigned int const volatile [noderef] <asn:2>*addr
fsl_sata.c:296:53:    got unsigned int *<noident>
fsl_sata.c:297:53: warning: incorrect type in argument 1 (different address spaces)
fsl_sata.c:297:53:    expected unsigned int const volatile [noderef] <asn:2>*addr
fsl_sata.c:297:53:    got unsigned int *<noident>
fsl_sata.c:298:53: warning: incorrect type in argument 1 (different address spaces)
fsl_sata.c:298:53:    expected unsigned int const volatile [noderef] <asn:2>*addr
fsl_sata.c:298:53:    got unsigned int *<noident>

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
11 years agopowerpc/mpc83xx: sparse fixes
Kim Phillips [Mon, 29 Oct 2012 13:34:39 +0000 (13:34 +0000)]
powerpc/mpc83xx: sparse fixes

fdt.c:91:78: warning: Using plain integer as NULL pointer
fdt.c:103:78: warning: Using plain integer as NULL pointer
speed.c:55:11: warning: symbol 'corecnf_tab' was not declared. Should it be static?
speed.c:519:5: warning: symbol 'do_clocks' was not declared. Should it be static?
mpc8313erdb.c:73:17: warning: obsolete struct initializer, use C99 syntax
mpc8313erdb.c:74:17: warning: obsolete struct initializer, use C99 syntax
mpc8313erdb.c:75:17: warning: obsolete struct initializer, use C99 syntax
mpc8313erdb.c:76:17: warning: obsolete struct initializer, use C99 syntax
mpc8313erdb.c:79:17: warning: obsolete struct initializer, use C99 syntax
mpc8313erdb.c:80:17: warning: obsolete struct initializer, use C99 syntax
mpc8313erdb.c:81:17: warning: obsolete struct initializer, use C99 syntax
mpc8313erdb.c:82:17: warning: obsolete struct initializer, use C99 syntax
mpc8313erdb.c:85:17: warning: obsolete struct initializer, use C99 syntax
mpc8313erdb.c:86:17: warning: obsolete struct initializer, use C99 syntax
mpc8313erdb.c:87:17: warning: obsolete struct initializer, use C99 syntax
mpc8313erdb.c:88:17: warning: obsolete struct initializer, use C99 syntax

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
11 years agopowerpc/mpc85xx: sparse fixes
Kim Phillips [Mon, 29 Oct 2012 13:34:38 +0000 (13:34 +0000)]
powerpc/mpc85xx: sparse fixes

fsl_corenet_serdes.c:485:6: warning: symbol '__soc_serdes_init' was not declared. Should it be static?
cpu_init.c:185:6: warning: symbol 'invalidate_cpc' was not declared. Should it be static?
bcsr.c:28:27: warning: non-ANSI function declaration of function 'enable_8568mds_duart'
bcsr.c:39:33: warning: non-ANSI function declaration of function 'enable_8568mds_flash_write'
bcsr.c:46:34: warning: non-ANSI function declaration of function 'disable_8568mds_flash_write'
bcsr.c:53:29: warning: non-ANSI function declaration of function 'enable_8568mds_qe_mdio'
bcsr.c:28:33: warning: non-ANSI function declaration of function 'enable_8569mds_flash_write'
bcsr.c:33:34: warning: non-ANSI function declaration of function 'disable_8569mds_flash_write'
bcsr.c:38:28: warning: non-ANSI function declaration of function 'enable_8569mds_qe_uec'
bcsr.c:63:47: warning: non-ANSI function declaration of function 'disable_8569mds_brd_eeprom_write_protect'
ngpixis.c:245:1: error: directive in argument list
ngpixis.c:247:1: error: directive in argument list

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
11 years agoarch/powerpc/cpu/mpc8xxx/: sparse fixes
Kim Phillips [Mon, 29 Oct 2012 13:34:37 +0000 (13:34 +0000)]
arch/powerpc/cpu/mpc8xxx/: sparse fixes

ctrl_regs.c:31:5: warning: symbol 'fsl_ddr_get_version' was not declared. Should it be static?
cpu.c:135:14: warning: non-ANSI function declaration of function 'cpu_mask'
cpu.c:154:18: warning: non-ANSI function declaration of function 'cpu_numcores'
cpu.c:37:17: warning: symbol 'cpu_type_list' was not declared. Should it be static?
cpu.c:117:17: warning: symbol 'cpu_type_unknown' was not declared. Should it be static?
fsl_lbc.c:14:6: warning: symbol '__lbc_sdram_init' was not declared. Should it be static?

and:

lc_common_dimm_params.c:15:1: warning: symbol 'compute_cas_latency_ddr3' was not declared. Should it be static?

making it static produces the following compiler warning:

lc_common_dimm_params.c:15:1: warning: 'compute_cas_latency_ddr3' defined but not used [-Wunused-function]

so we protect it with the preprocessor.

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
11 years agolib/vsprintf.c: sparse fixes
Kim Phillips [Mon, 29 Oct 2012 13:34:36 +0000 (13:34 +0000)]
lib/vsprintf.c: sparse fixes

vsprintf.c:31:12: warning: symbol 'hex_asc' was not declared. Should it be static?
vsprintf.c:398:18: warning: Using plain integer as NULL pointer

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
11 years agolib/zlib: sparse fixes
Kim Phillips [Mon, 29 Oct 2012 13:34:35 +0000 (13:34 +0000)]
lib/zlib: sparse fixes

define Z_NULL to (void *)0 include/u-boot/zlib.h to get rid of most of
the NULL pointer warnings.

inflate.c:942:1: warning: non-ANSI definition of function 'inflateEnd'
inflate.c:9:1: warning: non-ANSI definition of function 'inflateReset'
inflate.c:12:17: warning: Using plain integer as NULL pointer
inflate.c:12:42: warning: Using plain integer as NULL pointer
inflate.c:15:17: warning: Using plain integer as NULL pointer
inflate.c:21:19: warning: Using plain integer as NULL pointer
inflate.c:35:1: warning: non-ANSI definition of function 'inflateInit2_'
inflate.c:38:20: warning: Using plain integer as NULL pointer
inflate.c:41:17: warning: Using plain integer as NULL pointer
inflate.c:42:17: warning: Using plain integer as NULL pointer
inflate.c:50:18: warning: Using plain integer as NULL pointer
inflate.c:65:23: warning: Using plain integer as NULL pointer
inflate.c:69:21: warning: Using plain integer as NULL pointer
inflate.c:78:1: warning: non-ANSI definition of function 'inflateInit_'
inflate.c:86:1: warning: non-ANSI definition of function 'fixedtables'
inflate.c:108:26: warning: Using plain integer as NULL pointer
inflate.c:109:1: warning: non-ANSI definition of function 'updatewindow'
inflate.c:112:30: warning: Using plain integer as NULL pointer
inflate.c:339:1: warning: non-ANSI definition of function 'inflate'
inflate.c:349:17: warning: Using plain integer as NULL pointer
inflate.c:349:42: warning: Using plain integer as NULL pointer
inflate.c:350:27: warning: Using plain integer as NULL pointer
inflate.c:369:42: warning: Using plain integer as NULL pointer
inflate.c:376:32: warning: Using plain integer as NULL pointer
inflate.c:401:54: warning: Using plain integer as NULL pointer
inflate.c:419:32: warning: Using plain integer as NULL pointer
inflate.c:426:32: warning: Using plain integer as NULL pointer
inflate.c:433:32: warning: Using plain integer as NULL pointer
inflate.c:444:36: warning: Using plain integer as NULL pointer
inflate.c:449:37: warning: Using plain integer as NULL pointer
inflate.c:450:38: warning: Using plain integer as NULL pointer
inflate.c:457:40: warning: Using plain integer as NULL pointer
inflate.c:458:47: warning: Using plain integer as NULL pointer
inflate.c:480:40: warning: Using plain integer as NULL pointer
inflate.c:481:50: warning: Using plain integer as NULL pointer
inflate.c:491:37: warning: Using plain integer as NULL pointer
inflate.c:492:37: warning: Using plain integer as NULL pointer
inflate.c:501:40: warning: Using plain integer as NULL pointer
inflate.c:502:53: warning: Using plain integer as NULL pointer
inflate.c:512:37: warning: Using plain integer as NULL pointer
inflate.c:513:40: warning: Using plain integer as NULL pointer
inflate.c:525:32: warning: Using plain integer as NULL pointer
inflate.c:529:52: warning: Using plain integer as NULL pointer
inflate.c:543:54: warning: Using plain integer as NULL pointer
inflate.c:932:17: warning: Using plain integer as NULL pointer
inflate.c:932:42: warning: Using plain integer as NULL pointer
inflate.c:935:26: warning: Using plain integer as NULL pointer
inflate.c:940:19: warning: Using plain integer as NULL pointer
adler32.c:58:5: warning: non-ANSI definition of function 'adler32'
adler32.c:81:16: warning: Using plain integer as NULL pointer
zutil.c:53:9: warning: non-ANSI definition of function 'zcalloc'
zutil.c:64:9: warning: non-ANSI definition of function 'zcfree'
inffast.c:70:1: warning: non-ANSI definition of function 'inflate_fast'
inftrees.c:33:1: warning: non-ANSI definition of function 'inflate_table'

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
11 years agodrivers/net/: sparse fixes
Kim Phillips [Mon, 29 Oct 2012 13:34:34 +0000 (13:34 +0000)]
drivers/net/: sparse fixes

phy.c:46:5: warning: symbol 'genphy_config_advert' was not declared. Should it be static?
phy.c:121:5: warning: symbol 'genphy_setup_forced' was not declared. Should it be static?
phy.c:468:5: warning: symbol 'phy_probe' was not declared. Should it be static?
phy.c:491:19: warning: symbol 'get_phy_driver' was not declared. Should it be static?
phy.c:508:19: warning: symbol 'phy_device_create' was not declared. Should it be static?
phy.c:552:5: warning: symbol 'get_phy_id' was not declared. Should it be static?
phy.c:584:19: warning: symbol 'get_phy_device' was not declared. Should it be sta
vitesse.c:126:5: warning: symbol 'vsc8601_config' was not declared. Should it be static?
vsc7385.c:33:5: warning: symbol 'vsc7385_upload_firmware' was not declared. Should it be static?
tgec_phy.c:33:5: warning: symbol 'tgec_mdio_write' was not declared. Should it be static?
tgec_phy.c:75:5: warning: symbol 'tgec_mdio_read' was not declared. Should it be static?
tgec_phy.c:117:5: warning: symbol 'tgec_mdio_reset' was not declared. Should it be static?
eth.c:48:6: warning: symbol 'dtsec_configure_serdes' was not declared. Should it be static?
p4080.c:26:5: warning: symbol 'port_to_devdisr' was not declared. Should it be static?

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
11 years agonet/: sparse fixes
Kim Phillips [Mon, 29 Oct 2012 13:34:33 +0000 (13:34 +0000)]
net/: sparse fixes

bootp.c:44:14: warning: symbol 'dhcp_state' was not declared. Should it be static?
bootp.c:45:15: warning: symbol 'dhcp_leasetime' was not declared. Should it be static?
bootp.c:46:10: warning: symbol 'NetDHCPServerIP' was not declared. Should it be static?
arp.c:30:17: warning: symbol 'NetArpWaitReplyIP' was not declared. Should it be static?
arp.c:37:16: warning: symbol 'NetArpTxPacket' was not declared. Should it be static?
arp.c:38:17: warning: symbol 'NetArpPacketBuf' was not declared. Should it be static?
atheros.c:33:19: warning: symbol 'AR8021_driver' was not declared. Should it be static?
net.c:183:7: warning: symbol 'PktBuf' was not declared. Should it be static?
net.c:159:21: warning: symbol 'net_state' was not declared. Should it be static?
ping.c:73:6: warning: symbol 'ping_start' was not declared. Should it be static?
ping.c:82:13: warning: symbol 'ping_receive' was not declared. Should it be static?
tftp.c:53:7: warning: symbol 'TftpRRQTimeoutMSecs' was not declared. Should it be static?
tftp.c:54:5: warning: symbol 'TftpRRQTimeoutCountMax' was not declared. Should it be static?
eth.c:125:19: warning: symbol 'eth_current' was not declared. Should it be static?

Note: in the ping.c fix, commit a36b12f95a29647a06b5459198684fc142482020
"net: Move PING out of net.c" mistakenly carried the ifdef CMD_PING
clause from when it was necessary to avoid warnings when it was embedded
in net.c.

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
11 years agocommon/misc: sparse fixes
Kim Phillips [Mon, 29 Oct 2012 13:34:32 +0000 (13:34 +0000)]
common/misc: sparse fixes

command.c:44:38: error: bad constant expression
dlmalloc.c:1468:2: warning: Using plain integer as NULL pointer
dlmalloc.c:1468:5: warning: Using plain integer as NULL pointer
dlmalloc.c:2176:12: warning: Using plain integer as NULL pointer
dlmalloc.c:2179:31: warning: Using plain integer as NULL pointer
dlmalloc.c:2382:14: warning: Using plain integer as NULL pointer
dlmalloc.c:2436:14: warning: Using plain integer as NULL pointer
dlmalloc.c:2582:31: warning: Using plain integer as NULL pointer
dlmalloc.c:2585:17: warning: Using plain integer as NULL pointer
dlmalloc.c:2646:14: warning: Using plain integer as NULL pointer
dlmalloc.c:2659:19: warning: Using plain integer as NULL pointer
dlmalloc.c:2692:19: warning: Using plain integer as NULL pointer
dlmalloc.c:2707:19: warning: Using plain integer as NULL pointer
dlmalloc.c:2708:14: warning: Using plain integer as NULL pointer
dlmalloc.c:2786:31: warning: Using plain integer as NULL pointer
dlmalloc.c:2801:12: warning: Using plain integer as NULL pointer
dlmalloc.c:2801:22: warning: Using plain integer as NULL pointer
dlmalloc.c:2926:27: warning: Using plain integer as NULL pointer
dlmalloc.c:2928:14: warning: Using plain integer as NULL pointer
dlmalloc.c:2929:12: warning: Using plain integer as NULL pointer
dlmalloc.c:3075:14: warning: Using plain integer as NULL pointer
hush.c:292:14: warning: symbol 'last_return_code' was not declared. Should it be static?
hush.c:293:5: warning: symbol 'nesting_level' was not declared. Should it be static?
hush.c:2175:20: warning: Using plain integer as NULL pointer
hush.c:2175:34: warning: Using plain integer as NULL pointer
hush.c:2210:41: warning: Using plain integer as NULL pointer
hush.c:2216:45: warning: Using plain integer as NULL pointer
hush.c:2249:25: warning: Using plain integer as NULL pointer
hush.c:2332:13: warning: symbol 'new_pipe' was not declared. Should it be static?
hush.c:2390:5: warning: symbol 'reserved_word' was not declared. Should it be static?
hush.c:2927:5: warning: symbol 'parse_stream' was not declared. Should it be static?
hush.c:3127:6: warning: symbol 'mapset' was not declared. Should it be static?
hush.c:3133:6: warning: symbol 'update_ifs_map' was not declared. Should it be static?
hush.c:3161:5: warning: symbol 'parse_stream_outer' was not declared. Should it be static?
hush.c:3295:34: warning: Using plain integer as NULL pointer
hush.c:3631:5: warning: symbol 'do_showvar' was not declared. Should it be static
image.c:1282:29: warning: Using plain integer as NULL pointer
image.c:1315:41: warning: Using plain integer as NULL pointer
image.c:1330:25: warning: Using plain integer as NULL pointer
image.c:1706:25: warning: Using plain integer as NULL pointer
main.c:510:10: warning: symbol 'hist_num' was not declared. Should it be static?
main.c:512:5: warning: symbol 'hist_list' was not declared. Should it be static?
main.c:513:6: warning: symbol 'hist_lines' was not declared. Should it be static?
usb_storage.c:195:6: warning: symbol 'usb_show_progress' was not declared. Should it be static?
usb_storage.c:440:48: warning: Using plain integer as NULL pointer
usb_storage.c:503:5: warning: symbol 'usb_stor_BBB_comdat' was not declared. Should it be static?
usb_storage.c:551:5: warning: symbol 'usb_stor_CB_comdat' was not declared. Should it be static?
usb_storage.c:629:55: warning: Using plain integer as NULL pointer
usb_storage.c:620:5: warning: symbol 'usb_stor_CBI_get_status' was not declared. Should it be static?
usb_storage.c:675:43: warning: Using plain integer as NULL pointer
usb_storage.c:668:5: warning: symbol 'usb_stor_BBB_clear_endpt_stall' was not declared. Should it be static?
usb_storage.c:679:5: warning: symbol 'usb_stor_BBB_transport' was not declared. Should it be static?
usb_storage.c:801:5: warning: symbol 'usb_stor_CB_transport' was not declared. Sh
xyzModem.c:104:1: warning: symbol 'CYGACC_COMM_IF_GETC_TIMEOUT' was not declared. Should it be static?
xyzModem.c:122:1: warning: symbol 'CYGACC_COMM_IF_PUTC' was not declared. Should it be static?
xyzModem.c:169:1: warning: symbol 'parse_num' was not declared. Should it be stat

note: hush.c's nesting_level deleted because not used.

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
11 years agocommon/cmd_*.c: sparse fixes
Kim Phillips [Mon, 29 Oct 2012 13:34:31 +0000 (13:34 +0000)]
common/cmd_*.c: sparse fixes

cmd_boot.c:40:5: warning: symbol 'do_go' was not declared. Should it be static?
cmd_bootm.c:164:6: warning: symbol '__arch_preboot_os' was not declared. Should it be static?
cmd_bootm.c:477:5: warning: symbol 'do_bootm_subcommand' was not declared. Should it be static?
cmd_bootm.c:1022:1: error: directive in argument list
cmd_bootm.c:1028:1: error: directive in argument list
cmd_bootm.c:1029:1: error: directive in argument list
cmd_bootm.c:1036:1: error: directive in argument list
cmd_bootm.c:1042:1: error: directive in argument list
cmd_bootm.c:1044:1: error: directive in argument list
cmd_bootm.c:1045:1: error: directive in argument list
cmd_bootm.c:1047:1: error: directive in argument list
cmd_bootm.c:1089:5: warning: symbol 'do_iminfo' was not declared. Should it be static?
cmd_bootm.c:1176:5: warning: symbol 'do_imls' was not declared. Should it be static?
cmd_bootm.c:1654:1: error: directive in argument list
cmd_bootm.c:1660:1: error: directive in argument list
cmd_console.c:32:5: warning: symbol 'do_coninfo' was not declared. Should it be s
cmd_date.c:46:5: warning: symbol 'do_date' was not declared. Should it be static?
cmd_echo.c:27:5: warning: symbol 'do_echo' was not declared. Should it be static?
cmd_exit.c:27:5: warning: symbol 'do_exit' was not declared. Should it be static?
cmd_fat.c:97:5: warning: symbol 'do_fat_ls' was not declared. Should it be static?
cmd_fat.c:136:5: warning: symbol 'do_fat_fsinfo' was not declared. Should it be s
cmd_fdt.c:66:5: warning: symbol 'do_fdt' was not declared. Should it be static?
cmd_fdt.c:542:43: warning: incorrect type in assignment (different base types)
cmd_fdt.c:542:43:    expected unsigned int [unsigned] [usertype] <noident>
cmd_fdt.c:542:43:    got restricted __be32 [usertype] <noident>
cmd_fdt.c:679:42: warning: cast to restricted __be32
cmd_fdt.c:820:1: error: directive in argument list
cmd_fdt.c:822:1: error: directive in argument list
cmd_flash.c:292:5: warning: symbol 'do_flinfo' was not declared. Should it be static?
cmd_flash.c:324:5: warning: symbol 'do_flerase' was not declared. Should it be static?
cmd_flash.c:457:5: warning: symbol 'do_protect' was not declared. Should it be st
cmd_help.c:27:5: warning: symbol 'do_help' was not declared. Should it be static?
cmd_i2c.c:136:6: warning: symbol '__def_i2c_init_board' was not declared. Should it be static?
cmd_i2c.c:144:14: warning: symbol '__def_i2c_get_bus_speed' was not declared. Should it be static?
cmd_i2c.c:151:5: warning: symbol '__def_i2c_set_bus_speed' was not declared. Should it be static?
cmd_i2c.c:1322:1: error: directive in argument list
cmd_i2c.c:1324:1: error: directive in argument list
cmd_i2c.c:1326:1: error: directive in argument list
cmd_i2c.c:1328:1: error: directive in argument list
cmd_i2c.c:1337:1: error: directive in argument list
cmd_i2c.c:1339:1: error: directive in argument list
cmd_irq.c:27:5: warning: symbol 'do_interrupts' was not declared. Should it be static?
cmd_itest.c:133:5: warning: symbol 'binary_test' was not declared. Should it be static?
cmd_itest.c:158:5: warning: symbol 'do_itest' was not declared. Should it be stat
cmd_load.c:54:5: warning: symbol 'do_load_serial' was not declared. Should it be static?
cmd_load.c:431:6: warning: symbol 'his_eol' was not declared. Should it be static?
cmd_load.c:432:6: warning: symbol 'his_pad_count' was not declared. Should it be static?
cmd_load.c:433:6: warning: symbol 'his_pad_char' was not declared. Should it be static?
cmd_load.c:434:6: warning: symbol 'his_quote' was not declared. Should it be static?
cmd_load.c:436:5: warning: symbol 'do_load_serial_bin' was not declared. Should it be static?
cmd_load.c:549:6: warning: symbol 'send_pad' was not declared. Should it be static?
cmd_load.c:558:6: warning: symbol 'ktrans' was not declared. Should it be static?
cmd_load.c:568:5: warning: symbol 'chk1' was not declared. Should it be static?
cmd_load.c:578:6: warning: symbol 's1_sendpacket' was not declared. Should it be static?
cmd_load.c:587:6: warning: symbol 'send_ack' was not declared. Should it be static?
cmd_load.c:600:6: warning: symbol 'send_nack' was not declared. Should it be static?
cmd_load.c:614:6: warning: symbol 'os_data_init' was not declared. Should it be static?
cmd_load.c:615:6: warning: symbol 'os_data_char' was not declared. Should it be static?
cmd_load.c:657:6: warning: symbol 'k_data_init' was not declared. Should it be static?
cmd_load.c:663:6: warning: symbol 'k_data_save' was not declared. Should it be static?
cmd_load.c:669:6: warning: symbol 'k_data_restore' was not declared. Should it be static?
cmd_load.c:675:6: warning: symbol 'k_data_char' was not declared. Should it be static?
cmd_load.c:693:6: warning: symbol 'send_parms' was not declared. Should it be static?
cmd_load.c:694:6: warning: symbol 'send_ptr' was not declared. Should it be static?
cmd_load.c:698:6: warning: symbol 'handle_send_packet' was not declared. Should i
cmd_mdio.c:60:5: warning: symbol 'mdio_write_ranges' was not declared. Should it be static?
cmd_mdio.c:82:5: warning: symbol 'mdio_read_ranges' was not declared. Should it be static?
cmd_mdio.c:115:5: warning: symbol 'extract_reg_range' was not declared. Should it be static?
cmd_mdio.c:144:5: warning: symbol 'extract_phy_range' was not declared. Should it
cmd_mem.c:54:5: warning: symbol 'do_mem_md' was not declared. Should it be static?
cmd_mem.c:150:5: warning: symbol 'do_mem_mm' was not declared. Should it be static?
cmd_mem.c:154:5: warning: symbol 'do_mem_nm' was not declared. Should it be static?
cmd_mem.c:159:5: warning: symbol 'do_mem_mw' was not declared. Should it be static?
cmd_mem.c:256:5: warning: symbol 'do_mem_cmp' was not declared. Should it be static?
cmd_mem.c:326:5: warning: symbol 'do_mem_cp' was not declared. Should it be static?
cmd_mem.c:436:5: warning: symbol 'do_mem_base' was not declared. Should it be static?
cmd_mem.c:449:5: warning: symbol 'do_mem_loop' was not declared. Should it be static?
cmd_mem.c:595:5: warning: symbol 'do_mem_mtest' was not declared. Should it be static?
cmd_mem.c:618:26: warning: Using plain integer as NULL pointer
cmd_mem.c:1057:5: warning: symbol 'do_mem_crc' was not declared. Should it be static?
cmd_misc.c:30:5: warning: symbol 'do_sleep' was not declared. Should it be static
cmd_mmc.c:118:5: warning: symbol 'do_mmcinfo' was not declared. Should it be static?
cmd_mmc.c:272:32: warning: Using plain integer as NULL pointer
cmd_mmc.c:150:5: warning: symbol 'do_mmcops' was not declared. Should it be stati
cmd_mp.c:27:1: warning: symbol 'cpu_cmd' was not declared. Should it be static?
cmd_mp.c:85:1: error: directive in argument list
cmd_mp.c:88:1: error: directive in argument list
cmd_mtdparts.c:150:18: warning: symbol 'mtdids' was not declared. Should it be static?
cmd_mtdparts.c:153:18: warning: symbol 'devices' was not declared. Should it be static?
cmd_mtdparts.c:713:5: warning: symbol 'mtd_device_validate' was not declared. Should it be static?
cmd_mtdparts.c:1887:5: warning: symbol 'do_chpart' was not declared. Should it be static?
cmd_mtdparts.c:1925:5: warning: symbol 'do_mtdparts' was not declared. Should it be static?
cmd_mtdparts.c:2060:1: error: directive in argument list
cmd_mtdparts.c:2063:1: error: directive in argument list
cmd_mtdparts.c:2066:1: error: directive in argument list
cmd_mtdparts.c:2071:1: error: directive in argument list
cmd_mtdparts.c:2073:1: error: directive in argument list
cmd_nand.c:377:18: error: bad constant expression
cmd_nand.c:431:5: warning: symbol 'do_nand' was not declared. Should it be static?
cmd_nand.c:796:1: error: directive in argument list
cmd_nand.c:801:1: error: directive in argument list
cmd_nand.c:802:1: error: directive in argument list
cmd_nand.c:806:1: error: directive in argument list
cmd_nand.c:819:1: error: directive in argument list
cmd_nand.c:824:1: error: directive in argument list
cmd_nand.c:825:1: error: directive in argument list
cmd_nand.c:831:1: error: directive in argument list
cmd_nand.c:918:5: warning: symbol 'do_nandboot' was not declared. Should it be static?
cmd_net.c:33:5: warning: symbol 'do_bootp' was not declared. Should it be static?
cmd_net.c:107:5: warning: symbol 'do_dhcp' was not declared. Should it be static?
cmd_net.c:120:5: warning: symbol 'do_nfs' was not declared. Should it be static?
cmd_nvedit.c:138:5: warning: symbol 'do_env_print' was not declared. Should it be static?
cmd_nvedit.c:323:5: warning: symbol '_do_env_set' was not declared. Should it be static?
cmd_nvedit.c:435:5: warning: symbol 'do_env_set' was not declared. Should it be static?
cmd_nvedit.c:514:5: warning: symbol 'do_env_edit' was not declared. Should it be static?
cmd_nvedit.c:620:5: warning: symbol 'do_env_save' was not declared. Should it be static?
cmd_nvedit.c:1016:1: error: directive in argument list
cmd_nvedit.c:1018:1: error: directive in argument list
cmd_nvedit.c:1021:1: error: directive in argument list
cmd_nvedit.c:1023:1: error: directive in argument list
cmd_nvedit.c:1024:1: error: directive in argument list
cmd_nvedit.c:1026:1: error: directive in argument list
cmd_nvedit.c:1027:1: error: directive in argument list
cmd_nvedit.c:1029:1: error: directive in argument list
cmd_nvedit.c:1030:1: error: directive in argument list
cmd_nvedit.c:1032:1: error: directive in argument list
cmd_nvedit.c:1034:1: error: directive in argument list
cmd_nvedit.c:1036:1: error: directive in argument list
cmd_nvedit.c:1037:1: error: directive in argument list
cmd_nvedit.c:1039:1: error: directive in argument list
cmd_pci.c:38:17: warning: symbol 'ShortPCIListing' was not declared. Should it be static?
cmd_pci.c:38:22: warning: 'ShortPCIListing' defined but not used [-Wunused-variable]
cmd_pci.c:411:5: warning: symbol 'do_pci' was not declared. Should it be static?
cmd_pci.c:494:1: error: directive in argument list
cmd_pci.c:497:1: error: directive in argument list
cmd_reginfo.c:40:5: warning: symbol 'do_reginfo' was not declared. Should it be static?
cmd_sata.c:31:5: warning: symbol 'sata_curr_device' was not declared. Should it be static?
 note -> ata_piix.c doesn't seem to use 'sata_curr_device'; deleted.
cmd_sata.c:32:18: warning: symbol 'sata_dev_desc' was not declared. Should it be static?
cmd_sata.c:70:5: warning: symbol 'do_sata' was not declared. Should it be static?
cmd_setexpr.c:53:5: warning: symbol 'do_setexpr' was not declared. Should it be static?
cmd_source.c:186:1: error: directive in argument list
cmd_source.c:190:1: error: directive in argument list
cmd_test.c:27:5: warning: symbol 'do_test' was not declared. Should it be static?
cmd_test.c:153:5: warning: symbol 'do_false' was not declared. Should it be static?
cmd_test.c:164:5: warning: symbol 'do_true' was not declared. Should it be static
cmd_usb.c:43:6: warning: symbol 'usb_get_class_desc' was not declared. Should it be static?
cmd_usb.c:69:6: warning: symbol 'usb_display_class_sub' was not declared. Should it be static?
cmd_usb.c:151:6: warning: symbol 'usb_display_string' was not declared. Should it be static?
cmd_usb.c:161:6: warning: symbol 'usb_display_desc' was not declared. Should it be static?
cmd_usb.c:195:6: warning: symbol 'usb_display_conf_desc' was not declared. Should it be static?
cmd_usb.c:210:6: warning: symbol 'usb_display_if_desc' was not declared. Should it be static?
cmd_usb.c:227:6: warning: symbol 'usb_display_ep_desc' was not declared. Should it be static?
cmd_usb.c:252:6: warning: symbol 'usb_display_config' was not declared. Should it be static?
cmd_usb.c:283:6: warning: symbol 'usb_show_tree_graph' was not declared. Should it be static?
cmd_usb.c:343:6: warning: symbol 'usb_show_tree' was not declared. Should it be static?
cmd_usb.c:356:5: warning: symbol 'do_usbboot' was not declared. Should it be static?
cmd_usb.c:366:5: warning: symbol 'do_usb' was not declared. Should it be static?
cmd_version.c:31:5: warning: symbol 'do_version' was not declared. Should it be s
cmd_ximg.c:46:1: warning: symbol 'do_imgextract' was not declared. Should it be static?
cmd_ximg.c:272:1: error: directive in argument list
cmd_ximg.c:276:1: error: directive in argument list

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
11 years agoinclude/image.h: sparse fixes
Kim Phillips [Mon, 29 Oct 2012 13:34:30 +0000 (13:34 +0000)]
include/image.h: sparse fixes

include/image.h:378:1: warning: cast to restricted __be32
include/image.h:381:1: warning: cast to restricted __be32
include/image.h:382:1: warning: cast to restricted __be32
include/image.h:383:1: warning: cast to restricted __be32

fix by annotating image header integers big endian.

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
11 years agoarch/powerpc/lib/board.c, *traps.c: sparse fixes
Kim Phillips [Mon, 29 Oct 2012 13:34:29 +0000 (13:34 +0000)]
arch/powerpc/lib/board.c, *traps.c: sparse fixes

traps.c:*:1: warning: symbol 'print_backtrace' was not declared. Should it be static?
traps.c:93:1: warning: symbol '_exception' was not declared. Should it be static?
board.c:166:6: warning: symbol '__board_add_ram_info' was not declared. Should it be static?
board.c:174:5: warning: symbol '__board_flash_wp_on' was not declared. Should it be static?
board.c:187:6: warning: symbol '__cpu_secondary_init_r' was not declared. Should it be static?
board.c:265:12: warning: symbol 'init_sequence' was not declared. Should it be static?
board.c:348:5: warning: symbol '__fixup_cpu' was not declared. Should it be static?
board.c:405:53: warning: Using plain integer as NULL pointer

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
11 years agoarch/powerpc/lib/extable.c: sparse fix
Kim Phillips [Mon, 29 Oct 2012 13:34:28 +0000 (13:34 +0000)]
arch/powerpc/lib/extable.c: sparse fix

extable.c:66:9: warning: symbol 'ex_tab_message' was not declared. Should it be static?

making it static can produce a new build warning on some boards:

extable.c:66:12: warning: 'ex_tab_message' defined but not used [-Wunused-variable]

but ex_tab_message doesn't do much even when used, so just remove it.

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
11 years agoarch/powerpc/include/asm/io.h: fix warning: preprocessor token __iomem redefined
Kim Phillips [Mon, 29 Oct 2012 13:34:27 +0000 (13:34 +0000)]
arch/powerpc/include/asm/io.h: fix warning: preprocessor token __iomem redefined

a fixup __iomem definition in arch code appears to be placed there as a cover
up from a code import from linux when u-boot didn't yet have a compiler.h,
introduced by commit 812711ce6b3a386125dcf0d6a59588e461abbb87 "Implement
__raw_{read,write}[bwl] on all architectures".

git show 812711ce6b3a386125dcf0d6a59588e461abbb87:include/linux/compiler.h
fatal: Path 'include/linux/compiler.h' exists on disk, but not in '812711ce6b3a386125dcf0d6a59588e461abbb87'.

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
11 years agoinclude/linux/stddef.h: avoid 'warning: preprocessor token offsetof redefined'
Kim Phillips [Mon, 29 Oct 2012 13:34:26 +0000 (13:34 +0000)]
include/linux/stddef.h: avoid 'warning: preprocessor token offsetof redefined'

hack to avoid:

/opt/gcc-4.6.3-nolibc/powerpc-linux/bin/../lib/gcc/powerpc-linux/4.6.3/include/stddef.h:413:9: warning: preprocessor token offsetof redefined
u-boot/include/linux/stddef.h:20:9: this was the original definition

tried protecting with __KERNEL__, and #including compiler.h first.

Even tried include dir reordering to no avail:

 +++ b/config.mk
 @@ -194,7 +194,11 @@ OBJCFLAGS += --gap-fill=0xff
 gccincdir := $(shell $(CC) -print-file-name=include)

 CPPFLAGS := $(DBGFLAGS) $(OPTFLAGS) $(RELFLAGS)                \
 -       -D__KERNEL__
 +       -D__KERNEL__  \
 +       -I $(gccincdir) \
 +       -nostdinc
 +
 +#      -isystem $(gccincdir) \

 # Enable garbage collection of un-used sections for SPL
 ifeq ($(CONFIG_SPL_BUILD),y)
 @@ -227,8 +231,7 @@ CPPFLAGS += -I$(OBJTREE)/include2 -I$(OBJTREE)/include
 endif

 CPPFLAGS += -I$(TOPDIR)/include
 -CPPFLAGS += -fno-builtin -ffreestanding -nostdinc      \
 -       -isystem $(gccincdir) -pipe $(PLATFORM_CPPFLAGS)
 +CPPFLAGS += -fno-builtin -ffreestanding -pipe $(PLATFORM_CPPFLAGS)

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
11 years agoinclude/linux/unaligned/generic.h: fix warning: preprocessor token __force redefined
Kim Phillips [Mon, 29 Oct 2012 13:34:25 +0000 (13:34 +0000)]
include/linux/unaligned/generic.h: fix warning: preprocessor token __force redefined

include/linux/unaligned/generic.h:5:9: warning: preprocessor token __force redefined
include/linux/compiler.h:10:10: this was the original definition

fixup __force definitions in compat.h code appears to be placed
there as a cover up from a code import from linux when u-boot didn't yet
have a compiler.h, introduced by commit
b1b4e89a0f3b75854c39a62cae41bad56d210adf "Add LZO decompressor support".

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
11 years agoinclude/linux/compat.h: fix warning: preprocessor token {__iomem, __user} redefined
Kim Phillips [Mon, 29 Oct 2012 13:34:24 +0000 (13:34 +0000)]
include/linux/compat.h: fix warning: preprocessor token {__iomem, __user} redefined

include/linux/compat.h:4:9: warning: preprocessor token __user redefined
include/linux/compiler.h:7:10: this was the original definition
include/linux/compat.h:5:9: warning: preprocessor token __iomem redefined
include/linux/compiler.h:12:10: this was the original definition

fixup __iomem, __user definitions in compat.h code appears to be placed
there as a cover up from a code import from linux when u-boot didn't yet
have a compiler.h, introduced by commit
932394ac43e2e778e664eeb6e456fecd0fae6e59 "Rewrite of NAND code based on
what is in 2.6.12 Linux kernel".

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
11 years agoinclude/linux/byteorder: import latest endian definitions from linux
Kim Phillips [Mon, 29 Oct 2012 13:34:23 +0000 (13:34 +0000)]
include/linux/byteorder: import latest endian definitions from linux

u-boot's byteorder headers did not contain endianness attributions
for use with sparse, causing a lot of false positives.  Import the
kernel's latest definitions, and enable them by including compiler.h
and types.h.  They come with 'const' added for some swab functions, so
fix those up, too:

include/linux/byteorder/big_endian.h:46:2: warning: passing argument 1 of '__swab64p' discards 'const' qualifier from pointer target type [enabled by default]

Also, note: u-boot's historic __BYTE_ORDER definition has been
preserved (for the time being at least).

We also remove ad-hoc barrier() definitions, since we're including
compiler.h in files that hadn't in the past:

macb.c:54:0: warning: "barrier" redefined [enabled by default]

In addition, including compiler.h in byteorder changes the 'noinline'
definition to expand to __attribute__((noinline)).  This fixes
arch/powerpc/lib/bootm.c:

bootm.c:329:16: error: attribute '__attribute__': unknown attribute
bootm.c:329:16: error: expected ')' before '__attribute__'
bootm.c:329:25: error: expected identifier or '(' before ')' token

powerpc sparse builds yield:

include/common.h:356:22: error: marked inline, but without a definition

the unknown-reason inlining without a definition is considered obsolete
given it was part of the 2002 initial commit, and no arm version was
'fixed.'

also fixed:
ydirectenv.h:60:0: warning: "inline" redefined [enabled by default]

and:

Configuring for devconcenter - Board: intip, Options: DEVCONCENTER
make[1]: *** [4xx_ibm_ddr2_autocalib.o] Error 1
make: *** [arch/powerpc/cpu/ppc4xx/libppc4xx.o] Error 2
powerpc-fsl-linux-size: './u-boot': No such file
4xx_ibm_ddr2_autocalib.c: In function 'DQS_autocalibration':
include/asm/ppc4xx-sdram.h:1407:13: sorry, unimplemented: inlining failed in call to 'ppc4xx_ibm_ddr2_register_dump': function body not available
4xx_ibm_ddr2_autocalib.c:1243:32: sorry, unimplemented: called from here

and:

In file included from crc32.c:50:0:
crc32table.h:4:1: warning: implicit declaration of function '___constant_swab32' [-Wimplicit-function-declaration]
crc32table.h:4:1: error: initializer element is not constant
crc32table.h:4:1: error: (near initialization for 'crc32table_le[0]')

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
[trini: Remove '#endif' in include/common.h around setenv portion]
Signed-off-by: Tom Rini <trini@ti.com>
11 years agofs: rename fsload command to load
Stephen Warren [Wed, 31 Oct 2012 11:05:07 +0000 (11:05 +0000)]
fs: rename fsload command to load

When the generic filesystem load command "fsload" was written, I felt
that "load" was too generic of a name for it, since many other similar
commands already existed. However, it turns out that there is already
an "fsload" command, so that name cannot be used. Rename the new
"fsload" to plain "load" to avoid the conflict. At least anyone who's
used a Basic interpreter should feel familiar with the name!

Signed-off-by: Stephen Warren <swarren@nvidia.com>
11 years agofs: fix number base behaviour change in fatload/ext*load
Stephen Warren [Tue, 30 Oct 2012 12:04:19 +0000 (12:04 +0000)]
fs: fix number base behaviour change in fatload/ext*load

Commit 045fa1e "fs: add filesystem switch libary, implement ls and
fsload commands" unified the implementation of fatload and ext*load
with the new command fsload. However, this altered the interpretation
of command-line numbers from always being base-16, to requiring a "0x"
prefix for base-16 numbers. Enhance do_fsload() to allow commands to
specify which base to use.

Use base 0, thus requiring a "0x" prefix for the new fsload command.
This feels much cleaner than assuming base 16.

Use base 16 for the pre-existing fatload and ext*load to prevent a
change in behaviour.

Use base 16 exclusively for the loadaddr environment variable, since
that variable is interpreted in multiple places, so we don't want the
behaviour to change.

Update command help text to make it clear where numbers are assumed to
be hex, and where an explicit "0x" prefix is required.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
11 years agocmd_ext4: remove TABs from command help text
Stephen Warren [Tue, 30 Oct 2012 12:04:18 +0000 (12:04 +0000)]
cmd_ext4: remove TABs from command help text

TABs in the help text won't line up in the same place on the console as
in a source editor. Replace them with spaces to make ensuring correct
alignment easier.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
11 years agofs: fix do_fsload() handling of optional arguments
Stephen Warren [Tue, 30 Oct 2012 12:04:17 +0000 (12:04 +0000)]
fs: fix do_fsload() handling of optional arguments

Most arguments to the shell command do_fsload() implements are optional.
Fix the minimum argc check to respect that. Cater for the situation
where argv[2] is not provided.

Enhance both do_fsload() and do_ls() to check the maximum number of
arguments too. While this check would typically be implemented via
U_BOOT_CMD()'s max_args parameter, if these functions are called
directly, then that check won't exist.

Finally, alter do_ls() to check (argc >= 4) rather than (argc == 4) so
that if the function is enhanced to allow extra arguments in the future,
this test won't need to be changed at that time.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
11 years agosocfpga/spl: Remove malloc.h
Vikram Narayanan [Tue, 23 Oct 2012 00:22:53 +0000 (00:22 +0000)]
socfpga/spl: Remove malloc.h

Remove unused header

Signed-off-by: Vikram Narayanan <vikram186@gmail.com>
11 years agosocfpga/spl: Remove timer_init from spl_board_init
Vikram Narayanan [Tue, 23 Oct 2012 00:21:16 +0000 (00:21 +0000)]
socfpga/spl: Remove timer_init from spl_board_init

Timer is initialized already in board_init_r function in
(common/spl/spl.c) No need to initialize it again

Signed-off-by: Vikram Narayanan <vikram186@gmail.com>
Cc: Dinh Nguyen <dinguyen@altera.com>
11 years agoarm: atmel: cpux9k2: add missing cache configs
Jens Scharsig (BuS Elektronik) [Thu, 18 Oct 2012 21:41:10 +0000 (21:41 +0000)]
arm: atmel: cpux9k2: add missing cache configs

* add CONFIG_SYS_CACHELINE_SIZE to eb_cpux9k2 board config header
* dissable dcache (CONFIG_SYS_DCACHE_OFF) for eb_cpux9k2

Signed-off-by: Jens Scharsig (BuS Elektronik) <esw@bus-elektronik.de>
11 years agoMerge remote-tracking branch 'u-boot-ti/master'
Albert ARIBAUD [Sat, 3 Nov 2012 09:05:22 +0000 (10:05 +0100)]
Merge remote-tracking branch 'u-boot-ti/master'

11 years agox86: config: Enable AHCI support for coreboot
Simon Glass [Mon, 29 Oct 2012 05:24:05 +0000 (05:24 +0000)]
x86: config: Enable AHCI support for coreboot

Enable AHCI driver for Intel SATA devices.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoide: Correct function signatures for ide_read/write()
Simon Glass [Mon, 29 Oct 2012 05:24:04 +0000 (05:24 +0000)]
ide: Correct function signatures for ide_read/write()

The prototypes in the header were changed by commit 4ac8f8e0 but the
functions no longer match. Correct this.

It seems odd that block devices take an lbaint_t for the block count, but
an unsigned long for the blknr. Surely we should promote blknr to lbaint_t
also?

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@ti.com>
11 years agoahci: Expand HDD Logical Block addressability up to 32 bits
Walter Murphy [Mon, 29 Oct 2012 05:24:03 +0000 (05:24 +0000)]
ahci: Expand HDD Logical Block addressability up to 32 bits

Currently, this driver uses a 28bit interface to AHCI, this
limits the number of blocks addressable to 2^28, or the max
disk size to 512(2^28) or about 137GB. This change allows
supporting drives up to about 2TB.

Testing this is a bit difficult. There is test code that
can be inserted into U-Boot that will write test patterns
into certain unused blocks. These patterns can be manually
checked using 'dd' after boot. Another way is to confirm the
original error that exposed this bug is fixed. IOW: see if
AU (Auto Update) will now work on the drive. Also, check
that there are no warning messages from the 'cgpt' utility.

Signed-off-by: Walter Murphy <wmurphy@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoahci: Perform SATA flush after disk write.
Marc Jones [Mon, 29 Oct 2012 05:24:02 +0000 (05:24 +0000)]
ahci: Perform SATA flush after disk write.

Writes in u-boot are so rare, and the logic to know when is
the last write and do a flush only there is sufficiently
difficult. Just do a flush after every write. This incurs,
usually, one extra flush when the rare writes do happen.

Signed-off-by: Marc Jones <marc.jones@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoahci: Support spin-up and link-up separately
Marc Jones [Mon, 29 Oct 2012 05:24:01 +0000 (05:24 +0000)]
ahci: Support spin-up and link-up separately

Add HDD handling to the SSD-only AHCI driver, by separately dealing with
spin-up and link-up.

Signed-off-by: Marc Jones <marc.jones@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoahci: Adjust SATA timeouts for hard disk (spinup delay & command timeout)
Walter Murphy [Mon, 29 Oct 2012 05:24:00 +0000 (05:24 +0000)]
ahci: Adjust SATA timeouts for hard disk (spinup delay & command timeout)

Note: These are timeout values and not delay values, so the event being
timed out will complete whenever it is actually ready, with a
measurement granularity of 1 millisecond, up till the timeout value.
Therefore, there is no effect on SSD booting.

The values were determined by instrumenting the code and measuring the
actual time taken by several different models of HDD for each of the
parameters and then adding 50% more for the spinup value and just
doubling the command timeout value.

Signed-off-by: Walter Murphy <wmurphy@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoahci: flush / invalidate dcache around SATA commands
Taylor Hutt [Mon, 29 Oct 2012 05:23:59 +0000 (05:23 +0000)]
ahci: flush / invalidate dcache around SATA commands

Exynos5 automatically performs DMA when the SATA controller executes
commands.  This adds the necessary dcache-to-memory flush &
invalidation calls to allow the DMA to properly function.

Signed-off-by: Taylor Hutt <thutt@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoahci: Use virt_to_phys() to denote physical addresses for DMA
Taylor Hutt [Mon, 29 Oct 2012 05:23:58 +0000 (05:23 +0000)]
ahci: Use virt_to_phys() to denote physical addresses for DMA

Update the assignment of various physical memory buffers used by the
SATA controller to explicitly be denoted as physical addresses.

The memory is identity-mapped, so these function calls are a nop, but
they provide good semantic documentation for any maintainers.

The return value of virt_to_phys() is 'unsigned long'.  On machines
where sizeof(unsigned long) != sizeof(pointer), a cast through
(uintptr_t) is needed to appease the compiler due to the potential of
losing the upper 32 bits of the address.

In compilation this scenario, a physical address could be 64-bits, yet
the C pointer environment only allows 32-bit addresses; the constraint
is that pointers cannot address more than 4Gb of memory and if
virt_to_phys() ever returns an out-of-range value for the physical
address, there are issues with emmory mapping which must be solved.
However, since the memory is identify mappeed, there is no problem
introducing the cast: the original pointer will reside in 32-bits, so
the physical address will also be within in 32-bits.

Signed-off-by: Taylor Hutt <thutt@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoahci: Support 64-bit LBA option when reading capacity
Gabe Black [Mon, 29 Oct 2012 05:23:57 +0000 (05:23 +0000)]
ahci: Support 64-bit LBA option when reading capacity

Capacity needs to allow for a 64-bit value.

Signed-off-by: Gabe Black <gabeblack@google.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoahci: Fix 'Invaild' typo
Taylor Hutt [Mon, 29 Oct 2012 05:23:56 +0000 (05:23 +0000)]
ahci: Fix 'Invaild' typo

This fixes a spelling error in a message which can be output to the
console.

Signed-off-by: Taylor Hutt <thutt@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoahci: Use sizeof(fis) instead of hardcoding '20'
Taylor Hutt [Mon, 29 Oct 2012 05:23:55 +0000 (05:23 +0000)]
ahci: Use sizeof(fis) instead of hardcoding '20'

This cleanup replaces the hardcoded use of '20', which represents the
number of bytes in the FIS, with sizeof(fis).

Signed-off-by: Taylor Hutt <thutt@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoahci: Make the AHCI code find the capacity of disks > 128 GB properly
Gabe Black [Mon, 29 Oct 2012 05:23:54 +0000 (05:23 +0000)]
ahci: Make the AHCI code find the capacity of disks > 128 GB properly

In the structure returned by the ATA identify device command, there are two
fields which describe the device capacity. One is a 32 bit data type which
reports the number of sectors as a 28 bit LBA, and the other is a 64 bit data
type which is for a 48 bit LBA. If the device doesn't support 48 bit LBAs,
the small value is the only value with the correct size. If it supports more,
if the number of sectors is small enough to fit into 28 bits, both fields
reflect the correct value. If it's too large, the smaller field has 28 bits of
1s, 0xfffffff, and the other field has the correct value.

The AHCI driver is implemented by attaching to the generic SCSI code and
translating on the fly between SCSI binary data structures and AHCI data
structures. It responds to requests to execute specific SCSI commands by
executing the equivalent AHCI commands and then crafting a response which
matches what a SCSI disk would send.

The AHCI driver now considers both fields and chooses the correct one when
implementing both the SCSI READ CAPACITY (10) and READ CAPACITY (16) commands.

Signed-off-by: Gabe Black <gabeblack@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoahci: support scsi writing in AHCI driver
Hung-Te Lin [Mon, 29 Oct 2012 05:23:53 +0000 (05:23 +0000)]
ahci: support scsi writing in AHCI driver

The "scsi write" command requires support from underlying driver.
This CL enables SCSI_WRITE10 in AHCI driver.

Tested in U-Boot console, try to i/o with sector #64:
scsi read 1000 40 1
md.b 1000 200 # check if things are not 0xcc
mw.b 1000 cc 200 # try to fill with 0xcc
scsi write 1000 40 1
mw.b 1000 0 200 # fill with zero
md.b 1000 200 # should be all 0
scsi read 1000 40 1
md.b 1000 200 # should be all 0xcc

Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoahci: Make sending the SETFEATURES_XFER command optional
Gabe Black [Mon, 29 Oct 2012 05:23:52 +0000 (05:23 +0000)]
ahci: Make sending the SETFEATURES_XFER command optional

This command doesn't really do anything when talking to a SATA device, and
sending it confuses some of them. This change makes sending the command
optional, and defaults to not. The situations where it should be sent are not
the common case.

With the standard SSD in the machine, here are some times with the option
turned off:
1. 8277
2. 8273
3. 8050

And turned on:
1. 8303
2. 8155
3. 8276

Sending that command seems to have no meaningful effect on performance.

This fixes problems with an SSD marked Toshiba NV6424, Taiwan 11159AE P
and TC58NVG5D2FTA10.

Signed-off-by: Gabe Black <gabeblack@chromium.org>
Signed-off-by: Taylor Hutt <thutt@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoahci: cosmetics and cleanup
Stefan Reinauer [Mon, 29 Oct 2012 05:23:51 +0000 (05:23 +0000)]
ahci: cosmetics and cleanup

- print the correct speed
- print all the AHCI capability flags
(information taken from Linux kernel driver)
- clean up some comments

For example, this might show the following string:
AHCI 0001.0300 32 slots 6 ports 6 Gbps 0x3 impl SATA mode

Signed-off-by: Stefan Reinauer <reinauer@chromium.org>
Commit-Ready: Stefan Reinauer <reinauer@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Stefan Reinauer <reinauer@chromium.org>
11 years agoahci: Improve AHCI debugging
Stefan Reinauer [Mon, 29 Oct 2012 05:23:50 +0000 (05:23 +0000)]
ahci: Improve AHCI debugging

- remove unused ssleep macro
- add some useful debugging information

Signed-off-by: Stefan Reinauer <reinauer@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>