9
0
Fork 0
Commit Graph

12054 Commits

Author SHA1 Message Date
Sascha Hauer 71417412e2 ARM: am335x Phytec phyCORE: register SPI NOR and NAND update handlers
Additionally to the MLO update handlers also register the update
handlers for the regular barebox image.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-30 11:22:29 +02:00
Sascha Hauer 33e35f208e ARM: am335x: Add a NAND update handler for the regular barebox
To be able to not only update the MLO in NAND but also the
regular barebox image.
Since this is implemented with help of the corresponding xload
handler this also removes the 'xload' from the Kconfig options
and the filename.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-30 11:21:43 +02:00
Sascha Hauer 77b8c95e8b ARM: am33xx update SPI NOR: Ask use before flashing
Let the user confirm the update process before flashing the new
image.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-30 11:01:58 +02:00
Sascha Hauer 130d511909 ARM: am33xx update SPI NOR: Check image size before flashing
Test if the image fits into the partition before flashing it. Makes
the update process more safe.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-30 11:01:27 +02:00
Wjatscheslaw Stoljarski 68805a19b9 commands: usb: drop help for force rescan option
Signed-off-by: Wjatscheslaw Stoljarski <wjatscheslaw.stoljarski@kiwigrid.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-30 10:45:18 +02:00
Sascha Hauer 6ae9a40c79 startup: Don't print multiple lines with pr_info
Print the banner with pr_info, but the empty lines before and after
it with printf. This makes the banner show up in the log show up
properly.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-30 10:44:16 +02:00
Sascha Hauer 8af0569b7b clock: make get_time_ns() safe to be called without clocksource
make it possible to call get_time_ns() before the clocksource
has been registered. Just return 0 in this case which is still
better than crashing the system.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-30 10:44:15 +02:00
Sascha Hauer 96cae61eba clock: Add a variable with the first timestamp after startup
For measuring the startup time it's useful to save the first
timestamp after the clocksource has been registered.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-30 10:44:15 +02:00
Sascha Hauer 874d371f65 ARM: am335x_defconfig: Enable USB support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-26 21:36:58 +02:00
Sascha Hauer f59f20b953 Documentation: USB: Add description for OTG device
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-26 21:36:58 +02:00
Sascha Hauer bd27156aed ARM: dts: Update am335x-bone-common.dtsi
Update from current upstream dtsi. This enables the USB control
module.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-26 21:36:58 +02:00
Sascha Hauer 6850ccff66 USB: MUSB: Add barebox specific changes
This changes the MUSB support from the original Kernel state to
be usable with barebox. Tested on a custom board and the Beaglebone
Black. The host port on the Beaglebone works, the OTG port works
in device mode, but not yet in host mode.

Based on the initial MUSB port from Rolf Evers Fischer.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-26 21:36:58 +02:00
Sascha Hauer 12aeca8373 USB: Add MUSB driver from Linux
This adds the necessary files from the MUSB driver directly from Linux
3.17-rc5. No changes to the original files have been made so far.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-26 21:36:58 +02:00
Rolf Evers-Fischer e1b1d0f9ec ARM: AM33xx: Enable USB and USB phy clocks
These are necessary for USB support. To make sure they are actually
enabled when a USB capable barebox is started call the clock enable
function during startup also for the full barebox, not only the MLO.

Signed-off-by: Rolf Evers-Fischer <rolf.evers.fischer@delphi.com>
2014-09-26 21:36:58 +02:00
Sascha Hauer 98cbf263bd USB: gadget: allow multiple udc drivers
Since the MUSB driver will have it's own directory the Kconfig
entries won't be in drivers/usb/gadget/Kconfig. This is incompatible
with the current 'choice' approach for udc drivers. The udc drivers
do not implement the global usb_gadget_poll() anymore, so we can
drop the choice and allow multiple gadget drivers.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-26 21:36:57 +02:00
Sascha Hauer 18d588da74 USB: gadget: put poller into core
Instead of letting each driver implement usb_gadget_poll directly
implement this function in the core which then calls into the
drivers.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-26 21:36:54 +02:00
Sascha Hauer 0a2070b8fe ARM: AM33xx: Add AFI GF board support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-26 14:07:14 +02:00
Sascha Hauer 458fb8e646 ARM: AM33xx SPI MLO update handler: detect non CH images
The AM3xxx can boot images containing a Configuration Header
(generated with omap_signGP) or images with GP Header (simple
size/address information in front of raw image). Update the
SPI NOR barebox update handler to detect the GP Header images.
These have 0x65726162 ('bare') at the offset header[10]. Also
automatically swap the endianess for non swapped images so
that the regular non swapped images can also be flashed.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-26 09:57:18 +02:00
Sascha Hauer ad428bcb5d scripts: mk-am3xxx-spi-image: fix wrong assumptions about SPI images
We assumed that there is a special image format for SPI. This is not
the case. The AM33xx can boot either images generated with omap_signGP
or raw images which only have the image size and load address in front
of the image. Whether these images are booted from SPI or another
boot medium doesn't matter. The only special thing about SPI is that
the image is in big endian format.

- renames mk-am3xxx-spi-image.c to mk-omap-image.c as the image format
  is not only supported by AM3xxx but also by the OMAP SoCs
- removes the option to specify the SoC
- introduces -s to build a big endian image
- detects if an image already is an image generated with omap_signGP

So the behaviour is like this:

raw image -> mk-omap-image -> prepend size/address -> image for SD/MMC
raw image -> mk-omap-image -s -> prepend size/address, big endian swap -> image for SPI
CH image -> mk-omap-image -> nothing, input == output
CH image -> mk-omap-image -s -> big endian swap -> image for SPI

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-26 09:57:18 +02:00
Sascha Hauer 01beb0d5f2 USB: add usb phy header file
Mostly taken from the Linux Kernel to ease porting phy
handling code.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-26 08:49:21 +02:00
Sascha Hauer b1536a3298 USB: gadget: dfu: Add max_speed to dfu_driver
The MUSB driver checks for this field. If it doesn't contain
something useful the driver bails out.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-25 16:25:46 +02:00
Sascha Hauer bab50309e7 USB: gadget: fastboot: Add missing include
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-25 16:25:02 +02:00
Eric Bénard 8b8ffecb64 imx35-regs: add UART2 to CCM defines
Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-25 08:14:41 +02:00
Eric Bénard 690e392027 imx-image: handle i.MX35 special case
From the i.MX35 user manual :
Since MLC NAND Flash devices do not guarantee error-free boot blocks,
the i.MX35 boot code requires that the first 4 Kbytes of boot code be
duplicated in a subsequent block to serve as a second copy option.

Actually imx-image puts the image at 4k but it seems that the i.MX35
bootrom copies only from 8k as it expects that there is a copy of the
first 0-4k in 4k-8k (and is supposed to use this copy if there is an
ECC error in the first 4k) as we can see in the following lines :

barebox@Eukrea CPUIMX35:/  md -s /dev/nand0 0x0
00000000: ea0003fe eafffffe eafffffe eafffffe                ................
00000010: eafffffe eafffffe eafffffe eafffffe                ................
00000020: 65726162 00786f62 00000000 00000000
barebox.........

=-> header is @ 0 in flash

barebox@Eukrea CPUIMX35:/  md -s /dev/nand0 0x1000
00001000: 56341200 00000000 0001eda1 00000000                ..4V............
00001010: 00000000 00000000 00000000
00000000                ................

=-> so we have data @ 0x1000 in flash

barebox@Eukrea CPUIMX35:/  md 0x87f00000
87f00000: 00000000 00000000 00000000 00000000                ................
87f00010: 00000000 00000000 00000000
00000000                ................

=-> but we don't find this data in RAM

barebox@Eukrea CPUIMX35:/  md -s /dev/nand0 0x2000
00002000: ea000012 eafffffe eafffffe eafffffe                ................
00002010: eafffffe eafffffe eafffffe eafffffe                ................
00002020: 65726162 00786f62 00000000 00034272
barebox.....rB..

=-> so we have the image @ 0x2000 in flash

barebox@Eukrea CPUIMX35:/  md 0x87f01000
87f01000: ea000871 eafffffe eafffffe eafffffe                q...............
87f01010: eafffffe eafffffe eafffffe eafffffe                ................
87f01020: 65726162 00786f62 87f02000 0003b520                barebox.. .. ...

=-> and we find it in RAM

Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-25 08:13:24 +02:00
Raphaël Poggi 25bffd8a9a of: fdt: fix typo in header
Signed-off-by: Raphaël Poggi <poggi.raph@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-25 08:12:01 +02:00
Bo Shen 791ff495fb I2C: at91: fix the method for interrupt
As the i2c-at91 driver won't work in the interrupt mode,
so need to poll the interrupts.

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-25 08:10:56 +02:00
Raphaël Poggi a0ca2c13f6 i2c: at91: add support of device tree
Signed-off-by: Raphaël Poggi <poggi.raph@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-25 08:10:56 +02:00
Raphaël Poggi ccc282fb1b i2c: at91: add at91sam9x5 config
Signed-off-by: Raphaël Poggi <poggi.raph@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-25 08:10:56 +02:00
Raphaël Poggi d78e8051f3 i2c: at91: fix coding style issue
Signed-off-by: Raphaël Poggi <poggi.raph@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-25 08:10:56 +02:00
Teresa Gámez 9d50b34845 read_file_2: Fix return value
Set return value correct in error case.
This prevents barebox from crashing in some conditions.

Signed-off-by: Teresa Gámez <t.gamez@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-25 07:44:12 +02:00
Bo Shen 4c7d79ea53 ARM: at91: add sama5d4ek board support
Add Atmel sama5d4ek board support, which include following features:
  - NAND flash support
  - SPI flash support
  - MMC card support (MCI1)
  - LCD display support (with QT1070)
  - Ethernet support

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-24 06:46:53 +02:00
Bo Shen 06a0773ee3 ARM: at91: add sama5d4 soc support #2
Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-24 06:46:53 +02:00
Bo Shen 584ee421d8 ARM: at91: add sama5d4 soc support #1
Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-24 06:46:52 +02:00
Bo Shen 739c91e1c4 net: macb: enable GEM with only FE feature
If the GEM is used, however only FE featuren enabled, then it can not
support FBLDO configured as 16, and no RGMII/GMII configuratin bit.

So, in order to support GEM only with FE feature enabled, we do:
  - using default value for FBLDO.
  - using same bit for RMII/MII configuration as GEM for RGMII/GMII.

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-24 06:46:52 +02:00
Franck Jullien 9f0133d489 Subject: [PATCH] cfi: print size in human readable format
The CFI size is now printed in a human readable format.
It also adds "0x" prefix to the printed address.

Signed-off-by: Franck Jullien <franck.jullien@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-24 06:44:26 +02:00
Sascha Hauer 39479ba2cd ARM: mvebu: Allow multiple SoCs
Now that the correct SoC specific memory fixup function is called
we can allow to select multiple SoCs in Kconfig.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
2014-09-23 10:00:16 +02:00
Eric Bénard d760ff3d46 eukrea-cpuimx35: refresh configuration
Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-23 08:05:02 +02:00
Bo Shen 71692f1538 mci: atmel: add new ip version 0x600 support
Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-22 06:59:42 +02:00
Bo Shen b18d562321 nand: atmel: runtime to generate galois table
Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-22 06:59:35 +02:00
Bo Shen 3eedebff84 ARM: at91: clock: use cpu_has_pcr for pcr1 checking
Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-22 06:59:35 +02:00
Bo Shen 04ac43957c ARM: atmel: sama5d3 is a family member of sama5
As the sama5d3 is a family member of sama5, so only check sama5
family.

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-22 06:59:35 +02:00
Bo Shen b21d4115a1 ARM: at91: move pmc base address into soc header
As the PMC base address may be different between each SoC,
so move them to SoC header.

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-22 06:59:35 +02:00
Silvio Fricke ea569b0a7a ARM: i.MX: edmqmx6: free phy-reset gpio pin
Since 93a6c6a808("dts: update to v3.17-rc2") we have a correct gpio
configuration. This results in a double gpio request what receipted in a
error message like this one:

	gpiolib: _gpio_request: gpio-25 (phy-reset) status -16

Now with this patch the problem is gone.

Signed-off-by: Silvio Fricke <silvio.fricke@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-22 06:56:29 +02:00
Lucas Stach 2e4640448c net: asix: handle packets crossing URB boundaries
ASIX AX88772B started to pack data even more tightly. Packets and the ASIX packet
header may now cross URB boundaries. To handle this we have to introduce
some state between individual calls to asix_rx_fixup().

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Rolf: ported from kernel to barebox 2014.09.0 ]
Signed-off-by: Rolf Evers-Fischer <embedded24@evers-fischer.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-22 06:54:45 +02:00
Michael Olbrich b376b8d365 efi: use objcopy with CROSS_COMPILE prefix
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-19 09:56:03 +02:00
Sascha Hauer 163bfa46ae ARM: mvebu: Check for correct SoC in of_fixup callback
Only run the fixup when we are actually on the corresponding
SoC.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
2014-09-19 09:47:36 +02:00
Sascha Hauer 295f0b23b5 ARM: mvebu: Simplify memory init order
The initialisation of the memory nodes on mvebu is a bit
compilcated:

pure_initcall(mvebu_memory_fixup_register)
	of_register_fixup(mvebu_memory_of_fixup, NULL)
core_initcall(kirkwood_init_soc)
	mvebu_set_memory()
core_initcall(of_arm_init)
	of_fix_tree()
		mvebu_memory_of_fixup()

First a mvebu common of_fixup function is registered, then the SoC
calls mvebu_set_memory which stores the memory base and size in global
variables. Afterwards the of_fixup is executed which fixes the memory
nodes according to the global variables.

Instead register a SoC specific fixup which directly calls mvebu_set_memory
with the memory base and size as arguments:

pure_initcall(kirkwood_register_soc_fixup);
	of_register_fixup(kirkwood_init_soc, NULL);
core_initcall(of_arm_init)
	of_fix_tree()
		kirkwood_init_soc()
			mvebu_set_memory(phys_base, phys_size);

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-19 09:47:36 +02:00
Sebastian Hesselbarth 561dfebb4b ARM: mvebu: Add machine compatible to mbus ranges
Multi-SoC support for MVEBU will add mbus ranges for all compiled
SoCs. To protect the mbus node of the SoC barebox is executed on
from others ranges, pass machine's compatible to mvebu_mbus_add_range
and check before applying the fixup.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-19 09:47:35 +02:00
Sascha Hauer f94a71cb51 ARM: mvebu: Add common reset_cpu function
mvebu has a reset_cpu function per SoC this does not work when multiple
SoCs are selected, so add a common reset_cpu function which calls into
the SoC specific ones.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
2014-09-19 09:47:35 +02:00
Steffen Trumtrar 6deac63f98 ARM: i.MX6: add support for Karo TX6X family
The Karo TX6X family consists of different i.MX6Q/DL based System-on-Modules.
Add support for the TX6u 801x modules, that have an i.MX6DL SoC.

Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-19 07:45:03 +02:00