9
0
Fork 0
Commit Graph

9514 Commits

Author SHA1 Message Date
Sascha Hauer 0e526b8d77 ARM: i.MX51: Add USBH1 and USBH2 pinmux entries
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-18 09:03:18 +02:00
Sascha Hauer fb6f566c04 gpio: i.MX: initialize earlier
The i.MX gpio driver doesn't have dependencies, so initialize
it in a core_initcall to have the gpio functions available earlier.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-18 09:02:50 +02:00
Sascha Hauer 2260389da4 ARM: i.MX: Make timer available earlier
This moves the CCM drivers to core_initcall since this has no dependencies.
This way we can be sure that the clock for the clocksource is available in
at postcore_initcall time.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-18 09:02:44 +02:00
Sascha Hauer 49e94a4211 ARM: i.MX51: Adjust IPG_CLK_DIVR to 6:1
The same value as used in Mainline and Freescale U-Boot. This might
increase the stability of i.MX51 boards. The 5:1 ratio we have in barebox
probably goes back to copy/paste from the i.MX53 code.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-18 09:02:20 +02:00
Sascha Hauer c65f734d4b ARM: i.MX51 efikasb: call imx51_lowlevel_init from lowlevel init
Adjusting the PLLs when MMU/caching is already enabled seems to be
unstable on the Smartbook, so do it during early init.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-18 09:02:13 +02:00
Sascha Hauer 6ce708895c ARM: i.MX51: Make imx51_init_lowlevel callable from early init
imx_silicon_revision() can't be used from early init context, so
use imx51_silicon_revision() instead.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-18 09:02:08 +02:00
Sascha Hauer dac1ff16bc ARM: i.MX51: Use IIM for detecting silicon revision
The IROM is located at physical address 0x0, so reading the
silicon revision from it leads to a NULL pointer dereference
if done too late when the MMU is already enabled. Use the IIM
instead which is also done in the Kernel. This limits the silicon
revisions to 2.0 and 3.0, but I assume the earlier versions are
not seen in the wild anyway.

This also moves the call to imx_set_silicon_revision() out of
imx51_silicon_revision() so that imx51_silicon_revision() can be called
in early init context.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-18 09:02:04 +02:00
Alexander Shiyan d0ee2b12b9 ARM: pcm038: Add setup for MC13783 IRQ pin
Kernel does not have pinctrl driver for i.MX27 yet. When we using DT,
this cause to unable setup pins to desired function. This patch adds
a setup for MC13783 IRQ pin to avoid this issue.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-17 10:19:24 +02:00
Lucas Stach 40c4e61554 Revert "usb: chipidea-imx: Fix usb initialization"
This breaks HSIC and has no good justification why this would
be needed for ULPI.

This reverts commit 2e7d66f526.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-17 10:16:51 +02:00
Sascha Hauer 310cb17470 usb: ulpi: Try more often to detect a phy
Some boards need some more tries to successfully detect a phy. This
happens for example on the pcm038. Try up to four times to detect a
phy.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-17 10:16:46 +02:00
Alexander Shiyan 852481e9db ARM: ccmx51: Set PMIC SW1 voltage for i.MX51 less than TO3 only
This settings taken from original DIGI U-boot source code.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-17 09:16:13 +02:00
Alexander Shiyan bd5092f925 ARM: pcm038: Avoid warning if gadget support not compiled in
Without this patch the chipidea driver reports 'No supported role'
during runtime.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-17 09:11:33 +02:00
Alexander Shiyan 6d12ca692b ARM: ccmx51: Return error if module is not detected
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-11 17:32:52 +02:00
Alexander Shiyan ea66559825 ARM: ccmx51js: Add WP-pin definition for SDHC3
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-11 17:32:52 +02:00
Alexander Shiyan c5440066d5 ARM: ccmx51: Export available module GPIOs to barebox userspace
Patch will help to develop user devices connected to module, so
user can operate GPIOs in barebox console.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-11 17:32:52 +02:00
Alexander Shiyan 0339fe1d37 ARM: pcm038: Fix partition size definitions
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-11 17:25:17 +02:00
Jan Weitzel 48e8496950 OMAP4: Use default clock source for mcbsp
In omap4_enable_all_clocks we not only enable the mcbsp clocks, but also
change the source from ABE_24M_FCLK to 24M_FCLK. Revert this and default
to the reset state.

Signed-off-by: Jan Weitzel <j.weitzel@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-08 15:12:56 +02:00
Markus Niebel 699bcc9416 ARM: i.MX53: tqma53: update flash_header
Integrate errata fixes for SDCTL settings.

Signed-off-by: Markus Niebel <Markus.Niebel@tqs.de>
Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-08 15:06:43 +02:00
Markus Niebel 0b2735aad3 ARM: i.MX53: tqma53: move RAM setting to submenu
Signed-off-by: Markus Niebel <Markus.Niebel@tqs.de>
Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-08 15:06:43 +02:00
Markus Niebel 841a8a213a ARM: i.MX53: tqma53: fix board name in Kconfig
Signed-off-by: Markus Niebel <Markus.Niebel@tqs.de>
Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-08 15:06:43 +02:00
Philipp Zabel fb2b3e2cd4 ARM i.MX6: Fix bootsource detection
This patch fixes boot_mode detection for non-internal boot and
bootsource detection for i2c boot. Further, the bootsouce_instance
is now determined for spi, i2c, and mmc/sd boot.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-08 15:04:10 +02:00
Alexander Aring 842308e297 commands: add new memtest command
This new memtest can test the whole unused memory. The new memtest
command try to request the whole unused sdram regions on all banks and
run the mem_test routine from common/memtest.c on it.

The memtest command has only two parameters;
  -i	Amount of iterations, default 1, iteration of 0 is endless.
  -b	Set this to skip integrity check.(Do only a fast test for bus lines)

If MMU support is enable, memtest try to run memtest twice. The first with
cache enabled, the second with cache disabled.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-08 15:00:55 +02:00
Sascha Hauer 8fcc9cb237 ARM: i.MX6 DMO RealQ7: Switch to devicetree
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-06 16:21:32 +02:00
Sascha Hauer 9e97c970c4 ARM: i.MX6 RealQ7: switch to imximage
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-06 16:21:32 +02:00
Sascha Hauer 48939b0b70 ARM: i.MX6: Add sata device to devicetree
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-06 16:21:27 +02:00
Sascha Hauer b7ee4acb4a mfd: stmpe: Add devicetree probe support
Our driver matches stmpe-i2c and stmpe-spi. It seems the device
we really support is the stmpe1601, so use this one for matching
the devicetree compatible.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-06 16:17:17 +02:00
Sascha Hauer d4d6de78fd mtd: Align erase_op to eraseblock boundaries
Our erase command used to align to eraseblocks when necessary.
This worked well until recently when the m25p80, mtd_dataflash
and cfi flash were added / converted to mtd. This patch aligns
the input to the erase fileoperation to eraseblock boundaries.
Also tested with non uniform flashes with multiple eraseregions.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-06 16:17:05 +02:00
Sascha Hauer b4fee55d8b ata: i.MX sata: Add devicetree probe support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-06 13:47:58 +02:00
Sascha Hauer 769d1faaf5 ata: ahci: Allow 'detect' on hardware device
Hook the detect callback to the hardware device.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-06 09:42:16 +02:00
Sascha Hauer 6883fc4378 ata: implement detect
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-06 09:42:16 +02:00
Sascha Hauer 05002a942c ata: ahci: only use lba48 on drives which support it
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-06 09:42:16 +02:00
Sascha Hauer 7ffc9df31d ata: move ATA_ID_ fields and functions to include/
We need ata_id_has_lba48() in another C file, so move
the ATA_ID_* stuff to include/ata_drive.h like in the Linux
Kernel.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-06 09:42:16 +02:00
Alexander Aring 3275c7ea43 common: add memtest.c with mem_test routine
Add mem_test routine. Useful to detect timing problems if someone
porting a new device to barebox. This test includes a data bus test,
address bus test and integrity check of memory.

This mem_test routine has as parameter start and end address of testing
space. The last parameter can skip the integrity check.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-05 22:54:35 +02:00
Alexander Aring 47f9da4380 memtest: remove memtest command
Remove memtest command.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-05 22:54:34 +02:00
Alexander Aring 49686838a9 common: add ALIGN_DOWN macro
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-05 22:54:34 +02:00
Alexander Aring 71218359af common: fix codestyle in ALIGN macros
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-05 22:54:34 +02:00
Antony Pavlov 89825aed29 clk: fix warning: no previous prototype for 'clk_is_enabled'
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-05 22:34:04 +02:00
Sascha Hauer f696692b87 net: Set mac-address property
Linux normally has no idea how to retrieve MAC Addresses, but instead
expects the MAC address in the devicetree. This patch adds the MAC
address to the devicetree for Linux if we find a valid one in barebox.
This mechanism is limited of course to devices barebox has a driver for
and which are probed themselves from the devicetree.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-05 08:53:43 +02:00
S. Fricke e69ab77f79 ARM i.MX6: set imx6 silicon revision
This is mainly a backport of the imx6_revision function of
arch/arm/mach-imx/mach-imx6q.c in the linux kernel sources.

Signed-off-by: S. Fricke <sfricke@data-modul.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-05 08:51:52 +02:00
Antony Pavlov 1e2cc03914 MAKEALL: fix typos
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-05 08:50:54 +02:00
Antony Pavlov ebefdd4e0d MIPS: rzx50_defconfig: use UART1 for low-level debug
By default CONFIG_JZ4750D_DEBUG_LL_UART0 is selected.
This can confuse the Ritmix RZX50 user as the board
has only UART1 connected.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-04 07:18:42 +02:00
Antony Pavlov 1beb91a723 MIPS: rzx50: pbl: use debug_ll
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-04 07:18:42 +02:00
Antony Pavlov bf26aa0002 MIPS: unify ns16550 debug_ll support code
This commit moves the C debug_ll code from
the MIPS <debug_ll_ns16550.h> header file to
the MIPS <asm/debug_ll_ns16550.h> header file,
so the C code and the asm code can use the same
register address macros.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-04 07:18:42 +02:00
Antony Pavlov e79e946723 MIPS: malta: prepare for new debug_ll
Set fake DEBUG_LL_UART_DIVISOR to use <asm/debug_ll_ns16550.h>.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-04 07:18:42 +02:00
Antony Pavlov fcffb0d2c6 MIPS: rzx50: prepare for new debug_ll
Set DEBUG_LL_UART_DIVISOR to use <asm/debug_ll_ns16550.h>.

The JZ4755 uses 24 MHz as the main reference frequency (EXCLK).
The UART controller can work on full EXCLK or on EXCLK/2.
Just now we use EXCLK/2 legacy clock setup made by U-Boot.
So set UART controller base frequency to 12 MHz.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-04 07:18:42 +02:00
Sascha Hauer af4e312929 mci: Print more info
In devinfo for the card also print:

- capabilities for host and card
- current bus width
- current clock

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-03 11:17:04 +02:00
Sascha Hauer 2302fc6076 mci: rename capabilities flags
Use MMC_CAP_ names instead of MMC_MODE_. This makes it more
clear that these are capabilities of host/card and do not refer
to the current mode. These are in line with the Linux Kernel
except for MMC_CAP_MMC_HIGHSPEED_52MHZ which could be fixed
later.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-03 10:59:53 +02:00
Masaki Muranaka fbb12b3b9e Fix typo.
This fix is harmless and obvious.

Signed-off-by: Masaki Muranaka <monaka@monami-ya.jp>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-03 10:07:47 +02:00
Masaki Muranaka 56bd91c9a1 Remove a redundant line.
Signed-off-by: Masaki Muranaka <monaka@monami-ya.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-03 09:26:26 +02:00
Masaki Muranaka af5c5c8fb2 Remove ftstc(). It is declared but not implemented.
Signed-off-by: Masaki Muranaka <monaka@monami-ya.jp>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-03 09:16:11 +02:00