]> git.kernelconcepts.de Git - karo-tx-uboot.git/log
karo-tx-uboot.git
10 years agogpio: mxc: parenthesize macro argument
Lothar Waßmann [Thu, 22 Aug 2013 14:17:43 +0000 (16:17 +0200)]
gpio: mxc: parenthesize macro argument

10 years agomtdparts: fix incorrectly split error message
Lothar Waßmann [Thu, 22 Aug 2013 14:14:01 +0000 (16:14 +0200)]
mtdparts: fix incorrectly split error message

10 years agonet: fec: fix bogus packet address being written to DMA descriptor
Lothar Waßmann [Thu, 22 Aug 2013 14:13:21 +0000 (16:13 +0200)]
net: fec: fix bogus packet address being written to DMA descriptor

10 years agomxs: set vector base address to RAM to be able to use the memabort_handler
Lothar Waßmann [Thu, 22 Aug 2013 14:12:40 +0000 (16:12 +0200)]
mxs: set vector base address to RAM to be able to use the memabort_handler

10 years agoarm: use _start instead of __image_copy_start
Lothar Waßmann [Thu, 22 Aug 2013 14:08:10 +0000 (16:08 +0200)]
arm: use _start instead of __image_copy_start

TX53 creates an FCB at the start of the ELF image. This offsets _start
from __image_copy_start leading to relocation errors.

Temporary fix this by using _start instead of __image_copy_start.
A better fix would be to implement a 'romupdate' command, that takes
care of creating the FCB at runtime.

10 years agoTimer: omap-common: support 64bit timer value in get_ticks()
Lothar Waßmann [Thu, 22 Aug 2013 13:56:40 +0000 (15:56 +0200)]
Timer: omap-common: support 64bit timer value in get_ticks()

10 years agoARM: mx5: customize PLL setup for TX53
Lothar Waßmann [Thu, 22 Aug 2013 13:54:37 +0000 (15:54 +0200)]
ARM: mx5: customize PLL setup for TX53

10 years agoARM: mx5: use 'bic' instead of 'and' and mask with shift
Lothar Waßmann [Thu, 22 Aug 2013 13:54:04 +0000 (15:54 +0200)]
ARM: mx5: use 'bic' instead of 'and' and mask with shift

10 years agoARM: mx5: cleanup comments
Lothar Waßmann [Thu, 22 Aug 2013 13:53:10 +0000 (15:53 +0200)]
ARM: mx5: cleanup comments

10 years agoARM: mx5: don't clobber r0 in setup_pll
Lothar Waßmann [Thu, 22 Aug 2013 13:48:13 +0000 (15:48 +0200)]
ARM: mx5: don't clobber r0 in setup_pll

10 years agokaro: u-boot.lds: whitespace cleanup
Lothar Waßmann [Thu, 22 Aug 2013 13:45:01 +0000 (15:45 +0200)]
karo: u-boot.lds: whitespace cleanup

10 years agomerged tx6dl-devel into denx master branch
Lothar Waßmann [Wed, 21 Aug 2013 14:14:19 +0000 (16:14 +0200)]
merged tx6dl-devel into denx master branch

10 years agotx53: lowlevel_init: update memory initialization to fit NT5CB128M16 'F' revision KARO-TX53-2013-08-19
Lothar Waßmann [Mon, 19 Aug 2013 15:20:30 +0000 (17:20 +0200)]
tx53: lowlevel_init: update memory initialization to fit NT5CB128M16 'F' revision

10 years agotx53: lowlevel_init: remove bogus register defines
Lothar Waßmann [Mon, 19 Aug 2013 15:19:24 +0000 (17:19 +0200)]
tx53: lowlevel_init: remove bogus register defines

10 years agotx53: lowlevel_init: use .error pseudo op where appropriate
Lothar Waßmann [Mon, 19 Aug 2013 15:19:03 +0000 (17:19 +0200)]
tx53: lowlevel_init: use .error pseudo op where appropriate

10 years agoi.MX video: use already defined CONFIG_IPUV3_CLK instead of CONFIG_IPU_CLKRATE
Lothar Waßmann [Fri, 9 Aug 2013 09:20:17 +0000 (11:20 +0200)]
i.MX video: use already defined CONFIG_IPUV3_CLK instead of CONFIG_IPU_CLKRATE

10 years agoi.MX video: remove dead code
Lothar Waßmann [Fri, 9 Aug 2013 09:18:46 +0000 (11:18 +0200)]
i.MX video: remove dead code

10 years agonds32: fix the missing COBJS-y change
ken kuo [Mon, 5 Aug 2013 17:00:54 +0000 (01:00 +0800)]
nds32: fix the missing COBJS-y change

There is a missing in previous
commit 951344b778d6ac67b94011d942a5a55da7202027
(nds32: Convert Makefiles to use COBJS-y style)
will cause compile error.

Signed-off-by: Kuan-Yu Kuo <ken.kuoky@gmail.com>
Cc: Macpaul Lin <macpaul@gmail.com>
Cc: Andes <uboot@andestech.com>
Signed-off-by: Andes <uboot@andestech.com>
10 years agonds32: introduce DMA allocation API
ken kuo [Mon, 5 Aug 2013 17:00:53 +0000 (01:00 +0800)]
nds32: introduce DMA allocation API

U-Boot does not compile for the adp-ag101 boards since
commit a8f9cd1893bef05b92f63242228607b45821c4a7
(net: update FTGMAC100 for MMU/D-cache support)

The driver assumes that the DMA allocation API are provided by all
architectures. This is not the case for nds32 and it causes a
build error. This patch adds DMA allocation API to avoid the errors.

Signed-off-by: Kuan-Yu Kuo <ken.kuoky@gmail.com>
Cc: Macpaul Lin <macpaul@gmail.com>
Cc: Andes <uboot@andestech.com>
Signed-off-by: Andes <uboot@andestech.com>
10 years agonds32: Change of NDS32 Custodian
Andes [Sat, 3 Aug 2013 13:59:22 +0000 (21:59 +0800)]
nds32: Change of NDS32 Custodian

Signed-off-by: Andes <uboot@andestech.com>
Cc: Macpaul Lin <macpaul@gmail.com>
Cc: Kuan-Yu Kuo <ken.kuoky@gmail.com>
10 years agoMerge branch 'master' of git://git.denx.de/u-boot-i2c
Tom Rini [Tue, 6 Aug 2013 13:49:06 +0000 (09:49 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-i2c

10 years agoMerge remote branch 'remotes/kc/karo-tx28' into tx6q-rel
Lothar Waßmann [Mon, 5 Aug 2013 11:56:14 +0000 (13:56 +0200)]
Merge remote branch 'remotes/kc/karo-tx28' into tx6q-rel

10 years agoi2c: soft: Fix typo in CONFIG_SYS_I2C_SOFT_SPEED
Marek Vasut [Thu, 1 Aug 2013 10:32:20 +0000 (12:32 +0200)]
i2c: soft: Fix typo in CONFIG_SYS_I2C_SOFT_SPEED

In case only the CONFIG_SYS_I2C_SPEED is set in configuration file,
the CONFIG_SYS_I2C_SOFT_SPEED is defined as CONFIG_SYS_I2C_SPEED.
The CONFIG_SYS_I2C_SOFT_SPEED is then used throughout the driver.

Unfortunatelly, due to a typo in the driver, instead of defining
CONFIG_SYS_I2C_SOFT_SPEED, an CONFIG_SYS_SOFT_I2C_SPEED was defined
and therefore the driver failed to compile. The same applies for
CONFIG_SYS_I2C_SOFT_SLAVE , where the swap happens as well.

This patch fixes the issue.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Heiko Schocher <hs@denx.de>
10 years agodts/Makefile: pass -undef -D__DTS__ to cpp
Stephen Warren [Wed, 24 Jul 2013 17:09:24 +0000 (10:09 -0700)]
dts/Makefile: pass -undef -D__DTS__ to cpp

This brings U-Boot's cpp invocation into line with the way the Linux
kernel invokes cpp on device trees. Consistency will be useful to ensure
*.dts is portable between the two.

-undef also has the added advantage of not defining "linux", so DT
property names such as "linux,keymap" don't get mangled.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
10 years agodts/Makefile: don't use cpp -P
Stephen Warren [Wed, 24 Jul 2013 17:09:23 +0000 (10:09 -0700)]
dts/Makefile: don't use cpp -P

Recent dtc supports #line directives in the input source code, and even
uses them to generate useful line numbers in any messages it emits. Stop
passing -P to cpp, since there's no need any more.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
10 years agoconfig: don't define CONFIG_ARCH_DEVICE_TREE
Stephen Warren [Wed, 24 Jul 2013 17:09:22 +0000 (10:09 -0700)]
config: don't define CONFIG_ARCH_DEVICE_TREE

Now that nothing uses CONFIG_ARCH_DEVICE_TREE, stop defining it.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
10 years agodts/Makefile: don't define ARCH_CPU_DTS, BOARD_DTS
Stephen Warren [Wed, 24 Jul 2013 17:09:21 +0000 (10:09 -0700)]
dts/Makefile: don't define ARCH_CPU_DTS, BOARD_DTS

Now that nothing uses the defines ARCH_CPU_DTS, BOARD_DTS, stop defining
them.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
10 years agodt: don't use ARCH_CPU_DTS
Stephen Warren [Wed, 24 Jul 2013 17:09:20 +0000 (10:09 -0700)]
dt: don't use ARCH_CPU_DTS

Now that we assume dtc supports the -i option, we don't need to use
ARCH_CPU_DTS in *.dts{,i}; we simply specify the include filename
directly, and dtc will find it.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
10 years agodts/Makefile: unify cpp/dtc include paths
Stephen Warren [Wed, 24 Jul 2013 17:09:19 +0000 (10:09 -0700)]
dts/Makefile: unify cpp/dtc include paths

*.dts may use #include (via cpp) or /include/ (via dtc; assuming a newer
dtc). The choice is up to the creator of the DT. Create a common variable
DTC_INCDIRS that lists the paths searched by include statements, and
update cpp and dtc invocation to use them.

For cpp, also specify -nostdinc to ensure the same set of paths is
available to both type of include statement.

For dtc, create a new DTC_FLAGS variable to hold all the flags passed to
dtc.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
10 years agodts/Makefile: simplify dtc invocation
Stephen Warren [Wed, 24 Jul 2013 17:09:18 +0000 (10:09 -0700)]
dts/Makefile: simplify dtc invocation

The invocation of dtc is significantly more complex that it could be,
in order to work around an issue on old versions of dtc, which print
a message to stdout every time they run.

Remove this workaround, on the assumption that people have or will
upgrade to a newer version of dtc. This simplifies the build rule
significantly.

Related, split the invocation of cpp and dtc into separate commands
rather than a pipeline, so that if either fail, it is detected. This has
the nice benefit of saving off the result of the pre-processing step,
allowing it to be easily inspected.

Assuming a new enough dtc (which an earlier patch enforces), dtc will
parse #line directives in its input file, and generate correct file and
line numbers in error messages, even though cpp is unconditionally
applied to its input file.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
10 years agoxilinx: move microblaze-generic .dts to standard location
Stephen Warren [Wed, 24 Jul 2013 17:09:17 +0000 (10:09 -0700)]
xilinx: move microblaze-generic .dts to standard location

Aside from microblaze, all other SoCs/boards/vendors store their DT files
in board/$vendor/dts/$soc-$board.dts. Move microblaze-generic.dts to this
location for consistency.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
Acked-by: Michal Simek <monstr@monstr.eu>
10 years agoValidate dtc is new enough
Stephen Warren [Wed, 24 Jul 2013 17:09:16 +0000 (10:09 -0700)]
Validate dtc is new enough

Subsequent patches assume that dtc supports various recent features.
These are available in dtc 1.4.0. Validate that dtc is at least that
version.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
10 years agokaro: tx28: adapt fdt fixups for Linux 3.11 KARO_TX28-2013-08-02 karo-tx28
Lothar Waßmann [Fri, 2 Aug 2013 13:16:38 +0000 (15:16 +0200)]
karo: tx28: adapt fdt fixups for Linux 3.11

10 years agokaro: fdt: properly handle USB nodes for TX28 and TX6
Lothar Waßmann [Fri, 2 Aug 2013 13:15:34 +0000 (15:15 +0200)]
karo: fdt: properly handle USB nodes for TX28 and TX6

10 years agoMerge branch 'master' of git://git.denx.de/u-boot-usb
Tom Rini [Thu, 1 Aug 2013 13:19:28 +0000 (09:19 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-usb

10 years agokaro: tx6: remove debug code KARO_TX6-2013-08-01
Lothar Waßmann [Thu, 1 Aug 2013 13:19:03 +0000 (15:19 +0200)]
karo: tx6: remove debug code

10 years agokaro: tx6: fix broken calculation of MTDPARTS parameters
Lothar Waßmann [Thu, 1 Aug 2013 13:11:26 +0000 (15:11 +0200)]
karo: tx6: fix broken calculation of MTDPARTS parameters

10 years agokaro: tx6: set PHYS_SDRAM_1_SIZE independent from processor type
Lothar Waßmann [Thu, 1 Aug 2013 13:10:54 +0000 (15:10 +0200)]
karo: tx6: set PHYS_SDRAM_1_SIZE independent from processor type

10 years agokaro: tx6: rename board variants
Lothar Waßmann [Thu, 1 Aug 2013 13:10:08 +0000 (15:10 +0200)]
karo: tx6: rename board variants

10 years agokaro: tx6: use standard config option CONFIG_SYS_NAND_BLOCK_SIZE instead of CONFIG_SY...
Lothar Waßmann [Thu, 1 Aug 2013 09:23:29 +0000 (11:23 +0200)]
karo: tx6: use standard config option CONFIG_SYS_NAND_BLOCK_SIZE instead of CONFIG_SYS_NAND_ERASE_SIZE

10 years agospi: bfin_spi: Use DIV_ROUND_UP instead of open-coded
Axel Lin [Fri, 12 Jul 2013 09:39:41 +0000 (17:39 +0800)]
spi: bfin_spi: Use DIV_ROUND_UP instead of open-coded

Use DIV_ROUND_UP to simplify the code.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Scott Jiang <scott.jiang.linux@gmail.com>
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
10 years agoblackfin: Fix using gd->baudrate before setting its value
Axel Lin [Mon, 1 Jul 2013 05:16:17 +0000 (13:16 +0800)]
blackfin: Fix using gd->baudrate before setting its value

Current code uses gd->baudrate before setting its value.
Besides, I got below build warning which is introduced by
commit ddb5c5be "blackfin: add baudrate to bdinfo".

board.c:235:3: warning: passing argument 1 of 'simple_strtoul' makes pointer from integer without a cast [enabled by default]
include/vsprintf.h:27:7: note: expected 'const char *' but argument is of type 'unsigned int'

This patch ensures we get the baudrate setting before using it.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
10 years agoblackfin: gpio: Use proper mask for comparing function
Axel Lin [Fri, 28 Jun 2013 06:45:06 +0000 (14:45 +0800)]
blackfin: gpio: Use proper mask for comparing function

The function return from P_FUNCT2MUX(per) takes 2 bits, however
for BF537_FAMILY with offset != 1 the function is 1 bit.

Also has small refactor for better readability.
In portmux_setup(), it looks odd having "muxreg &= ~(3 << 1);"
while in current code we do muxreg |= (function << offset);.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
10 years agogpio: adi_gpio2: Unreserve gpio in special_gpio_free()
Axel Lin [Wed, 26 Jun 2013 02:10:04 +0000 (10:10 +0800)]
gpio: adi_gpio2: Unreserve gpio in special_gpio_free()

In special_gpio_free(), call unreserve() rather than reserve() to release gpio.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
10 years agoblackfin: gpio: Unreserve gpio in special_gpio_free()
Axel Lin [Wed, 26 Jun 2013 02:09:16 +0000 (10:09 +0800)]
blackfin: gpio: Unreserve gpio in special_gpio_free()

In special_gpio_free(), call unreserve() rather than reserve() to release gpio.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
10 years agocfi_flash: Add prototypes of overridable functions
Masahiro Yamada [Thu, 6 Jun 2013 07:54:04 +0000 (16:54 +0900)]
cfi_flash: Add prototypes of overridable functions

This commit adds some prototypes into include/mtd/cfi_flash.h.
These functions are defined with a weak attribute in
drivers/mtd/cfi_flash.c.
This means they can be overrided by board-specific ones
if necessary.

When defining such functions under board/ directory or
somewhere, cfi_flash.h should be included.
This makes sure that board-specfic cfi functions
are defined in a correct prototype.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Signed-off-by: Stefan Roese <sr@denx.de>
10 years agoehci-hcd: fix memory leak in lowlevel init
Nikita Kiryanov [Mon, 29 Jul 2013 10:27:40 +0000 (13:27 +0300)]
ehci-hcd: fix memory leak in lowlevel init

usb_lowlevel_init() allocates a new periodic_list each time it is invoked,
without freeing the original list. Since it is initialized later on in the code,
just reuse the first-allocated list in future invocations of usb_lowlevel_init.

Cc: Marek Vasut <marex@denx.de>
Cc: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
10 years agousb_hub: fix power cycling logic
Nikita Kiryanov [Mon, 29 Jul 2013 10:27:39 +0000 (13:27 +0300)]
usb_hub: fix power cycling logic

When power cycling the hub ports, a misbehaving port will prevent all ports
from being powered on because we quit at the first sign of trouble.

Skip problematic ports instead of failing the entire power on.

Cc: Marek Vasut <marex@denx.de>
Cc: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
10 years agousb: ehci-omap: Don't softreset USB High-speed Host (UHH) Module
Roger Quadros [Mon, 22 Jul 2013 08:14:37 +0000 (11:14 +0300)]
usb: ehci-omap: Don't softreset USB High-speed Host (UHH) Module

Fixes NFS root problems with Beagle (3530 ES1.0) when used with
external USB-ethernet adapter and "USB start" command used within
u-boot.

Soft resetting the UHH module causes instability issues on
all OMAPs so we just avoid it.

See OMAP36xx Errata
  i571: USB host EHCI may stall when entering smart-standby mode
  i660: USBHOST Configured In Smart-Idle Can Lead To a Deadlock

On OMAP4/5, soft-resetting the UHH module can put it into
Smart-Idle mode and lead to a deadlock.

On OMAP3 this doesn't seem to be the case but still instabilities
are observed on beagle (3530 ES1.0) if soft-reset is used.
 e.g. NFS root failures with Linux kernel.

Signed-off-by: Roger Quadros <rogerq@ti.com>
10 years agodfu: Implementation of target reset after communication with dfu-util's -R switch
Lukasz Majewski [Thu, 18 Jul 2013 11:19:14 +0000 (13:19 +0200)]
dfu: Implementation of target reset after communication with dfu-util's -R switch

This patch extends dfu code to support transmission with -R switch
specified at dfu-util.

When -R is specified, the extra USB_REQ_DFU_DETACH request is sent after
successful data transmission. Then dfu resources are released and reset
command is issued.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
10 years agousb: mv_udc: Add bounce buffer
Marek Vasut [Wed, 10 Jul 2013 01:16:43 +0000 (03:16 +0200)]
usb: mv_udc: Add bounce buffer

The requests sent to the controller are not properly cache aligned
most of the time, thus implement a simple bounce buffer to avoid
problem with cache.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Lei Wen <leiwen@marvell.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Stefano Babic <sbabic@denx.de>
10 years agousb: mv_udc: Add proper cache management
Marek Vasut [Wed, 10 Jul 2013 01:16:42 +0000 (03:16 +0200)]
usb: mv_udc: Add proper cache management

Implement functions to flush/invalidate dcache over QH and qTDs
and make use of them where appropriate. Also use them to replace
the old incorrect cache management attempt. This is the first step
towards making this driver work with data cache enabled.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Lei Wen <leiwen@marvell.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Stefano Babic <sbabic@denx.de>
10 years agousb: mv_udc: Implement better qTD item accessor
Marek Vasut [Wed, 10 Jul 2013 01:16:41 +0000 (03:16 +0200)]
usb: mv_udc: Implement better qTD item accessor

The code for retrieving qTD item for particular endpoint is hard
to understand, moreover it's duplicated all over the driver. Move
the code into single nice and documented function.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Lei Wen <leiwen@marvell.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Stefano Babic <sbabic@denx.de>
10 years agousb: mv_udc: Improve allocation of qTD items
Marek Vasut [Wed, 10 Jul 2013 01:16:40 +0000 (03:16 +0200)]
usb: mv_udc: Improve allocation of qTD items

Allocate the qTD items all at once instead of allocating them
separately. Moreover, make sure each qTD is properly aligned
to 32-bytes boundary and that cache can be safely flushed over
each qTD touple.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Lei Wen <leiwen@marvell.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Stefano Babic <sbabic@denx.de>
10 years agousb: mv_udc: Implement better QH accessor
Marek Vasut [Wed, 10 Jul 2013 01:16:39 +0000 (03:16 +0200)]
usb: mv_udc: Implement better QH accessor

The code for retrieving QH for particular endpoint is hard to understand,
moreover it's duplicated all over the driver. Move the code into single
nice and documented function.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Lei Wen <leiwen@marvell.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Stefano Babic <sbabic@denx.de>
10 years agousb: mv_udc: Add cacheline length check
Marek Vasut [Wed, 10 Jul 2013 01:16:38 +0000 (03:16 +0200)]
usb: mv_udc: Add cacheline length check

Check the length of system cacheline at compile-time and fail
if the system uses too long cachelines.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Lei Wen <leiwen@marvell.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Stefano Babic <sbabic@denx.de>
10 years agousb: mv_udc: Properly align the endpoint QH and qTD list
Marek Vasut [Wed, 10 Jul 2013 01:16:37 +0000 (03:16 +0200)]
usb: mv_udc: Properly align the endpoint QH and qTD list

The endpoint QH list has to be aligned to 10-bit boundary. We also have
to make sure the list is aligned on a cacheline boundary. Make sure it
is. Furthermore, check if the memory allocation for the QH list didn't
fail. Moveover, improve the comment about the QH list structure.

Finally, the qTD item list has to be aligned only to 5-bit boundary, not
10-bit as it is now, fix this as well.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Lei Wen <leiwen@marvell.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Stefano Babic <sbabic@denx.de>
10 years agousb: mv_udc: Move QH and qTD into mv_drv
Marek Vasut [Wed, 10 Jul 2013 01:16:36 +0000 (03:16 +0200)]
usb: mv_udc: Move QH and qTD into mv_drv

Both the endpoint queue head and the endpoint item list is a controller
specific thing. Move them both into controller private data.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Lei Wen <leiwen@marvell.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Stefano Babic <sbabic@denx.de>
10 years agousb: mv_udc: Init mv_drv.gadget.ops statically
Marek Vasut [Wed, 10 Jul 2013 01:16:35 +0000 (03:16 +0200)]
usb: mv_udc: Init mv_drv.gadget.ops statically

There is no need to init this field at runtime, so init it statically.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Lei Wen <leiwen@marvell.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Stefano Babic <sbabic@denx.de>
10 years agousb: mv_udc: Remove QH_MAXNUM macro
Marek Vasut [Wed, 10 Jul 2013 01:16:34 +0000 (03:16 +0200)]
usb: mv_udc: Remove QH_MAXNUM macro

The QH_MAXNUM is used in absolutelly incorrect manner and is not
even needed. Remove it and correctly replace it's occurance with
2 * NUM_ENDPOINTS .

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Lei Wen <leiwen@marvell.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Stefano Babic <sbabic@denx.de>
10 years agousb: mv_udc: Clean up the initial variable check
Marek Vasut [Wed, 10 Jul 2013 01:16:33 +0000 (03:16 +0200)]
usb: mv_udc: Clean up the initial variable check

Clean up the code that checks the validity of a USB gadget driver
in usb_gadget_register_driver(). Moreover, limit the speed of the
driver to either FULL or HIGH, this is more precise and once we
have xHCI support, also more correct.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Lei Wen <leiwen@marvell.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Stefano Babic <sbabic@denx.de>
10 years agousb: mv_udc: Make use of struct ehci_ctrl
Marek Vasut [Wed, 10 Jul 2013 01:16:32 +0000 (03:16 +0200)]
usb: mv_udc: Make use of struct ehci_ctrl

The usb_lowlevel_init() call already fills and passes back struct
ehci_ctrl , which readily contains correctly determined address of
the port register block address computed from values from controller
configuration registers. Leverage this and make use of this value
as this makes the code mode universal, but also gets us rid of the
CONFIG_USB_REG_BASE configuration option.

Moreover, this patch cleans up the usb_gadget_register_driver() call
a little by correcting the error handling. Note the usb_lowlevel_init()
and mvudc_probe() are now called in reversed order, but this has no
impact on the code.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Lei Wen <leiwen@marvell.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Stefano Babic <sbabic@denx.de>
10 years agousb: ehci: Split out struct ehci_ctrl definition
Marek Vasut [Wed, 10 Jul 2013 01:16:31 +0000 (03:16 +0200)]
usb: ehci: Split out struct ehci_ctrl definition

Move the struct ehci_ctrl defition from ehci-hcd.c into ehci.h
so it can be re-used by drivers. In particular, the mv_udc driver
can benefit from this move.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Lei Wen <leiwen@marvell.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Stefano Babic <sbabic@denx.de>
10 years agousb: mv_udc: Clean up the EP initialization
Marek Vasut [Wed, 10 Jul 2013 01:16:30 +0000 (03:16 +0200)]
usb: mv_udc: Clean up the EP initialization

Move the constant values that are programmed into mv_ep.ep into
separate static const structure so they can be memcpy()'d when
the initialization happens.

Moveover, we only every init NUM_ENDPOINTS, not 2 * NUM_ENDPOINTS,
so fix this bug as well.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Lei Wen <leiwen@marvell.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Stefano Babic <sbabic@denx.de>
10 years agousb: mv_udc: Move endpoint array into driver data
Marek Vasut [Wed, 10 Jul 2013 01:16:29 +0000 (03:16 +0200)]
usb: mv_udc: Move endpoint array into driver data

The endpoints are operated on a per-controller basis, move the
endpoint array into controller's private data. Also shuffle the
struct mv_ep structure definition just above the definition of
the struct mv_drv so they're well grouped together.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Lei Wen <leiwen@marvell.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Stefano Babic <sbabic@denx.de>
10 years agousb: mv_udc: Clean up mv_udc.h
Marek Vasut [Wed, 10 Jul 2013 01:16:28 +0000 (03:16 +0200)]
usb: mv_udc: Clean up mv_udc.h

Do a coding-style cleanup of this file and throw away useless
defined values. These values were likely a result of a copy-paste
job.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Lei Wen <leiwen@marvell.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Stefano Babic <sbabic@denx.de>
10 years agousb: mv_udc: Unbreak the mv_udc driver
Marek Vasut [Wed, 10 Jul 2013 01:16:27 +0000 (03:16 +0200)]
usb: mv_udc: Unbreak the mv_udc driver

The mv_udc driver is broken for a while and doesn't even compile.
This patch fixes the issues and gets the driver into working state
again. This driver was tested on Freescale i.MX233/i.MX28 .

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Lei Wen <leiwen@marvell.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Stefano Babic <sbabic@denx.de>
10 years agopowerpc/ppc4xx: Convert new gdsys files to SPDX license tags
Tom Rini [Fri, 26 Jul 2013 19:32:59 +0000 (15:32 -0400)]
powerpc/ppc4xx: Convert new gdsys files to SPDX license tags

Signed-off-by: Tom Rini <trini@ti.com>
10 years agoMerge branch 'master' of git://www.denx.de/git/u-boot-ppc4xx
Tom Rini [Fri, 26 Jul 2013 19:29:45 +0000 (15:29 -0400)]
Merge branch 'master' of git://www.denx.de/git/u-boot-ppc4xx

10 years agoMerge branch 'master' of git://www.denx.de/git/u-boot-cfi-flash
Tom Rini [Fri, 26 Jul 2013 19:29:08 +0000 (15:29 -0400)]
Merge branch 'master' of git://www.denx.de/git/u-boot-cfi-flash

10 years agopowerpc/ppc4xx: Remove CONFIG_SYS_FLASH_PROTECTION from gdsys boards
Dirk Eibach [Wed, 26 Jun 2013 14:04:31 +0000 (16:04 +0200)]
powerpc/ppc4xx: Remove CONFIG_SYS_FLASH_PROTECTION from gdsys boards

CONFIG_SYS_FLASH_PROTECTION was active on most gdsys boards by default,
while hardware flash protection was not implemented.
Hardware support was added recently and we get into trouble because backward
compatibility is broken (u-boot can't unprotect the protected flash after a
downgrade). So we decided to disable hardware flash protection for all our boards.

Signed-off-by: Dirk Eibach <dirk.eibach@gdsys.cc>
Signed-off-by: Stefan Roese <sr@denx.de>
10 years agopowerpc/ppc4xx: Consider gdsys FPGA OSD size
Dirk Eibach [Wed, 26 Jun 2013 14:04:30 +0000 (16:04 +0200)]
powerpc/ppc4xx: Consider gdsys FPGA OSD size

OSD size was constant 32x16 characters.
Now the size is set as announced by the FPGA.

Signed-off-by: Dirk Eibach <dirk.eibach@gdsys.cc>
Signed-off-by: Stefan Roese <sr@denx.de>
10 years agopowerpc/ppc4xx: Support gdsys multichannel iocon hardware
Dirk Eibach [Thu, 25 Jul 2013 17:28:13 +0000 (19:28 +0200)]
powerpc/ppc4xx: Support gdsys multichannel iocon hardware

Signed-off-by: Dirk Eibach <dirk.eibach@gdsys.cc>
Signed-off-by: Stefan Roese <sr@denx.de>
10 years agopowerpc/ppc4xx: Add fpgad command for dumping gdsys fpga registers
Dirk Eibach [Wed, 26 Jun 2013 14:04:28 +0000 (16:04 +0200)]
powerpc/ppc4xx: Add fpgad command for dumping gdsys fpga registers

Signed-off-by: Dirk Eibach <dirk.eibach@gdsys.cc>
Signed-off-by: Stefan Roese <sr@denx.de>
10 years agopowerpc/ppc4xx: Add gdsys mclink interface
Dirk Eibach [Wed, 26 Jun 2013 14:04:27 +0000 (16:04 +0200)]
powerpc/ppc4xx: Add gdsys mclink interface

mclink is a serial interface for communication between gdsys FPGA.

Signed-off-by: Dirk Eibach <dirk.eibach@gdsys.cc>
Signed-off-by: Stefan Roese <sr@denx.de>
10 years agopowerpc/ppc4xx: Use generic accessor functions for gdsys FPGA
Dirk Eibach [Wed, 26 Jun 2013 14:04:26 +0000 (16:04 +0200)]
powerpc/ppc4xx: Use generic accessor functions for gdsys FPGA

A set of accessor functions was added to be able to access not only
memory mapped FPGA in a generic way.

Thanks to Wolfgang Denk for getting this sorted properly.

Signed-off-by: Dirk Eibach <dirk.eibach@gdsys.cc>
Signed-off-by: Stefan Roese <sr@denx.de>
10 years agocfi_flash: use buffer length in unmap_physmem()
Kuo-Jung Su [Thu, 4 Jul 2013 03:40:36 +0000 (11:40 +0800)]
cfi_flash: use buffer length in unmap_physmem()

While the flash_detect_legacy() of drivers/mtd/cfi_flash.c
feed unmap_physmem() with MAP_NOCACHE as 2nd parameter,
the do_spi_flash_read_write() of common/cmd_sf.c
feed unmap_physmem() with the length of the mapped buffer
as 2nd parameter.

It's apparently a bug, and I personally think the 2nd parameter
should be the length of the mapped buffer.

Signed-off-by: Kuo-Jung Su <dantesu@faraday-tech.com>
CC: Albert Aribaud <albert.u.boot@aribaud.net>
CC: Stefan Roese <sr@denx.de>
Signed-off-by: Stefan Roese <sr@denx.de>
10 years agoMerge branch 'master' of git://git.denx.de/u-boot-nds32
Tom Rini [Thu, 25 Jul 2013 12:22:08 +0000 (08:22 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-nds32

10 years agoqemu-malta: Update for SPDX license identifiers
Tom Rini [Wed, 24 Jul 2013 13:34:30 +0000 (09:34 -0400)]
qemu-malta: Update for SPDX license identifiers

Signed-off-by: Tom Rini <trini@ti.com>
10 years agoMerge branch 'master' of git://git.denx.de/u-boot-mips
Tom Rini [Wed, 24 Jul 2013 13:30:46 +0000 (09:30 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-mips

Conflict over SPDX changes means that one change was effectively dropped
as it was fixing typos in a removed hunk of text.

Conflicts:
arch/mips/cpu/mips64/start.S

Signed-off-by: Tom Rini <trini@ti.com>
10 years agodrivers/i2c: Update fti2c010.[ch], i2c_core.c to use SPDX identifiers
Tom Rini [Wed, 24 Jul 2013 13:25:40 +0000 (09:25 -0400)]
drivers/i2c: Update fti2c010.[ch], i2c_core.c to use SPDX identifiers

Acked-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Tom Rini <trini@ti.com>
10 years agonds32: Enable FPU if the version of CPU supported
ken kuo [Wed, 24 Jul 2013 18:17:11 +0000 (02:17 +0800)]
nds32: Enable FPU if the version of CPU supported

Some version of Andes core support FPU coprocessor,
if this is the case, and toolchain support FPU instruction set,
we should enable it at low level initialization time.

Signed-off-by: Kuan-Yu Kuo <ken.kuoky@gmail.com>
Cc: Macpaul Lin <macpaul@gmail.com>
10 years agonds32: Update <asm/io.h> and <asm/setup.h> with SPDX license identifiers
Tom Rini [Wed, 24 Jul 2013 13:39:00 +0000 (09:39 -0400)]
nds32: Update <asm/io.h> and <asm/setup.h> with SPDX license identifiers

Signed-off-by: Tom Rini <trini@ti.com>
10 years agonds32: Convert Makefiles to use COBJS-y style
ken kuo [Wed, 24 Jul 2013 18:24:54 +0000 (02:24 +0800)]
nds32: Convert Makefiles to use COBJS-y style

Signed-off-by: Kuan-Yu Kuo <ken.kuoky@gmail.com>
Cc: Macpaul Lin <macpaul@gmail.com>
10 years agoMIPS: mips32/cache.S: use v1 register for indirect function calls
Gabor Juhos [Thu, 13 Jun 2013 10:59:36 +0000 (12:59 +0200)]
MIPS: mips32/cache.S: use v1 register for indirect function calls

Synchronize the code with mips64/cache.S, in order to
allow further unifications.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Cc: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
10 years agoMIPS: mips32/cache.S: store cache line size in t8 register
Gabor Juhos [Thu, 13 Jun 2013 10:59:35 +0000 (12:59 +0200)]
MIPS: mips32/cache.S: store cache line size in t8 register

Synchronize the code with mips64/cache.S, in order to
allow further unifications.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Cc: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
10 years agoMIPS: mips32/cache.S: save return address in t9 register
Gabor Juhos [Thu, 13 Jun 2013 10:59:34 +0000 (12:59 +0200)]
MIPS: mips32/cache.S: save return address in t9 register

Synchronize the code with mips64/cache.S, in order to
allow further unifications.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Cc: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
10 years agoMIPS: xburst/start.S: rework relocation info check
Gabor Juhos [Fri, 14 Jun 2013 12:47:10 +0000 (14:47 +0200)]
MIPS: xburst/start.S: rework relocation info check

Make it similar to the code in mips{32,64}/start.S, in order to
allow further unifications.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Cc: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
10 years agoMIPS: xburst/start.S: use t8 register for dynamic relocation
Gabor Juhos [Thu, 13 Jun 2013 10:59:32 +0000 (12:59 +0200)]
MIPS: xburst/start.S: use t8 register for dynamic relocation

Synchronize the code with mips{32,64}/start.S, in order to
allow further unifications.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Cc: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
10 years agoMIPS: xburst/start.S: save gd in s0 register
Gabor Juhos [Thu, 13 Jun 2013 10:59:31 +0000 (12:59 +0200)]
MIPS: xburst/start.S: save gd in s0 register

Synchronize the code with mips{32,64}/start.S, in order to
allow further unifications.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Cc: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
10 years agoMIPS: xburst/start.S: save relocation offset in s1 register
Gabor Juhos [Thu, 13 Jun 2013 10:59:30 +0000 (12:59 +0200)]
MIPS: xburst/start.S: save relocation offset in s1 register

Synchronize the code with mips{32,64}/start.S, in order to
allow further unifications.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Cc: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
10 years agoMIPS: xburst/start.S: save relocation address in s2 register
Gabor Juhos [Thu, 13 Jun 2013 10:59:29 +0000 (12:59 +0200)]
MIPS: xburst/start.S: save relocation address in s2 register

Synchronize the code with mips{32,64}/start.S, in order to
allow further unifications.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Cc: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
10 years agoMIPS: mips32/start.S: rework relocation info check
Gabor Juhos [Thu, 13 Jun 2013 10:59:28 +0000 (12:59 +0200)]
MIPS: mips32/start.S: rework relocation info check

Make it similar to the code in mips64/start.S, in order to
allow further unifications.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Cc: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
10 years agoMIPS: mips32/start.S: use t8 register for dynamic relocation
Gabor Juhos [Thu, 13 Jun 2013 10:59:27 +0000 (12:59 +0200)]
MIPS: mips32/start.S: use t8 register for dynamic relocation

Synchronize the code with mips64/start.S, in order to
allow further unifications.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Cc: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
10 years agoMIPS: mips32/cache.S: remove superfluous register assignment
Gabor Juhos [Wed, 12 Jun 2013 16:02:46 +0000 (18:02 +0200)]
MIPS: mips32/cache.S: remove superfluous register assignment

The t4 register already holds the cache
line size, and the value of the register
is not changed in mips_init_icache.

Get the cache line size value from t4 for
mips_init_dcache as well and remove the
superfluous assignment of t5 register.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
10 years agoMIPS: remove obsolete TODO items
Gabor Juhos [Wed, 12 Jun 2013 16:02:45 +0000 (18:02 +0200)]
MIPS: remove obsolete TODO items

The MIPS  code uses centralized u-boot.lds script already,
and dynamic relocation is supported as well.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Cc: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
10 years agoMIPS: mips64/interrupt.c: remove superfluous include
Gabor Juhos [Wed, 12 Jun 2013 16:02:44 +0000 (18:02 +0200)]
MIPS: mips64/interrupt.c: remove superfluous include

Nothing is used from asm/mipsregs.h.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Cc: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
10 years agoMIPS: mips32/time.c: fix checkpatch errors/warnings
Gabor Juhos [Wed, 12 Jun 2013 16:02:43 +0000 (18:02 +0200)]
MIPS: mips32/time.c: fix checkpatch errors/warnings

Checking mips32/time.c with checkpatch.pl shows this:

  arch/mips/cpu/mips32/time.c:30: WARNING: line over 80 characters
  arch/mips/cpu/mips32/time.c:57: ERROR: return is not a function, parentheses are not required
  total: 1 errors, 1 warnings, 0 checks, 85 lines checked

Fix the code to make checkpatch.pl happy.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Cc: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
10 years agoMIPS: qemu-malta: bring up ethernet
Gabor Juhos [Wed, 22 May 2013 03:57:44 +0000 (03:57 +0000)]
MIPS: qemu-malta: bring up ethernet

Qemu emulates a PCNET PCI card for the Malta CoreLV board.
Enable the pcnet driver and add board specific ethernet
initialization function to bring it up. Also enable the
CONFIG_CMD_NET and CONFIG_CMD_PING options.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Cc: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
10 years agoMIPS: qemu-malta: add PCI support
Gabor Juhos [Wed, 22 May 2013 03:57:42 +0000 (03:57 +0000)]
MIPS: qemu-malta: add PCI support

Qemu emulates the Galileo GT64120 System Controller
which provides a CPU bus to PCI bus bridge.

The patch adds driver for this bridge and enables
PCI support for the emulated Malta board.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Cc: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>