9
0
Fork 0
Commit Graph

2155 Commits

Author SHA1 Message Date
Sascha Hauer 40830caf4e Merge branch 'for-next/smc911x' 2012-09-05 12:59:59 +02:00
Sascha Hauer f63576730b Merge branch 'for-next/sandbox' 2012-09-05 12:59:58 +02:00
Sascha Hauer 6662e16dbb Merge branch 'for-next/ppc'
Conflicts:
	arch/ppc/boards/freescale-p2020rdb/p2020rdb.c
	arch/ppc/configs/p2020rdb_defconfig
	arch/ppc/mach-mpc85xx/include/mach/immap_85xx.h
2012-09-05 12:59:54 +02:00
Sascha Hauer bed1a6ffab Merge branch 'for-next/pbl' 2012-09-05 12:59:29 +02:00
Sascha Hauer b40aeb00d3 Merge branch 'for-next/omap' 2012-09-05 12:59:29 +02:00
Sascha Hauer d7257236a7 Merge branch 'for-next/misc' 2012-09-05 12:59:29 +02:00
Sascha Hauer 2c8c801c67 Merge branch 'for-next/mc13xxx' 2012-09-05 12:59:29 +02:00
Sascha Hauer 9196d727ad Merge branch 'for-next/imx' 2012-09-05 12:59:29 +02:00
Sascha Hauer 038307cb5e Merge branch 'for-next/i2c' 2012-09-05 12:59:29 +02:00
Sascha Hauer 978b0739dc Merge branch 'for-next/gpiolib' 2012-09-05 12:59:29 +02:00
Sascha Hauer 40126ad7f8 Merge branch 'for-next/fs' 2012-09-05 12:59:29 +02:00
Sascha Hauer e141988898 Merge branch 'for-next/device-id' 2012-09-05 12:59:29 +02:00
Sascha Hauer 5d8accbe96 Merge branch 'for-next/atmel' 2012-09-05 12:59:29 +02:00
Sascha Hauer b395e8bfb0 ARM i.MX: switch to gpiolib support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
2012-09-04 21:01:05 +02:00
Renaud Barbier 075209e8f3 ppc: p2020rdb i2c support
Support for both i2c busses on the p2020rdb board is added and the
configuration file is updated to add the I2C driver and commands.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-04 11:16:48 +02:00
Renaud Barbier f8e0d68214 i2c: adapt the i2c-imx driver to mpc85xx machines
A function to calculate the frequency divider and digital filter sampling rate
for the 85xx processors is added to the i2c-imx driver. Hence, this driver is
usable on IMX and 85xx machines.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-04 11:16:48 +02:00
Renaud Barbier b977801ac1 IMX driver: replace imx -> fsl
The IMX i2c driver is to be used by SOCs on both the ARM and PPC architetures.
Use a more neutral name for the structure, function names and #define.
The driver name is now "i2c-fsl".

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-04 11:16:48 +02:00
Jean-Christophe PLAGNIOL-VILLARD 94fd74dda7 command/mount: add autodetection support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-09-04 09:08:39 +02:00
Sascha Hauer 72f26b709f openrisc: Add unaligned support
Copied directly from Linux header file

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-04 09:08:39 +02:00
Sascha Hauer e83bd38479 blackfin: Add unaligned support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-04 09:08:39 +02:00
Renaud Barbier 0f9ca850a5 ppc: add unaligned support
This file is copied from Linux 2.6.39. It is added so that the P2020RDB
can still build.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-04 08:55:29 +02:00
Sascha Hauer 2bbde03d0f ARM i.MX35 3stack: do not dereference members of struct mc13xxx
struct mc13xxx is dereferenced to be able to use dev_info. This is
not necessary since the informations are not mc13xxx related but
3stack related.

- remove unneeded mc13892 raw version printout
- use printk for telling that the init sequence failed.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-04 08:47:58 +02:00
Renaud Barbier 086d09c913 mpc85xx: header update
In order to use the IMX i2c driver on the mpc85xx SOC, the file mach/clocks.h
is renamed mach/clock.h. Files using this header are updated accordingly.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-04 08:29:09 +02:00
Alexander Aring 3e63938ecd sandbox: fix malloc argument
Fix malloc argument for sandbox system.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-03 11:09:09 +02:00
Alexander Aring f047101439 sandbox: fix whitespaces in board file
Fix whitespaces in board file.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-03 11:09:08 +02:00
Alexander Aring 31a1076a46 sandbox: add asm-generic/io.h
Add in sandbox asm/io.h the asm-generic/io.h header file.
Needed by NAND support.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-03 11:09:07 +02:00
Jean-Christophe PLAGNIOL-VILLARD 5b1583d994 nhk8815: fix nand IO_DATA end resource
introduce in commit
5f03074ea9
resource: store 'end' instead of 'size' in struct resource

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-03 11:06:49 +02:00
Jean-Christophe PLAGNIOL-VILLARD 655dc6b8aa smc911x: add support to pass the shift via platform data
switch ipe337: to it at the same time to do not brake it

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-03 09:49:06 +02:00
Wolfram Sang 8822e01b9b arm: mxs: bcb: fix usage of second bootstream
If a second bootstream was used, there was a sanity check which was not
only wrong (using erasesize instead of writesize) but also superfluous
(we got the block from an existing cdev, so it must be in the flash
range). Simply remove it to make bcb work as expected.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-03 09:42:18 +02:00
Renaud Barbier 705d7fa2b4 ppc/asm/fsl_i2c.h is removed
The i2c-imx driver is able to support the I2C bus on the 85xx machines
with minor modifications. It already defines register offsets. Therefore,
this header file is no longer needed.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-03 09:34:25 +02:00
Renaud Barbier f17e6c568b mpc85xx: i2c frequency
A function that returns the system bus frequency used to compute the i2c bus
frequency is added for future use.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-03 09:34:25 +02:00
gregory hermant 03a37761fb NAND Flash SMC timings update (nwe_pulse) for calao board based on AT91SAM9G20 SoC
Signed-off-by: Gregory Hermant <gregory.hermant@calao-systems.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-08-31 09:34:42 +02:00
Steffen Trumtrar 74bde540e2 ARM i.MX6: Add i2c iomux to sabrelite
Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-08-31 09:29:36 +02:00
Steffen Trumtrar 9d2cebfffe ARM i.MX6: Add usb-ehci to sabrelite
Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-08-31 09:29:36 +02:00
Steffen Trumtrar ab283d10be ARM i.MX6: enable usbphy1
Add a function to take the usbphy1 through its initialization procedure.
The imx6_usb_phy1_disable_oc function is needed at least on the sabrelite,
as the power design is faulty. The state on other imx6 boards is unknown,
therefore it is an extra function call at the moment.

Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-08-31 09:28:58 +02:00
Steffen Trumtrar 5c737361ff ARM i.MX6: add the usbphy1 base addr
Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-08-31 09:28:58 +02:00
gregory hermant b765777478 Add documentation for the calao boards
Signed-off-by: Gregory Hermant <gregory.hermant@calao-systems.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-08-29 09:13:48 +02:00
Eric Bénard ae22e4f2f9 i.MX35: add cspi1 support
tested with a m25p128 flash both in nand boot & spi boot.

Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-08-29 09:00:22 +02:00
Jan Weitzel 466b62f4f3 pcm049: use NAND_BUSWIDTH_AUTO
autodetect bus width

Signed-off-by: Jan Weitzel <j.weitzel@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-08-28 08:49:23 +02:00
Jan Weitzel 4d5850ff9e OMAP4460: clock init
Change clock init to allow early gpio access. Add support for 4460 clocks.

Signed-off-by: Jan Weitzel <j.weitzel@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-08-14 22:01:33 +02:00
Jan Weitzel 054085bfba OMAP4460: ram init changes
configure  Memory Adapter for 4460

Signed-off-by: Jan Weitzel <j.weitzel@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-08-14 22:01:33 +02:00
Jan Weitzel d1d6369a56 Add support for OMAP4460 TPS62361
based on: [U-Boot] [PATCH v 4/5] omap4: support TPS programming
TPS62361 is the new power supply used in OMAP4460 that
supplies vdd_mpu.

VCORE1 from Phoenix supplies vdd_core and VCORE2 supplies
vdd_iva. VCORE3 is not used in OMAP4460.

Signed-off-by: F. Gasnier fabrice.gasnier@cenosys.com
Signed-off-by: Jan Weitzel <j.weitzel@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-08-14 22:01:33 +02:00
Jan Weitzel ed35883442 ARM OMAP4: use writel and readl
replace *(volatile int*) by writel and readl

Signed-off-by: Jan Weitzel <j.weitzel@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-08-13 20:41:22 +02:00
Sascha Hauer d5b6012ac1 create a common ARM flush_icache function
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-08-13 20:27:43 +02:00
Sascha Hauer bdb4093d3d ARM pbl: enable MMU during decompression
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-08-13 20:27:39 +02:00
Sascha Hauer a3a103c95c ARM MMU: call __mmu_cache_* as regular C functions
Now that __mmu_cache_* restore the registers they can be called
as regular C functions. Create a header file for them and use
C functions rather than inline assembly.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-08-13 20:27:38 +02:00
Sascha Hauer 8377958958 ARM __mmu_cache_*: Do not clobber registers
Save/restore the registers used in __mmu_cache_* so that they can
be called as regular C functions.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-08-13 20:27:38 +02:00
Jean-Christophe PLAGNIOL-VILLARD 5bc3870d67 arm/bootm: fix initrd_start init
initrd_start need to be init to data->initrd_address and updated only if the
addr is invalid.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-08-13 14:48:12 +08:00
Sascha Hauer e4e141159d ARM pbl: generate zbarebox.map in $(obj)
All other linker generated files are there, too, so it seems logical
to put the map file there aswell.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-08-12 22:23:22 +02:00
Sascha Hauer e42e1613d0 ARM: fix netx/MLO/s5p image build for pbl
If pbl support is enabled only zbarebox.bin was built, but
not the SoC specific images. Fix this.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-08-12 22:23:22 +02:00
Sascha Hauer e90a9ba7e6 ARM Makefile: Do not hardcode targets in MLO/netx/davinci/s5p
use $< rather than barebox.bin directly

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-08-12 22:23:22 +02:00
Sascha Hauer 95423f8af2 ARM boards: Make boards pbl safe
With pbl support enabled most boards need a pbl-y for their lowlevel
stuff.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-08-12 22:23:22 +02:00
Sascha Hauer 6478566b2d ARM s3c boards: Do not hardcode image sizes
The existing nand_boot functions all do the same, so move it to
a common place. To be flexible enough for future boards the real
image size is used instead of hardcoded 256k.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Juergen Beisert <jbe@pengutronix.de>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-08-12 22:23:12 +02:00
Sascha Hauer 5022723a7d ARM eukrea cpuimx25: Move flash_header to seperate file
The flash header is needed for pbl support, so move it to
separate file to be able to add it to pbl-y

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-08-12 16:17:43 +02:00
Sascha Hauer b615445564 Makefile: generate a barebox-flash-image link
Depending on the SoC a barebox.bin, barebox.netx, barebox.s5p, MLO image
is generated. With pbl support there now is an additional
arch/arm/pbl/zbarebox.bin image.

To help the user to determine which image should be flashed to his device,
generate a barebox-flash-image link.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-08-12 16:16:44 +02:00
Jean-Christophe PLAGNIOL-VILLARD a231dcdf78 devices: fix missing conversion to DEVICE_ID_DYNAMIC
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-08-12 14:48:28 +02:00
Renaud Barbier fa345fa012 ppc: P2020RDB Ethernet configuration
Minimal support of the Ethernet interface on the P2020RDB board. Only
the eTSEC3 interface is supported.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-08-10 21:15:36 +02:00
Renaud Barbier ad7e9562fc fsl: Freescale TSEC specific initialization.
The fsl_eth_init function maps the TSEC registers (MAC, TBI and
external PHY access registers). It also passes the PHY address and
TBI registers initialization values.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-08-10 21:15:36 +02:00
Renaud Barbier caf788ae5a net: GIANFAR driver
This update adds the GIANFAR driver along with the configuration
and build files.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-08-10 21:15:36 +02:00
Renaud Barbier fdf4a8c672 ppc: GIANFAR base address definition
In view of the introduction of the GIANFAR Ethernet driver,
the mdio and gianfar base address are defined.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-08-10 21:15:36 +02:00
Alexander Shiyan e377a9d966 mc13xxx: Added mc13xxx_revision() function.
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-08-10 10:44:19 +02:00
Steffen Trumtrar 09938f0335 ARM i.MX: Add support for i2c on imx6
Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-08-09 09:34:39 +02:00
Sascha Hauer 5a693051df mtd OMAP NAND: Use prefetch engine
Use the prefetch engine to improve NAND performance. The howto
is derived from the Kernel. Unlike the kernel we do not make
the access mode configurable.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-08-03 19:32:07 +02:00
Sascha Hauer 67809258fa ARM OMAP gpmc nand: specify platform data in boards
Instead of passing several options into the nand register function
it is much more straight forward to just pass the platformdata.
While at it, rename the function to omap_add_gpmc_nand_device to
better describe what it does.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-08-03 19:32:04 +02:00
gregory hermant 93cd86f6e6 Enable pull-up on Rx serial ports for the CALAO MB-QIL-A9260
This patch prevents to stop the autoboot randomly for the CALAO MB-QIL-A9260.
Indeed on this board, there's no pull-up on the RX inputs for the DBGU, COM1 & COM2 serial port.
With pull-up enabled, there's no longer unwanted character received from these console (CONFIG_CONSOLE_ACTIVATE_ALL=y).

Signed-off-by: Gregory Hermant <gregory.hermant@calao-systems.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-08-03 15:51:25 +02:00
Jean-Christophe PLAGNIOL-VILLARD 894b2ee912 at91: Calao and Atmel reboard sam{9260/9g20/9261/9g10/9263}ek autodetect sdram size
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-08-03 15:51:03 +02:00
Jean-Christophe PLAGNIOL-VILLARD 46a11f99ff at91: sam9260/sam9g20/sam9261/sam9g10/sam9263 add autodetect sdram size
if 0 is passed to at91_add_device_sdram autodetect the sdram size

The amount of available ram is determined by the SDRAMC_CR register.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-08-03 15:51:02 +02:00
Jean-Christophe PLAGNIOL-VILLARD 1e1c4dcd8c arm: at91: add custom barebox-arm-head
On at91 we need to put the size to load is the sram at the 6th exception vector

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-08-03 15:50:01 +02:00
Jean-Christophe PLAGNIOL-VILLARD bbe683b1e4 arm introduce CONFIG_MACH_ARM_HEAD option to allow custom head
This is needed by at91 to specify the size of the binary to load from the
bootrom when booting for non nor flash.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-08-03 15:50:01 +02:00
Jean-Christophe PLAGNIOL-VILLARD b6240f08fb arm: at91: add debug_ll support
Today we only use the DBGU port

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-08-03 15:50:01 +02:00
Jean-Christophe PLAGNIOL-VILLARD 1d861eb2a6 arm: always enable the garbage collector for pbl
This allow to save arround 1KiB on at91

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-08-03 18:09:16 +08:00
Jean-Christophe PLAGNIOL-VILLARD db8a8e2129 at91: add lowlevel init to the pbl
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-08-03 18:09:15 +08:00
Sascha Hauer 2765ecdd2d ARM pbl: Add .gitignore for generated files
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-08-03 18:09:15 +08:00
Jean-Christophe PLAGNIOL-VILLARD 104c39fe82 compressed image: add gzip support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-08-03 18:09:15 +08:00
Jean-Christophe PLAGNIOL-VILLARD 8d29296240 ARM: add early malloc support needed by the decompressor
This is not needed by lzo but by gunzip, xz and others.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-08-03 18:09:15 +08:00
Jean-Christophe PLAGNIOL-VILLARD 5c3db111da Add compressed image support
This allows for creating a lzo compressed binary unsing the pbl.

Only copy the piggydata if needed.

Add CONFIG_PBL_FORCE_PIGGYDATA_COPY option
In some case we need to copy the PIGGYDATA as the link address
as example we run from SRAM and shutdown the SDRAM/DDR for
reconfiguration but most of the time we just need to copy the
executable code.

based on Sascha Hauer
Add compressed image support

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-08-03 18:09:15 +08:00
Jean-Christophe PLAGNIOL-VILLARD 53391b5a8d pbl: discard unwind symbol if enable in barebox
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-08-03 18:09:15 +08:00
Jean-Christophe PLAGNIOL-VILLARD 78867e2bbd Add pre-bootloader (pbl) image support
This allows for creating a pre-bootloader binary for
 - nand boot
 - mmc boot
 - compressed image

The pbl will be incharge of the lowlevel init if needed.
The barebox will skip it.

Import string functions from linux 3.4 (arch/arm/boot/compressed/string.c) and
implement a dummy panic.

For now on introduce dummy zbarebox* targets and c code that will contain later
the decompressor. This only implemeted on ARM.

This patch is based on Sascha Hauer <s.hauer@pengutronix.de>
Add compressed image support patch

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-08-03 18:09:13 +08:00
Sascha Hauer ee5a0fcded mtd OMAP NAND: Fix dev_ready handling
- dev_ready is supposed to return whether the device is ready or
  not, not to poll until the device is ready.
- dev_ready should return true for ready and false for not ready
- waitpin polarity is not needed (at least the kernel does not have it)
- wait_mon_mask must be 32bit.

The code was unused since no board specified a wait pin, so no breakage
included. This also removes the now unused timeout variable from
platformdata.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-08-02 12:00:51 +02:00
Eric Bénard 6efca01b82 eukrea_cpuimx35: fix USB host
Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-08-02 11:01:18 +02:00
Sascha Hauer 7b1afaeaeb Merge branch 'for-next/tqma53' 2012-08-01 17:50:22 +02:00
Sascha Hauer a934d16a2a Merge branch 'for-next/samsung'
Conflicts:
	arch/arm/Makefile
	arch/arm/mach-samsung/Makefile
	arch/arm/mach-samsung/include/mach/s5pcxx-iomap.h
2012-08-01 17:50:18 +02:00
Sascha Hauer 33838de7a2 Merge branch 'for-next/sabrelite'
Conflicts:
	arch/arm/Makefile
2012-08-01 17:50:05 +02:00
Sascha Hauer 2935411dea Merge branch 'for-next/reset-source' 2012-08-01 17:49:27 +02:00
Sascha Hauer 88107f6e12 Merge branch 'for-next/randconfig' 2012-08-01 17:49:27 +02:00
Sascha Hauer ae98200133 Merge branch 'for-next/pcm038' 2012-08-01 17:49:27 +02:00
Sascha Hauer 7db4b8a16a Merge branch 'for-next/omap' 2012-08-01 17:49:27 +02:00
Sascha Hauer fd0543ca25 Merge branch 'for-next/mkublheader' 2012-08-01 17:49:27 +02:00
Sascha Hauer 9204bf87d6 Merge branch 'for-next/misc' 2012-08-01 17:49:27 +02:00
Sascha Hauer a8dbc3f762 Merge branch 'for-next/mips' 2012-08-01 17:49:27 +02:00
Sascha Hauer 14977019fc Merge branch 'for-next/imx-misc' 2012-08-01 17:49:27 +02:00
Sascha Hauer 24e9538b9c Merge branch 'for-next/imx-keypad' 2012-08-01 17:49:27 +02:00
Sascha Hauer 2b3bf599b3 Merge branch 'for-next/friendlyarm' 2012-08-01 17:49:27 +02:00
Sascha Hauer e986897cd0 Merge branch 'for-next/compressed-prepare' 2012-08-01 17:49:27 +02:00
Sascha Hauer 363a134369 Merge branch 'for-next/cfa-10036' 2012-08-01 17:49:27 +02:00
Sascha Hauer f854b2370e ARM i.MX: Add defconfig for Freescale i.MX6 Sabre Lite board
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-31 20:00:04 +02:00
Sascha Hauer e58ca031f6 ARM i.MX: Add support for the Freescale i.MX6 sabrelite board
This adds support for the Freescale i.MX6 sabrelite board with:

- FEC
- SD2/3
- SPI flash

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-31 19:59:58 +02:00
Sascha Hauer e3040756e6 ARM i.MX: Add support for internal serial boot mode
This mode is needed for bootstrapping a board via USB serial.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-31 19:59:54 +02:00
Sascha Hauer 5f78112920 SPI i.MX: Add support for i.MX6
The i.MX5 does not have a valid function to get the spi clock. This
patch introduces a function for i.MX6, and moves the bogus spi clock
speed to the speed-imx5*.c. Not nice, but preserves the current status
quo for i.MX5

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-31 19:59:50 +02:00
Juergen Beisert d65926656c ARM/Samsung: add the Tiny6410 platform as a user of the S3C6410 SoC
The Tiny6410 and its base board is a pure development platform.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-30 11:35:27 +02:00
Juergen Beisert b36d795cf0 ARM/Samsung: add the Mini6410 platform as a user of the S3C6410 SoC
Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-30 11:35:27 +02:00
Juergen Beisert 543b4db350 ARM/Samsung: add the S3C6410 SoC
After adding the base support, the SoC can now be enabled in the build system.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-30 11:35:27 +02:00
Juergen Beisert 3ccb2d41b9 ARM/Samsung: add generic S3C6410 SoC specific functions
Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-30 11:35:27 +02:00
Juergen Beisert a781bb98da ARM/Samsung: add GPIO handling support for the S3C6410 SoC
Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-30 11:35:27 +02:00
Juergen Beisert af286b5096 ARM/Samsung: add the clock tree support for the S3C6410 SoC
Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-30 11:35:27 +02:00
Juergen Beisert 32eca5b3b8 ARM/Samsung: adapt the generic timer driver to support the S3C6410 SoC
The S3C64XX SoC has a real 32 bit counter, but almost the same style of
registers. It's enough to change the parameters, to get the routines work on
this SoC.

sha: s5p timer works like s3c64xx, so use #else to cover this.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-30 11:35:23 +02:00
Marc Reilly e40b05cfc2 imx35: mmc clock has 6 bit divider, not 3_3
Signed-off-by: Marc Reilly <marc@cpdesign.com.au>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-30 10:48:23 +02:00
Juergen Beisert 63f57091f2 ARM/Samsung: add S3C6410 SoC iomap
Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-30 10:17:32 +02:00
Antony Pavlov bd6cc52de5 MIPS: add initial exceptions handling
Checking exception handling:

    $ make qemu-malta_defconfig
    $ make

    ...

    $ qemu-system-mips -nodefaults -M malta -m 256 \
       -nographic -serial stdio -bios ./barebox.bin

    ...

    barebox:/ md -l 0x03

    Ooops, address error on load or ifetch!
    EPC = 0xa082783c
    CP0_STATUS = 0x00000006
    CP0_CAUSE = 0x00000410
    CP0_CONFIG = 0x80008482

    ### ERROR ### Please RESET the board ###

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-27 09:54:13 +02:00
Juergen Beisert c5066ad4cd Samsung/serial: move the decision about an improved UART into Kconfig
More or less just cosmetic (removing ifdefs!).

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-25 09:27:38 +02:00
Juergen Beisert 670254b1e7 ARM/Samsung: follow the name style of the other source files in this directory
Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-25 09:27:38 +02:00
Juergen Beisert 1c74402a35 ARM/Samsung: List only really supported S3C24xx SoCs
The other SoCs differs in many ways from the currently supported S3C2410 and
S3C2440, so remove them.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-25 09:27:38 +02:00
Sascha Hauer 55a618ede4 ARM at91: fix typo in define
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-25 09:27:28 +02:00
Sascha Hauer bc1932b201 ARM at91: remove const
Although the spi chipselects should really be const, there is no
good way to fix the compiler warning, so remove the const.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-25 09:27:28 +02:00
Sascha Hauer aeab2daaee ARM i.MX: No external NAND boot on i.MX1
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-25 09:27:28 +02:00
Sascha Hauer 1c01f8c273 ARM i.MX: rename internal-nand-boot.c to external-nand-boot.c
Because that's what it is.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-25 09:27:28 +02:00
Sascha Hauer f4cbb7fe17 ARM: remove mx1ads leftovers
We have no mx1ads support in the tree, so remove the remaining bits from
Kconfig.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-25 09:27:27 +02:00
Sascha Hauer 47548c90b1 gpio: add static inlines for gpio_request/gpio_free
Some drivers use gpio_request/gpio_free. Currently no architecture
has code behind these functions. Provide static inline functions
for these and remvoe the at91 specific inline functions.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-25 09:27:27 +02:00
Sascha Hauer d5a90dbcbc ARM Samsung S5P: Disable support until we have a board
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-25 09:27:27 +02:00
Sascha Hauer 7921e67e86 ARM at91rm9200: Add missing include
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-25 09:27:27 +02:00
Sascha Hauer 32fe6b09c2 bootm: Fix undefined reference to of_fix_tree
It's only available when oftree support is enabled.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-25 09:27:27 +02:00
Sascha Hauer b0927fc95c ARM: let armlinux_set_* depend on the correct option
We need inline versions of armlinux_set* exactly when
CONFIG_ARM_LINUX is not set, because this is the symbol
used to compile the non inline versions.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-25 09:27:27 +02:00
Wjatscheslaw Stoljarski (Slawa) 1e3d002d5a ARM i.MX53: notify clocksource about changing clock
This fix a clock inaccuracy in get_time_ns (used by sleep, time, etc).

At i.MX53 power-on GPT clock is typically 55500000 Hz, and it will be used
to calc the clock multiplier. After call imx53_init_lowlevel() GPT clock
will changed (e.g. to 66666666 Hz), but multiplier not. To fix this behavior call
clock_notifier_call_chain() after changing clock in imx53_init_lowlevel().

Signed-off-by: Wjatscheslaw Stoljarski <wjatscheslaw.stoljarski@kiwigrid.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-25 08:40:16 +02:00
Teresa Gámez 7b0de0e6fa OMAP4: small header cleanup
Use <mach/clocks.h> for OMAP4.

Signed-off-by: Teresa Gámez <t.gamez@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-25 08:36:33 +02:00
Sascha Hauer 91b632acbf ARM: move exception vector table to exceptions.S
start.c has nothing to do with the exception vector table anymore,
so move it next to the exception handling code in exceptions.S

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-24 08:21:26 +02:00
Sascha Hauer 855685cd8a ARM at91rm9200: remove SoC specific copying of exception vectors
This is done by generic code

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-24 08:21:26 +02:00
Alexander Shiyan bde141bce7 i.MX: Removed unused declaration for imx_iim_get_mac
Procedure is missing, so remove its declaration.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-24 08:15:23 +02:00
Alexander Shiyan 341159c009 PCM038: Added setup for OTG host pins
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-24 08:14:58 +02:00
Alexander Shiyan ff03034eb7 mc13xxx: Added dummy definitions if CONFIG_MFD_MC13XXX is not set
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-24 08:14:58 +02:00
Alexander Shiyan 8bb52bd827 tx51: Unused mc13xxx.h include removed
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-24 08:14:58 +02:00
Sascha Hauer 7c3e50c83d ARM: Separate assembler functions into their own section
To let the linker remove unused functions.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-23 23:57:44 +02:00
Sascha Hauer 244198ea8b ARM boards: Use _text rather than TEXT_BASE
With compressed image support TEXT_BASE will become the base
address of the uncompressed image. What the boards want instead
is the base address of the decompressor code or, if not compressed,
the base address of the uncompressed image. Use _text which is
the correct one for both cases.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-23 23:57:44 +02:00
Sascha Hauer 218dffea80 ARM ep93xx: Get rid of special handling in linker file
The ep93xx needs a special value at offset 0x1000. Rather than
do special handling in the linker file add aa header section
as done on i.MX.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-23 23:57:44 +02:00
Sascha Hauer a5dd9f8eca ARM startup: calculate offset instead of runtime address
Calculating the offset between runtime and linked address makes the
intention of the binary copy function a bit more clear.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-23 23:57:44 +02:00
Sascha Hauer 0884285d9f ARM: remove exception vectors from boards
The exception vector table will become part of the uncompressed image,
so we can't reference them from the lowlevel init stuff anymore.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-23 23:57:44 +02:00
Sascha Hauer 82d8b89242 ARM: remove board linker script option
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-23 23:57:44 +02:00
Sascha Hauer 69bb5cb1ba ARM lds: remove unused got
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-23 23:57:44 +02:00
Juergen Beisert 0742542f87 ARM/MXS: pull-up and bitkeeper must be handled differently
Since commit 2f6b1f7690 the pull-up and
bitkeeper handling for i.MX23/28 is correct. But now it is important to
distinguish these pin features as their programmed bit values are different.
With this patch the bitkeeper and pull-up enable/disable bits are now handled
separately.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-23 22:10:54 +02:00
Juergen Beisert 483808b9e7 ARM/Samsung: add the vendor FriendlyARM to the board's directory name
A look into "arch/arm/boards/" offers various boards starting with the
vendor's name in their directory name (like 'eukrea' and 'freescale').
This patch does the same for the currently existing FriendlyARM board
Mini2440.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
2012-07-20 14:04:57 +02:00
Alexey Galakhov 0358115f0c Add FriendlyArm Tiny210 board (S5PV210)
Signed-off-by: Alexey Galakhov <agalakhov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-20 14:03:19 +02:00
Alexander Shiyan 6e18b3a48e mc13xxx: Define maximum SPI clock frequency global to driver
This patch provide setup for SPI clk frequency global to driver.
For MC13783 maximum clock frequency is 20 MHz,
for MC13892 maximum clock frequency is 26 MHz,
so we define 20 MHz as a maximum SPI clk.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-20 10:14:03 +02:00
Alexander Shiyan 341f9f6e9e PCM038: Read UID from fuses and pass this value to kernel as serial number
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-20 09:25:36 +02:00
Alexander Shiyan 52b444c94c PCM970: Add MMC support
Here is a test output:

barebox 2012.07.0-00136-ge3ab4bc-dirty #23 Tue Jul 3 23:10:44 MSK 2012
Board: Phytec phyCORE-i.MX27
mc13xxx-spi@mc13xxx-spi0: Found MC13783 ID: 0x00009b [Rev: 3.1]
cfi_flash@cfi_flash0: found cfi flash at c0000000, size 33554432
NAND device: Manufacturer ID: 0x20, Chip ID: 0x36 (ST Micro NAND 64MiB 1,8V 8-bit)
Bad block table found at page 131040, version 0x01
Bad block table found at page 131008, version 0x01
imxfb@imxfb0: i.MX Framebuffer driver
cfi_protect: protect 0xc0080000 (size 1048576)
Using environment in NOR Flash
Found NXP ISP150x ULPI transceiver (0x04cc:0x1504).
ehci@ehci0: USB EHCI 1.00
imx-mmc@mci0: registered as mci0
Malloc space: 0xa6f00000 -> 0xa7efffff (size 16 MB)
Stack space : 0xa6ef8000 -> 0xa6f00000 (size 32 kB)
running /env/bin/init...

Hit m for menu or any other key to stop autoboot:  3

type exit to get to the menu
barebox@Phytec phyCORE-i.MX27:/ mci0.probe=1
mci@mci0: registered disk0
barebox@Phytec phyCORE-i.MX27:/ devinfo mci0
resources:
driver: mci

 Card:
 Attached is an SD Card (Version: 1.10)
 Capacity: 1962 MiB
  CID: 1C535653-44432020-1000013C-7E007200
  CSD: 005E0032-5F5A83D5-2DB7FFBF-96800000
 Max. transfer speed: 25000000 Hz
 Manufacturer ID: 1C
 OEM/Application ID: 5356
 Product name: 'SDC  '
 Product revision: 1.0
 Serial no: 81022
 Manufacturing date: 2.2007
 Parameters:
            probe = 1
barebox@Phytec phyCORE-i.MX27:/ mkdir /d
barebox@Phytec phyCORE-i.MX27:/ mount /dev/disk0.0 fat /d
barebox@Phytec phyCORE-i.MX27:/ ls /d
barebox.bin
barebox@Phytec phyCORE-i.MX27:/

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-20 09:25:36 +02:00
Juergen Kilb 35b5a49dd9 phyCARD-A-L1: Create xload configuration.
This configuration can be used to use barebox as
x-loader replacement.
Also the ECC-Mode is changed from SOFT to BCH8.

Signed-off-by: Juergen Kilb <J.Kilb@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-20 09:21:27 +02:00
Juergen Kilb 8faceb6f53 pca-a-l1: added memory device for int. 60kB RAM.
Signed-off-by: Juergen Kilb <J.Kilb@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-20 09:21:27 +02:00
Juergen Kilb d0a14c26bf Added SDR-size auto detection.
Signed-off-by: Juergen Kilb <J.Kilb@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-20 09:21:14 +02:00
Jan Weitzel 454fbf2bfd gpmc: Add reset to gpmc_generic_init
Add reset to gpmc_generic_init as proposed by TRM.
This also fixes some strange timing issue while GPMC Initialization for
NAND OMAP4460

Signed-off-by: Jan Weitzel <j.weitzel@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-20 09:19:31 +02:00
Juergen Beisert 0d22e37ff8 ARM/Samsung: unify device registration for the S3C24XX SoCs
Barebox crashes since it has trouble with a resource size of 0. Most of the
S3C24XX based platforms crashes at runtime and can't use devices with resource
sizes of 0 anymore. This patch fix it by unifying the device registration for
all current Barebox's S3C24XX based platforms.

- A9M2410 and A9M2440 compile time tested only.
- Mini2440 also runtime tested.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
2012-07-20 08:41:34 +02:00
Juergen Beisert c0cf41f958 ARM/Samsung: be able to include the nand header multiple times
This is required in preparation for the following patches.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
2012-07-20 08:41:34 +02:00
Juergen Beisert 67e4d52b40 ARM/i.MX: add support to detect the reset source
Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-18 16:21:43 +02:00
Juergen Beisert 26cae7c740 ARM/Samsung: add support to detect the reset source
Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-18 16:21:43 +02:00
Christian Kapeller c817a14003 input: add i.MX51 platform code for matrix keypad driver
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-17 20:46:05 +02:00
Juergen Beisert 2f6b1f7690 ARM/MXS: the GPIO bitkeeper enable logic is inverse to the pullup enable logic
While a set bit enables the pullup (if exists) it disables the bitkeeper (if
exists). Both features are using the same register bit and only one of this
feature is present on a per pin base.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-16 23:30:14 +02:00
Sascha Hauer 75821bdef5 ARM: Enable unaligned accesses on armv6 and later
We have the following in the tree:

|commit af42feb9d2
|Author: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
|Date:   Mon Jan 2 11:49:17 2012 +0100
|
|    ARM: set SCTRL[A] only when architecture does not support unaligned access
|
|    Recent gcc generates code with unaligned access when architecture
|    supports it. Setting A bit unconditionally causes data-aborts on such
|    code rendering barebox unusable.
|
|    Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
|    Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>

What the patch tried is correct: We should set the A bit only when the architecture
does not support unaligned accesses. To figure out whether the architecture supports
unaligned accesses the patch tested for the U bit which is wrong. The U bit may be
0 after a reset, so instead of testing for the U bit we have to set it. This can
be done on armv6 and later. All others have the A bit set to trap unaligned accesses.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-10 19:07:15 +02:00
Antony Pavlov bdf8405e34 MIPS: remove unused processor-specific constants and macros
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-09 09:23:35 +02:00
Antony Pavlov b35fb39d32 MIPS: malta: register memory bank
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-09 09:23:35 +02:00
Maxime Ripard 6ee264d8e5 Add support for the Crystalfontz CFA-10036 board
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: Brian Lilly <brian@crystalfontz.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-04 22:15:27 +02:00
Jan Luebbe d2d4b99241 scripts/mkublheader: add program to produce an UBL image header
This image header is used for booting from SPI using the TI User
Boot Loader (UBL).

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-04 09:13:23 +02:00
Sascha Hauer 9df7cb676a ARM tqma53: switch to new environment
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-04 08:39:49 +02:00
Sascha Hauer 311a084313 ARM tqma53: Add standard flash header
So that bootm detects the image as a barebox image.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-04 08:39:19 +02:00
Sascha Hauer c6e82ee543 ARM i.MX51 babbage: Use correct select for new environment
It's HAVE_DEFAULT_ENVIRONMENT_NEW, not  DEFAULT_ENVIRONMENT_GENERIC_NEW

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-04 08:39:04 +02:00
Sascha Hauer cca17e25bf ARM mmu: flush page tables in arm_mmu_remap_sdram()
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-03 20:07:03 +02:00
Alexey Galakhov acca9e0c90 S5P DRAM support
Signed-off-by: Alexey Galakhov <agalakhov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-03 10:22:00 +02:00
Sascha Hauer d04ce5dfe7 Merge branch 'for-next/mxs-nand'
Conflicts:
	arch/arm/mach-mxs/Kconfig
	arch/arm/mach-mxs/Makefile
	drivers/Makefile
2012-07-02 11:08:03 +02:00
Sascha Hauer 1510c57e93 Merge branch 'for-next/resource-size'
Conflicts:
	drivers/base/resource.c
	fs/fs.c
2012-07-02 11:05:57 +02:00
Sascha Hauer 8c3daadecb Merge branch 'for-next/digi-connect-core' 2012-07-02 11:04:58 +02:00
Sascha Hauer 4f5862d884 Merge branch 'for-next/poweroff' 2012-07-02 11:04:44 +02:00
Sascha Hauer 93d4ea2ac8 Merge branch 'for-next/mips-clocksource' 2012-07-02 11:04:38 +02:00
Sascha Hauer 008d2ba8bf Merge branch 'for-next/mmuinfo' 2012-07-02 11:02:52 +02:00
Sascha Hauer f023835a79 Merge branch 'for-next/mxs-usb'
Conflicts:
	arch/arm/mach-mxs/Makefile
2012-07-02 11:02:39 +02:00
Sascha Hauer 4d499188bf Merge branch 'for-next/mxs-reset'
Conflicts:
	arch/arm/mach-mxs/Makefile
2012-07-02 11:02:10 +02:00
Sascha Hauer 1422cd1878 Merge branch 'for-next/mx28-ocotp'
Conflicts:
	arch/arm/mach-mxs/ocotp.c
2012-07-02 11:01:46 +02:00
Sascha Hauer a461805f26 Merge branch 'for-next/imx-clko' 2012-07-02 11:00:26 +02:00
Sascha Hauer f22d4e2778 Merge branch 'for-next/sparse' 2012-07-02 10:59:37 +02:00
Sascha Hauer 6e4b15537b Merge branch 'for-next/misc' 2012-07-02 10:59:30 +02:00
Sascha Hauer dd3c898d06 Merge branch 'for-next/dma-cache-align' 2012-07-02 10:59:22 +02:00
Sascha Hauer 649f558483 Merge branch 'for-next/defconfig' 2012-07-02 10:59:14 +02:00
Sascha Hauer 5f03074ea9 resource: store 'end' instead of 'size' in struct resource
Storing the size instead of the resource end in struct resource was
a mistake. 'size' ranges from 0 to UINT[32|64]_MAX + 1 which obviously
leads to problems. 'end' on the other hand will never exceed
UINT[32|64]_MAX. Also this way we can express a iomem region covering
the whole address space.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-01 08:18:53 +02:00
Wolfram Sang 1d3d060ab7 arm: mxs: add write support for ocotp
Since we now can change HCLK and VDDIO, we can now support writing to
OCOTP. Writing is done via a special data register. This is u32, so we
need to fill a temporary buffer when offset or count is not aligned. The
write is also protected by a special device variable.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 22:37:41 +02:00
Wolfram Sang dc069093c6 arm: mxs: use consistent naming for #defines for ocotp
Will the code more readable, especially since future additions are
planned.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 22:37:41 +02:00
Wolfram Sang 51f4b6926a arm: mxs: refactor timeout routine for ocotp
Let's keep the timeout routine in a central place. We will need it more
often when we add write support.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 22:37:41 +02:00
Wolfram Sang 27b1a89e27 arm: mxs: add functions to get/set vddio
Needed for ocotp write.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 22:37:41 +02:00
Wolfram Sang a264890e50 arm: mxs: refactor access to power domain
usbphy initializaion needs to access the power supply and has this
embedded. Refactor to a seperate power.c, since we need other accesses
in the future.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 22:37:41 +02:00
Wolfram Sang 0ee2603073 arm: mxs: add POWER_BASE for MX28, too
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 22:37:41 +02:00
Sascha Hauer 070bd46c9d ARM i.MX clocksource: put registers in iomem space
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 22:34:54 +02:00
Sascha Hauer a3d643a7f1 ARM i.MX speed: sparse fixes
- Add missing #include <mach/clock.h>
- add global functions to mach/clock.h

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 22:34:54 +02:00
Jan Luebbe 490867bbc3 mmuinfo: add a command do display the result of virtual to physical translation
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 22:06:21 +02:00
Sascha Hauer 3e503822c7 use loff_t for file offsets
This is a first step for 64bit file support: Make the file sizes/offsets
64bit.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 16:53:24 +02:00
Juergen Beisert af76fae0fe ARM/MXS: add new way to reset the whole SoC
Currently the watchdog is occupied for system reset. This usage collides with
the dedicated usage of a watchdog. This patch change the behaviour of at least
i.MX23/i.MX28 where the chipset supports a simple and powerful alternative
to reset the whole SoC (including the PMIC).

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 12:53:48 +02:00
Wolfram Sang 0256d59a41 ARM mxs: add bcb command to create 'boot control block' for NAND boot
We write a proper FCB, but no DBBT since it is unresolved how to keep it
in sync with Linux-based BBTs. Also, we imply searchcount = 4 and stride
= 64 (which is the default) until we can verify via ocotp.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
2012-06-30 12:53:36 +02:00
Wolfram Sang eb76c8e827 mtd nand: add mxs-nand driver
Based on the U-Boot version. Changed to kernel style register layout, added
MX23 support (WIP!), made MMU aware and adapted to barebox.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2012-06-30 12:53:36 +02:00
Wolfram Sang 4a39f83320 dma: add mxs-apbh-dma driver
Based on the U-Boot version. Changed to kernel style register layout, added
MX23 support, made MMU aware and adapted to barebox.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 12:53:36 +02:00
Sascha Hauer 364a2bb8ed ARM mxs: Add mxs_reset_block function
The i.MX23/28 have a reset block to reset several units.
Add a function to support this.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 12:53:36 +02:00
Wolfram Sang b20296bae5 arm: mxs: add imx_set_hclk
needed for writing the One-Time-Prgorammable

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 12:53:23 +02:00
Wolfram Sang 8a6877364a arm: mxs: make get_hclk result useable for upcoming set_hclk
To avoid getting a different divider due to rounding errors when using
set_hclk later, use DIV_ROUND_UP for the returned value.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 12:53:23 +02:00
Wolfram Sang ead6ec8b4f arm: mxs: get MAC from OCOTP for MX28EVK
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 12:53:23 +02:00
Antony Pavlov 41b05dc0da rzx50: add poweroff support
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 12:47:25 +02:00
Sascha Hauer e0ef3e6c7f ARM i.MX28 usb: Add USBPHY support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 12:47:15 +02:00
Sascha Hauer 1e8c05e402 ARM i.MX23 usb: move to SoC specific functions
Makes space for a i.MX28 specific USBPHY implementation.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 12:47:15 +02:00
Sascha Hauer 2fa9e369eb ARM i.MX51 babbage: add mci1
The iomuxer is already initialized, only need to add the device.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 12:47:04 +02:00