9
0
Fork 0
Commit Graph

7699 Commits

Author SHA1 Message Date
Sascha Hauer 86dcc1754e spi imx: dt support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-23 21:15:12 +02:00
Sascha Hauer 26eab97b41 net fec_mpc5200: Use same platform_data as i.MX fec driver
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-23 20:35:20 +02:00
Sascha Hauer 1af6fdcd03 ARM i.MX51 babbage: update defconfig
Reenable DEFAULT_ENVIRONMENT_GENERIC_NEW which got lost somewhere.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-21 10:33:52 +02:00
Sascha Hauer bf3b7c6a8f mtd mtdraw: fix fixing partial page read
toread is unitialized. We have to use count instead.

| commit 992c291e95
| Author: Sascha Hauer <s.hauer@pengutronix.de>
| Date:   Sat Sep 15 16:54:47 2012 +0200
|
|    mtd mtdraw: Fix partial page read
|
|    When reading parts of a page we have to limit the maximum bytes copied
|    to the remaining bytes of a page.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-20 09:01:03 +02:00
Franck Jullien 466e505fd9 fs/fat: Handle MBR on the first sector
Use filetype to detect FAT boot sector.
Add support for disk with MBR on the first sector.

Signed-off-by: Franck Jullien <franck.jullien@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-20 08:58:00 +02:00
Franck Jullien 010ee209b7 filetype: Improve FAT detection
We may have some disk with MBR as a first sector. In this case, the
current FAT check returns an error. However, the FAT sector exist and
the MBR can tell us where it is.

This patch add to file_name_detect_type function the ability to find
the FAT boot sector on the first sector of the first partition in case
it is not on sector 0.

It also introduce is_fat_or_mbr to check if a buffer is a FAT boot
or MBR sector

Signed-off-by: Franck Jullien <franck.jullien@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-20 08:57:58 +02:00
Jean-Christophe PLAGNIOL-VILLARD 660809446f net/tap: use xzalloc to allocate data
this will ensure the data are set to 0 (list as example)

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-20 08:50:59 +02:00
Jean-Christophe PLAGNIOL-VILLARD fc5caa43a8 sandbox: do not register device before barebox is started
This will crash when use registered bus with device registered to it.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-20 08:50:59 +02:00
Jean-Christophe PLAGNIOL-VILLARD 48842b9b25 sandbox: check only image option in the second getopt
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-20 08:50:59 +02:00
Jean-Christophe PLAGNIOL-VILLARD dadcac8b38 MAKEALL: accept defconfig with '-' in it
replace '-' with '_' for the configuration option

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-19 19:33:13 +02:00
Franck Jullien 94d8f732c2 nios2: Fix DMA functions when CPU has no dcache
Signed-off-by: Franck Jullien <franck.jullien@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-19 19:31:30 +02:00
Sascha Hauer 2fef30b560 serial i.MX: oftree support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-17 18:14:40 +02:00
Sascha Hauer 6a2262de50 ARM i.MX: implement clocksource as driver
To get rid of the register definitions in the SoC header files.
platform_device_id is used to distinguish between gpt types.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-17 18:14:37 +02:00
Sascha Hauer 77322aa896 Treewide: remove address of the Free Software Foundation
The FSF address has changed in the past. Instead of updating it
each time the address changes, just drop it completely treewide.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-17 10:57:41 +02:00
Jan Luebbe 13e657f712 drivers/net: add driver for the EMAC device found in some TI SoCs
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-17 10:54:50 +02:00
Sascha Hauer ed744a0929 Barebox Logo
in logo/ you will found the barebox logo with color or white
 in:
  - png24 (transparent)
  - png8 (black background)
 
 for the following size
  - 100x100
  - 200x200
  - 400x400
  - 600x600
  - 800x800
 
 The logo are origanize in a way to be able to include them in the envfs
 by just point as it.
 
 A vector version will be published later
 
 Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJQVdRIAAoJEOrjwV5ZMRf2Q0oQAIErPCsnMigjWk2CyGI66vzH
 ryd1fEq3/4FK0XByrvB/tu/NJ59fHv9ZXtwZZq5JvXJgA62I7UpCqIEz1BjbLM9n
 CYAZlshCIJvOXQziwRhRDUuDEfH42mpsl/C4xdyEyD8vJTf7fWZGFN7//Ve/Urgw
 63kH/tM0hsKwnNrAbEkJwvEk1H4+eUJy31xMfBc977trM9lu09CDC9Mqpdj76FIf
 IJys9FZz1i85+XxtfAOEklaIp4EQZMlyqBnANWAqGf8jVkZ50yQ9M6+0rYkAl/U4
 SHkDXMIkcOCRJ5q9KIWchGlbCwnxQTchYMUlj1H4k6jMtCdJu/60MGetWET7BzmH
 4GFc+7TAnb3Dya1lQUJ1Am/3f0GUCYhhnOfPOtrU9T6lu8lfKJ8DVTWaZqoJNHVf
 UvmR/nryUJeq20BCCmiWwzp1/923biR7LeDodnzqmFqXC43GlAl4Cj2oTbxbdAR8
 W5g53ogBupNmRA7p2S0tx7/BVbjMQCuO2uNJuEc+lHu/oas060IODri4LZHpGxvL
 fYoqg+T35fjyi1Cy9+HysNylhbNkkuEAjpA4mgalq2rmoAQ2MsxIVIEl1guryY9J
 t5qI2RNOs4PALsPr2FMqviwsFnijKVhoU2ybsXAsO4OLuyq00Zy3CEA4IW+fL5Bu
 0FUygwPvBZdUSUdnwbM3
 =pKKv
 -----END PGP SIGNATURE-----

Merge tag 'logo' of git://git.jcrosoft.org/barebox into for-next/logo

Barebox Logo

in logo/ you will found the barebox logo with color or white
in:
 - png24 (transparent)
 - png8 (black background)

for the following size
 - 100x100
 - 200x200
 - 400x400
 - 600x600
 - 800x800

The logo are origanize in a way to be able to include them in the envfs
by just point as it.

A vector version will be published later

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-09-17 10:28:31 +02:00
Sascha Hauer d24bb0538d ARM mmu: use xmemalign
So we do not silently fail.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-16 22:12:16 +02:00
Sascha Hauer b1ae1bd243 Make: Fix if_changed when command contains backslashes
The call if_changed mechanism does not work when the command
contains backslashes. This basically is an issue with lzo
and bzip2 compressed kernels. The compressed binaries do not
contain the uncompressed image size, so these use size_append
to append the size. This results in backslashes in the executed
command. With this if_changed always detects a change in the
command and rebuilds the compressed image even if nothing
has changed.

Fix this by escaping backslashes in make-cmd

This was worked out together with Jan Lübbe. The same patch
has recently been accepted to the kernel.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
2012-09-16 22:10:22 +02:00
Sascha Hauer 992c291e95 mtd mtdraw: Fix partial page read
When reading parts of a page we have to limit the maximum bytes copied
to the remaining bytes of a page.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
2012-09-16 22:09:36 +02:00
Jean-Christophe PLAGNIOL-VILLARD f8bd06e49f add barebox logo
in logo/ you will found the barebox logo with color or white
in:
 - png24 (transparent)
 - png8 (black background)

for the following size
 - 100x100
 - 200x200
 - 400x400
 - 600x600
 - 800x800

The logo are origanize in a way to be able to include them in the envfs
by just point as it.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-09-16 21:29:33 +08:00
Jean-Christophe PLAGNIOL-VILLARD 0b3c3e7794 net: catch error on eth_send
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-09-16 20:39:07 +08:00
Sascha Hauer 4399f34203 ARM mxs: Clear USB boot mode during startup
When the i.MX28 boots from USB, the ROM code sets this bit. When
after a reset the ROM code detects that this bit is set it will
boot from USB again. This means that if we boot once from USB the
chip will continue to boot from USB until the next power cycle.

To prevent this (and boot from the configured bootsource instead)
clear this bit here. This bit is not documented in the datasheets,
it was figured out the hard way. Whether this is the same on i.MX23
is currently not known.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-16 11:05:22 +02:00
Sascha Hauer cd1cfdfdb9 ARM i.MX TX53: Add defconfig
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-16 10:54:19 +02:00
Sascha Hauer ae50b6287a ARM i.MX: Add Ka-Ro TX53 board support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-16 10:54:14 +02:00
Marcus Folkesson 7d4d295d4e mtd: nand: extend NAND flash detection to new MLC chips
Some of the newer MLC devices have a 6-byte ID sequence in which
several field definitions differ from older chips in a manner that is
not backward compatible.

This method is already used in the Linux Kernel.

Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-16 09:55:58 +02:00
Jan Luebbe aa577bfc6d drivers/nor/cfi_flash: use IS_ENABLED instead of an ifdef
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-16 09:55:18 +02:00
Jan Luebbe 68bc34d416 drivers/nor/m25p80: add MTD support
This has been tested by using UBI with a N25Q128 connected to
a TI McSPI controller.

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-16 09:55:18 +02:00
Steffen Trumtrar 526a745f68 ARM i.MX6: fix usb_ehci warnings for sabrelite
This fixes the following warnings:

arch/arm/boards/freescale-mx6-sabrelite/board.c: In function 'sabrelite_ehci_init':
arch/arm/boards/freescale-mx6-sabrelite/board.c:265:2: warning: implicit declaration of function 'imx6_usb_phy1_disable_oc' [-Wimplicit-function-declaration]
arch/arm/boards/freescale-mx6-sabrelite/board.c:266:2: warning: implicit declaration of function 'imx6_usb_phy1_enable' [-Wimplicit-function-declaration]

Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-16 09:49:19 +02:00
Steffen Trumtrar 12ff9ed703 ARM i.MX6: add usb function prototypes
Add missing prototypes to mach/usb.h

Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-16 09:49:17 +02:00
Sascha Hauer edd582ee63 mips: remove undefined local_irq_save/local_irq_restore
mips currently uses local_irq_save and local_irq_restore
which are not defined. Drop them.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Antony Pavlov <antonynpavlov@gmail.com>
2012-09-16 09:47:46 +02:00
Wolfram Sang fbe8f642b9 net: tftp: timeout only after a proper amount of time
Currently, the timeout when waiting for packages is smaller than the
timeout communicated to the TFTP server for retransmitting. Make sure we
wait at least for two retransmissions before giving up.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-14 13:58:30 +02:00
Sascha Hauer fdf74cafd6 ARM i.MX: Use platform_device_id for gpio driver
So we get the type of the gpio controller from the device

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-14 13:35:49 +02:00
Sascha Hauer 5888a3b5c9 spi: add oftree support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-14 13:35:47 +02:00
Sascha Hauer 813aa7c2cc ARM i.MX21: Add missing include
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-14 11:59:42 +02:00
Sascha Hauer ca77bd8f03 of: Add devicetree partition parsing
Helper code to probe mtd partitions from the devicetree.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-14 11:47:42 +02:00
Sascha Hauer f4eb950535 oftree command: Add devicetree probe support
With this the -p option is no longer for parse, but for probe instead.
Using this parses a devicetree given on the command line and probes
the devices found in this tree. Devices which already exist are not
probed again, but instead their device_node is attached to the existing
device.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-14 11:47:42 +02:00
Sascha Hauer 58f3457f4f of: add devicetree probing support
This adds code to probe devices from a devicetree. Most helper
functions are directly imported from Linux.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-14 11:47:42 +02:00
Sascha Hauer b2a13798a6 driver: add dev_get_drvdata function
Drivers need to get their driver data either from devicetree or the platform
information. It should matter for the driver where this data comes from, so
introduce a common function for it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-14 11:47:42 +02:00
Jan Luebbe d836d76d97 drivers/net/ksz8864rmn: add driver for Micrel KSZ8864RMN Ethernet Switch
It starts the switch and provides basic access to the registers.

This driver could also work with some other Micrel switches, possibly
with some small changes.

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-14 11:47:42 +02:00
Sascha Hauer 420815465e driver: Add platform_device_id mechanism
It is common for drivers to handle multiple similar devices. On
Linux the driver can distinguish between the devices using the
platform_device_id mechanism. Introduce the same for barebox.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-14 11:47:42 +02:00
Sascha Hauer 08a7d5a625 driver: rewrite dev_printf as a function
Printing device context normally should be "driver instance:",
but instead we printed the device name twice. This patch fixes
this and as a bonus makes the binary a bit smaller. Instead of
a '@' between driver and instance this function now prints a
whitespace which is a bit more like Linux.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-14 11:47:42 +02:00
Sascha Hauer 75265ae527 I2C: Put I2C devices on their own bus
This patch adds a I2C bus on which the I2C devices and drivers register.
This makes it cleaner as I2C devices won't accidently end up probed by
a platform_device driver.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-14 11:47:41 +02:00
Sascha Hauer 617bfbcbeb SPI: Put SPI devices on their own bus
This patch adds a SPI bus on which the SPI devices and drivers register.
This makes it cleaner as SPI devices won't accidently end up probed by
a platform_device driver.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-09-14 11:47:24 +02:00
Sascha Hauer 4def29f141 mfd mc34708: Separate I2C and SPI probe
Upcoming patches will put I2C/SPI on their own busses with
spi_register_driver / i2c_register_driver which will only
be available if the subsystem is enabled. We could provide
static inlines, but it wouldn't make much sense to compile
a spi/i2c driver if the corresponding subsystem is disabled.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-14 11:47:09 +02:00
Jan Weitzel dc159b414f pcm049 phycard l + xl2: update partion sizes
Use 512k NAND Partion for barebox in enviroment and boards code
pcm049: use 4MB for kernel

Signed-off-by: Jan Weitzel <j.weitzel@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-14 09:28:04 +02:00
Eric Bénard 79101c609c miidev: fix 1G wrong detection
since 99e72c8bbd on an i.MX51 based board,
I get : "phy0: Link is up - 1000/Full". It seems miidev tries to probe
the PHY to early and gets 0x3ffff which leads to the wrong capabilities
setting.

Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-14 09:03:03 +02:00
Franck Jullien f33ba0125d Fix endianness error on be target
Use be(xx)_to_cpu function to switch endianness intelligently.

Signed-off-by: Franck Jullien <franck.jullien@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-14 08:40:10 +02:00
Franck Jullien 83507f2891 Add OpenRISC Image type
This patch sync the image type list with the kernel in order to add
openrisc support.

Signed-off-by: Franck Jullien <franck.jullien@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-14 08:39:33 +02:00
Franck Jullien 9a5963dfd8 Add __ashrdi3 and remove link to libgcc
In a previous patch, Sascha needed to add __ashrdi3 and then linked
to libgcc. This patch add the ashrdi3 function in the arch/openrisc/lib
directory and remove the libgcc dependency.

Signed-off-by: Franck Jullien <franck.jullien@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-14 08:39:33 +02:00
Jean-Christophe PLAGNIOL-VILLARD 9b22271b7b defaultenv-2: boot reset linux.bootargs.dyn. and bootm. globalvar
This is need for boot sequence to do not have the previous boot param.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-09-14 00:46:00 +08:00