9
0
Fork 0
Commit Graph

750 Commits

Author SHA1 Message Date
Marc Kleine-Budde 39c350aa50 ARM i.MX bootsource: rename imx_27_boot_save_loc -> imx27_boot_save_loc
This patch renames imx_27_boot_save_loc() to imx27_boot_save_loc(), so that all
imx*_boot_save_loc() functions follow the same nameing sheme.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-26 10:20:17 +01:00
Marc Kleine-Budde c4f79aff8b ARM i.MX bootsource: imx_25_35_boot_save_loc: remove leftover do-nothing code
This patch removes some code leftover from:
    a029e32 ARM i.MX: rework bootsource setting
which is now a no-op.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-26 10:20:17 +01:00
Marc Kleine-Budde 9f6614d644 ARM i.MX bootsource: convert all imx*_boot_save_loc functions to void
This function gives all functions a common, i.e. void, return value.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-26 10:20:17 +01:00
Marc Kleine-Budde 19e5e04d81 ARM i.MX bootsource: convert enums from enum imx_bootsource to uppercase
Enums are in the same way as defines, so write them in uppercase.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-26 10:20:14 +01:00
Sascha Hauer 1512479a6e ARM: i.MX: Add bbu handler for external NAND boot
The external NAND boot code currently does not handle bad blocks
correctly on 2k NAND flashes. This patch adds a barebox_update
handler for external NAND boot which embeds a Bad block table in
the flashed image. The boot code will skip bad blocks found in
this bad block table then.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-12 11:04:33 +01:00
Sascha Hauer 6e2a07e32a ARM: i.MX: external nand boot: check for bad blocks
The i.MX external NAND boot code checks for a bad block every
page, which is wrong. Instead, check for a bad block at the
beginning of each block.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-12 10:21:14 +01:00
Sascha Hauer 19486d492f Add DMO RealQ7 board support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-11 09:19:55 +01:00
Sascha Hauer 09a2a3aacd ARM i.MX6: Add mmdc calibration support
This adds support for the various DDR calibration functions in the
i.MX6 MMDC.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-11 09:16:41 +01:00
Sascha Hauer 3f8a1c0be2 ARM i.MX: Add double include protection for generic.h
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-10 11:09:40 +01:00
Sascha Hauer 9eefa7445e include asm/sections.h instead of asm-generic/sections.h
To let the architectures override asm-generic/sections.h

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-10 11:05:46 +01:00
Sascha Hauer 019712525a ARM boards: Use accessor functions to access linker variables
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-07 12:38:01 +01:00
Sascha Hauer 678832e17a Merge branch 'for-next/usb' 2013-03-04 09:21:54 +01:00
Sascha Hauer 13408877f4 Merge branch 'for-next/misc' 2013-03-04 09:21:37 +01:00
Sascha Hauer 908bc8ce45 Merge branch 'for-next/imx' 2013-03-04 09:21:37 +01:00
Sascha Hauer 74421f2f47 ARM i.MX pcm043: Switch to new environment
- switch to new environment
- make barebox partitions 512K big
- update defconfig for new env:
  - enable menu support
  - miitool support
  - clk commands
  - oftree support
  - let/dirname/readlink commands
  - enable external nand boot support

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-27 08:57:04 +01:00
Alexander Shiyan 4a963a2513 ARM: i.MX: Replace numbers with predefined constants in several places
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-26 15:08:36 +01:00
Sascha Hauer 457c038f83 ARM i.MX35: Let MAX clk be in run-mode-on
The reset value for the MAX clk gate is 0b10, that is it is turned
on in CPU run mode and off in stop mode. Configure it that way during
startup.

The 0b11 value previously in this field causes some nasty behaviour in
the Linux kernel:

- The i.MX35 has two bits per clock gate which are decoded as follows:
  0b00 -> clock off
  0b01 -> clock is on in run mode, off in wait/doze
  0b10 -> clock is on in run/wait mode, off in doze
  0b11 -> clock is always on

The MAX clock is needed by the SoC, yet unused in the Kernel, so the
common clock framework will disable it during late init time. It will
only disable clocks though which it detects as being on. This detection
is made depending on the lower bit of the gate. So with the value of
0b11 the clock framework will detect the clock as turned on, yet unused,
hence it will turn it off and the system locks up.
With the value of 0b10 instead, the clock framework will detect the
clock as being disabled and will not try to turn it off, so the
system works.

The real bug is in the Linux clock framework. However, the value 0f 0b10
seems to be a sane default value, so restore it. This lets Linux work
again and gives time to fix the bug in Linux.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-26 11:00:30 +01:00
Sascha Hauer 94466be718 ARM i.MX: Fix booting from NOR when external nand boot is enabled
We cannot jump to SDRAM unconditionally in imx*_barebox_boot_nand_external.
When we really boot from NOR flash the binary is not yet copied to SDRAM.
Instead, let the return value of imx_barebox_boot_nand_external() indicate
whether we really boot from NAND and only jump to SDRAM in this case.
Otherwise just continue to the normal SoC specific entry.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-26 11:00:25 +01:00
Alexander Shiyan 5f19b73344 ARM: i.MX27: Use DEVICE_ID_SINGLE for IIM, CCM and ESDCTL
Only one of IIM, CCM or ESDCTL device is allowed, so use DEVICE_ID_SINGLE
for these devices.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-25 08:57:40 +01:00
Alexander Shiyan fac23aaccd ARM: pcm038: Select IIM by default
PCM038 uses IIM in board code, so select IMX_IIM symbol by default.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-25 08:57:40 +01:00
Jean-Christophe PLAGNIOL-VILLARD 0d8ce86780 switch boards to lwl-y
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-21 14:42:51 +01:00
Alexander Shiyan bbc0b6bc15 mfd: Using MFD_xx prefix for symbols
This patch provides rename MFD-related symbols for using MFD-prefix.
Additionally, sorting mfd/Kconfig and mfd/Makefile records.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-18 09:21:08 +01:00
Sascha Hauer a6b1f17d5d ARM i.MX21: Fix device names for gpio
The i.MX21 has a imx1 gpio type. Change the name accordingly, otherwise
the gpio driver does not probe successfully.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-15 16:43:03 +01:00
Sascha Hauer 9a98894c1a ARM i.MX35: Fix device names for gpio
The i.MX35 has a imx31 gpio type. Change the name accordingly, otherwise
the gpio driver does not probe successfully.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-15 16:41:43 +01:00
Sascha Hauer 1943567163 ARM i.MX6: Fix HSIC pad definitions
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-14 09:55:50 +01:00
Hubert Feurstein b0917935dd ARM i.MX6: Add support for SabreSD board
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-12 10:00:56 +01:00
George Pontis 3fa377ae66 i.MX53 i2c, add support for third i2c interface
Signed-off-by: George Pontis <gpontis@spamcop.net>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-11 20:56:19 +01:00
Jean-Christophe PLAGNIOL-VILLARD c49819d903 arm: rename reset and common_reset to barebox_arm_reset_vector and arm_cpu_lowlevel_init
reset is confusing with the cpu reset and impossible to grep

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-08 09:35:40 +01:00
Sascha Hauer f2a8e35898 ARM i.MX boards: switch to barebox_arm_entry
Most i.MX boards can use the imx*_barebox_entry functions. The remaining
(i.MX21, i.MX6) use hardcoded base addresses.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-04 15:52:39 +01:00
Sascha Hauer cf4271ee12 ARM i.MX: prepare external nand boot for SoC specific entry
i.MX will get SoC specific entry points for barebox. To find the
correct one we have to call these from the SoC specific
imx*_barebox_boot_nand_external functions.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-04 15:52:38 +01:00
Sascha Hauer 028ae2ba6e ARM i.MX: Add i.MX specific entry point for barebox
Additionally to the generic entry point the i.MX specific ones
calculate the SDRAM size automatically so the boards do not have
to care.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-04 15:52:38 +01:00
Sascha Hauer ce2b453a79 ARM i.MX: Use SRAM stack in lowlevel code
Several i.MX boards setup a temporary stack in their lowlevel code.
Instead of using STACK_BASE use a stack in internal SRAM to get rid
of the STACK_BASE compile time dependency.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-04 15:52:38 +01:00
Sascha Hauer 9c5172fac2 Merge branch 'for-next/imx-usb-chipidea' 2013-02-04 15:48:53 +01:00
Sascha Hauer 265e6da19d Merge branch 'for-next/imx' 2013-02-04 15:48:53 +01:00
Sascha Hauer a01e54d201 treewide: fix format specifiers
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-27 14:24:10 +01:00
Sascha Hauer f791295528 Merge branch 'pu/imx-external-nand-boot' into for-next/imx 2013-01-21 13:53:20 +01:00
Sascha Hauer 6e45abe47e ARM i.MX: Add a common NAND entry for external boot mode
The pattern for i.MX boards starting in external NAND boot mode is always
the same:

- Check if we are running in NFC address space, if not call
  board_init_lowlevel_return()
- copy binary to link address
- execute relocated binary
- call imx_nand_load_image()

Add a common function for this to make the board code easier.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-20 16:53:46 +01:00
Sascha Hauer fdc5a0cbfc ARM i.MX6: Add Chipidea support
This allows to register the USB ports for the chipidea driver. For
now the otg/h1 register functions also register the corresponding
USB phys.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-20 11:15:00 +01:00
Sascha Hauer bb2e752fb6 ARM i.MX6: Add usbphy clocks
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-20 11:08:47 +01:00
Sascha Hauer 59a22cb392 ARM i.MX6: Fix usb phy base addresses
What we had as usb phy1 base address is really usb phy2. Fix the names
and add the missing base address definition for usb phy1.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-20 11:07:50 +01:00
Sascha Hauer f051557a74 ARM i.MX6 USB phy: Fix phy function names
The imx6_usb_phy1* functions are misnamed. It's usb phy2 that is configured
here, so rename the functions accordingly.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-20 11:06:08 +01:00
Sascha Hauer 34b9298145 Merge branch 'pu/tx25' into for-next/imx 2013-01-18 11:25:15 +01:00
Sascha Hauer f8ca3d92e3 ARM Ka-Ro Tx25: Switch to new environment
Also update config for supporting external NAND boot.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-18 11:24:58 +01:00
Sascha Hauer 1ce154f0bb ARM i.MX25: Add missing device registration for the iomux
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-18 11:24:10 +01:00
Daniel Mierswa 39390eea26 i.MX27: fix shift amount for PCCR1_PERCLK3_EN
Signed-off-by: Daniel Mierswa <d.mierswa@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-17 19:02:42 +01:00
Daniel Mierswa 0f7bff88f0 i.MX21/27: don't enable lcd bus clocks too early
On the MX27 based board phycard-i.MX27 the display won't properly
come up.
Before removing imx-regs.h and the code that sets the register
in the i.MX video driver, the PCCR registers were set _after_
the screen start (LSSAR) was set.
This restores that old behaviour and makes the display come up
properly again.
I did not have a chance to test this on any other i.MX27 or i.MX21
hardware though I assume that the "old" order is required there
too.

Signed-off-by: Daniel Mierswa <d.mierswa@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-17 19:02:42 +01:00
Daniel Mierswa 1d37166cb2 i.MX21: Add periph. clock register name macros
Also put those names solely in the .c file as it's done with
the i.MX27 code.

Signed-off-by: Daniel Mierswa <d.mierswa@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-17 19:00:18 +01:00
Sascha Hauer 885694f827 Merge branch 'pu/efikasb' into for-next/imx 2012-12-17 11:29:20 +01:00
Sascha Hauer 40bd757243 Merge branch 'pu/usb' into for-next/imx
Conflicts:
	arch/arm/mach-imx/include/mach/devices-imx31.h
2012-12-17 08:45:49 +01:00
Sascha Hauer 3117c6f7bc ARM i.MX51: Add support for the Efika MX Smartbook
The Efika MX Smartbook is a i.MX51 based netbook. This patch adds
nearly full support for it including:

- USB
- SD card slots
- Internal SPI NOR flash
- Internal flash PATA drive
- LEDs

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-17 08:42:32 +01:00
Sascha Hauer de3c258d41 mci i.MX esdhc: Allow to specify devicename from platformdata
For boards which need to have persistent names for the device file.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-17 08:42:32 +01:00
Sascha Hauer 1690746c3a ARM i.MX31: Add USB device functions
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-13 22:18:47 +01:00
Sascha Hauer 20f2dae6d2 ARM i.MX51: Add USB device functions
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-13 22:18:47 +01:00
Sascha Hauer 9524e95a9b ARM i.MX27: Add USB device functions
Register the USB misc devices and provide convenience wrappers to
register the USB ports for i.MX27.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-13 22:18:47 +01:00
Sascha Hauer bce4fecc4e ARM i.MX31: Add mmc register convenience functions
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-12 21:53:59 +01:00
Sascha Hauer d74be493f7 ARM i.MX31: sync iomux with kernel
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-12 21:53:58 +01:00
Sascha Hauer 6dbf674089 ARM i.MX31 pcm037: Switch to new environment
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-12 21:53:58 +01:00
Sascha Hauer 679f5277ff ARM i.MX31: Fix gpio device names
Has to be imx31-gpio, not imx-gpio.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-12 21:01:21 +01:00
Sascha Hauer 11cb1620fe esdctl: fix reset default bug on i.MX27/31
The i.MX27/31 have the second chip select enabled by reset default.
This can be considered as a hardware bug, because even boards which
need this settings cannot work out of reset because of the missing
initialization sequence. Detect this reset default setting and disable
this chipselect then to be able to properly detect the SDRAM size.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-12 19:59:38 +01:00
Sascha Hauer 8030ab24fa Merge branch 'kconfig' 2012-12-08 12:22:21 +01:00
Alexander Shiyan 4c20f9af97 Cleanup Kconfig files
This patch provides a global cleanup barebox Kconfig files. This includes
replacing spaces to tabs, formatting in accordance format, removing
extraneous lines and spaces. No functional changes.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-08 12:22:12 +01:00
Sascha Hauer 0ae4b1e827 Merge branch 'for-next/imx'
Conflicts:
	arch/arm/mach-imx/include/mach/devices-imx53.h
2012-12-07 16:43:12 +01:00
Sascha Hauer c3a84a3f76 Merge branch 'for-next/ext4' 2012-12-07 16:42:04 +01:00
Sascha Hauer 4bdb250c9f Merge branch 'for-next/clk' 2012-12-07 16:42:04 +01:00
Sascha Hauer cc7f346f24 ARM i.MX5: Add SATA support
Add the convenience wrappers for registering the SATA device.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-07 12:19:45 +01:00
Sascha Hauer 5a12d90361 ARM i.MX6: Add sata device
This also adds and enables the clocks needed for SATA.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-06 14:25:18 +01:00
Sascha Hauer 2ff02e7aa1 ARM i.MX: Add i.MX51 PATA device support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-06 13:52:54 +01:00
Sascha Hauer 77fd727b89 ARM i.MX6: save boot location
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-06 13:43:29 +01:00
Sascha Hauer 8e9a1d9943 ARM i.MX bbu internal: Add spi/i2c support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-06 13:43:29 +01:00
Sascha Hauer 1ad78f3c80 ARM i.MX bbu: Add i.MX6 MMC handler
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-06 13:43:29 +01:00
Sascha Hauer d476789db6 ARM i.MX: Add Garz+Fricke Vincell Board support
This adds support for the Garz+Fricke Vincell board. This has
a i.MX53 Processor with 512MB of DDR3 RAM.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-06 13:43:28 +01:00
Sascha Hauer d117a2d5c8 ARM i.MX esdctl: Use defines from exisiting header file
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-06 13:43:27 +01:00
Sascha Hauer 744696bbfc ARM i.MX: add esdctl-v4 support
This adds support for initializing DDR3 RAMs on the i.MX53 type
SDRAM controller. The code automatically detects size/layout of
the connected RAM, detects the bus width and which chipselects are
populated.
While I believe this code is not 100% generic, it is far too
sophisticated to stay in a single board directory. I'm sure
other boards could make use of this aswell.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-06 13:43:10 +01:00
Sascha Hauer e8fa8b5ccf ARM i.MX5: move pll setup defines to header file
The pll setup function is exported, so it makes sense to export
the convenience wrappers for specific frequencies aswell.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-06 13:43:10 +01:00
Sascha Hauer a32d081d6d ARM i.MX bbu: Allow to have no DCD
Some boards do not have a DCD table since they initialize everything
in code, so allow to skip it and leave the corresponding pointers
empty.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-06 13:43:09 +01:00
Sascha Hauer 0e9ba6c384 ARM i.MX bbu: Allow to overwrite app_dest
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-06 13:43:09 +01:00
Sascha Hauer 042a8c8d06 ARM i.MX: register esdctl controller device
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-06 13:43:09 +01:00
Sascha Hauer 4fa54b7e5d ARM i.MX: Add driver to get sdram base and size
The code initializing the SDRAM controller is not at the same
place where SDRAM is registered with barebox. To reduce the
risk of registering wrong SDRAM sizes this patch adds a
driver for the ESDCTL which reads back the configured SDRAM
size and registers the memory found with barebox.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-06 13:43:08 +01:00
Sascha Hauer 984eae1f2f ARM i.MX6 clk: remove gate_mask from pllv3
Not needed as we will handle the additional gate bits as gate.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-06 12:59:27 +01:00
Sascha Hauer 85e4576d6a ARM i.MX6 pllv3: Do not use delay functions
We may be called very early, before the timer is available,
so don't use it here.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-06 12:55:56 +01:00
Sascha Hauer c753cb36f9 ARM i.MX6: rename PLLs according to datasheet
In recent reference manuals the plls were renumbered. PLL8 now is
PLL6 and vice versa. Change the code according to the reference
manual to avoid confusion.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-06 12:54:00 +01:00
Sascha Hauer 35526632ff ARM i.MX6: fix ethernet PLL rate
The ethernet PLL has a fixed frequency of 500MHz. What is adjustable
are additional dividers which we better describe separately.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-06 12:51:00 +01:00
Sascha Hauer 65c1ee9cc0 ARM i.MX53 loco: switch to new default env
Also, update defconfig file for this. Significant changes:

- Compile in Thumb2 mode
- Use pbl lzo compressed image

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-05 19:48:53 +01:00
Sascha Hauer ea2be760d4 i.MX debug_ll support
This adds lowlevel debug functions for i.MX. As we have a great variety
of different UARTs on i.MX currently no Kconfig support for chosing the
correct one is added. Instead we expect the user to add the correct
define and issue a compiler warning if he hasn't.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-05 19:48:53 +01:00
Christian Kapeller 0a6da02621 imx53: implement imx53_add_kpp
Allows usage of imx keypad driver in imx53 platforms

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-05 19:48:10 +01:00
Sascha Hauer 6e92d42d48 ARM i.MX bbu: Fix wrong buffer free
buf is still needed, instead mbr should be freed.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-03 20:04:46 +01:00
Sascha Hauer 5e74263762 filetype: Pass bufsize
Pass the buffer size to the file detection code. This makes sure we do not
read past the buffer. This is especially useful for ext filesystem detection
as the magic is at byte offset 1080. Also introduce a FILE_TYPE_SAFE_BUFSIZE
define which is set to the minimum bufsize the detection code needs to detect
all known filetypes.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-03 11:23:25 +01:00
Sascha Hauer abb5c25bbb i.MX27 regs remove unnecessary include
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-27 21:01:09 +01:00
Sascha Hauer 6e94a6d8db ARM i.MX esdctl.h: Add double include protection
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-27 20:51:10 +01:00
Sascha Hauer c7fc9be893 ARM i.MX bbu: Fix compiling with DEBUG enabled
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-27 20:51:03 +01:00
Robert P. J. Day b33114aad1 mach-imx: Add/correct help info in mach-imx/Kconfig
Update help info, it's slightly out of date, and a grammatical fix.
No functional change.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-20 09:00:56 +01:00
Christoph Fritz cc37eb4a4d i.MX25 & 35 usb config bits : fix host power bit
This patch sets HPM (Host power mask bit) to bit 16 according to i.MX
Reference Manual. Falsely it was set to bit 8, but this controls pull-up
Impedance.

Reported-by: Michael Burkey <mdburkey@gmail.com>
Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-19 11:08:14 +01:00
Robert P. J. Day 1b6041a662 mach-imx: Comment typo fix, "enviroment" -> "environment"
A couple trivial spelling fixes.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-19 10:14:11 +01:00
Sascha Hauer bf38ac7b89 Merge branch 'for-next/imx'
Conflicts:
	arch/arm/boards/guf-neso/lowlevel.c
	arch/arm/boards/pcm038/lowlevel.c
	commands/Makefile
2012-11-16 14:01:09 +01:00
Sascha Hauer daac8bf5d3 Merge branch 'for-next/bcm2835'
Conflicts:
	arch/arm/configs/versatilepb_defconfig
2012-11-16 14:00:34 +01:00
Uwe Kleine-König 56371f4e84 iomux-imx35: add missing comma in pad definition
The same issue was fixed in the Linux kernel in commit

	66ddfc6 (mx35: add a missing comma in a pad definition)

for 2.6.33-rc7.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-01 16:32:12 +01:00
Sascha Hauer 6f13282949 Merge branch 'for-next/gpio' into for-next/bcm2835 2012-10-21 10:48:14 +02:00
Sascha Hauer f207ca79a0 ARM i.MX: Add barebox update handler for internal boot
This adds support for an update handler for internal boot. Currently
handled are:

- v1 MMC/SD
- v2 MMC/SD
- v2 NAND

where v1 is found on i.MX25, i.MX35 and i.MX51. v2 is found on i.MX53.

This code intentionally does not use the DCD data compiled into every
i.MX internal boot image. This makes it possible to make a pure second
stage barebox bootable on i.MX internal boot devices later.

This has been tested on the i.MX51 babbage, i.MX53 loco and i.MX53 tx53
board.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-17 20:23:42 +02:00
Sascha Hauer 7b84676763 ARM i.MX53: set bootsource location
To be able to set the environment location based on the
bootsource.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-17 20:22:58 +02:00
Sascha Hauer 3bbe8a9ea4 ARM i.MX tx53: Add rev xx30 board support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-17 20:22:58 +02:00
Sascha Hauer 4ad34853f1 ARM i.MX53: enable imx53_init_lowlevel for pbl
The KARO Tx53 board in the revision 8030 has an instable SDRAM
setup. It works as long as the MMU is disabled, but the board
crashes at arbitrary places once the MMU gets enabled. So we
need the PLL setup early. Enable it for pbl.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-17 20:22:58 +02:00
Sascha Hauer b1b76f6027 ARM i.MX: get rid of imx-regs.h
- remove now unused __REG definitions
- include individual SoC register files instead of imx-regs.h
- move IMX_GPIO_NR to generic.h
- finally remove imx-regs.h

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-17 20:22:02 +02:00
Sascha Hauer ee372b8f28 ARM i.MX27: remove duplicate ESDCTL registers
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-17 20:22:02 +02:00
Sascha Hauer 86d9ed1cc5 ARM i.MX27: move PCCR gate registers to its only user
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-17 20:22:02 +02:00
Sascha Hauer 6a9d37e579 ARM i.MX27: Cleanup remaining unprefixed registers
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-17 20:22:02 +02:00
Sascha Hauer 11b1757937 ARM i.MX21: Cleanup remaining unprefixed registers
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-17 20:22:02 +02:00
Sascha Hauer 926cccc9d5 ARM i.MX1: Cleanup remaining unprefixed registers
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-17 20:22:02 +02:00
Sascha Hauer 4c53af062b ARM i.MX: remove unused improperly prefixed register defines
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-17 20:22:02 +02:00
Sascha Hauer d089e3caa5 ARM i.MX external nand boot: Use SoC specific base addresses
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-17 20:22:02 +02:00
Sascha Hauer dc9d70e239 ARM i.MX35: Cleanup remaining unprefixed registers
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-17 20:22:02 +02:00
Sascha Hauer 1092bde80c ARM i.MX25: Cleanup remaining unprefixed registers
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-17 20:22:01 +02:00
Sascha Hauer a8c6359667 ARM i.MX31: Cleanup remaining unprefixed registers
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-17 20:22:01 +02:00
Sascha Hauer 632b04f8a6 ARM i.MX nand layout: make multisoc safe
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-17 20:22:01 +02:00
Sascha Hauer 7a334ccdec ARM i.MX: Use SoC specific base to access sdram controller registers
This redefines the sdram controller registers as offsets to the base
rather than as absolute addresses. All users are fixed to use the
SoC specific base address.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-17 20:22:01 +02:00
Sascha Hauer aaad5cbad7 Merge branch 'for-next/clk' into for-next/imx
Conflicts:
	drivers/net/fec_imx.c
2012-10-17 20:21:46 +02:00
Sascha Hauer 09efce4ad3 Merge branch 'for-next/imx-work' into for-next/imx
Conflicts:
	arch/arm/mach-imx/imx1.c

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-17 08:49:18 +02:00
Sascha Hauer e6f224a553 Merge branch 'for-next/imx-watchdog' into for-next/imx 2012-10-17 08:49:00 +02:00
Sascha Hauer f393758c53 Merge branch 'for-next/imx-dt' into for-next/imx 2012-10-17 08:48:54 +02:00
Sascha Hauer f36c792109 ARM i.MX: Print silicon revision in common place
Rather than doing this in the SoC specific code just print
it in imx_set_silicon_revision. This saves some lines of code
and also results in i.MX27 now also having the silicon revision
printed during startup.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-15 19:44:36 +02:00
Sascha Hauer a029e32d7f ARM i.MX: rework bootsource setting
This moves the known i.MX bootsource settings to a single file
so that the code can be shared. Also we add a enum for the different
boot sources so that it can be used in C Code and not only on the shell.
The pcm038 board is changed to use it instead of digging in the registers
manually.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-15 19:44:36 +02:00
Sascha Hauer a4c8692240 ARM i.MX: Enable clocks in common place
On i.MX we enable all necessary clocks during startup of the clock
controller driver, so we do not need the register hacking in the drivers
anymore.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-10 09:47:51 +02:00
Sascha Hauer beda98485c ARM i.MX25: Add lcdc per gate
This gate is used to enable/disable the lcd controller, hence we
need a gate for it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-10 09:47:51 +02:00
Sascha Hauer c1cc2c2f55 ARM i.MX27: Add lcdc per gate
This gate is used to enable/disable the lcd controller, hence we
need a gate for it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-10 09:47:51 +02:00
Sascha Hauer 1563d42c42 ARM i.MX21: Add lcdc per gate
This gate is used to enable/disable the lcd controller, hence we
need a gate for it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-10 09:47:51 +02:00
Sascha Hauer 71ca72c4e4 ARM i.MX21: Enable all needed clocks during startup
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-10 09:47:51 +02:00
Sascha Hauer aab96efadc ARM i.MX21: Fix CSPI parent clock
It's perclk2, not perclk3

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-10 09:47:51 +02:00
Sascha Hauer 0b177de1a4 ARM i.MX: Add clk_gate inline function
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-10 09:47:51 +02:00
Sascha Hauer cec48e77b8 ARM i.MX25: Enable all needed clocks during startup
This enables the following clocks on i.MX25:

PER: esdhc1, esdhc2, i2c, nfc, owire, pwm, uart
AHB: emi, esdhc1, esdhc2, fec, lcdc, usbotg
IPG: cspi1, cspi2, cspi3, esdhc1, esdhc2, fec, gpt1, gpt2, gpt3, gpt4,
iim, LCDC_EN, pwm1, pwm2, pwm3, pwm4, spba, tsc, uart1, uart2, uart3,
uart4, uart5

These are hopefully all the clocks we need for barebox.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-10 09:47:38 +02:00
Sascha Hauer 2155bc5ba8 ARM i.MX: move reset source detection code
- for i.MX1 the register is in the System Control unit, so move
  the code to arch/arm/mach-imx/imx1.c
- for the other i.MX the register is in the watchdog unit, so move
  the code to drivers/watchdog/imxwd.c

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-08 21:41:36 +02:00
Sascha Hauer bad4d7cd75 ARM i.MX gpio: fix of gpio base
of_alias_get_id() returns the number of the gpio bank, so we have
to multiply with 32 to get the gpio base.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-07 18:46:42 +02:00
Sascha Hauer cff3972712 ARM i.MX: Turn iomux-v3 into driver
To get proper resources allocated for it and to get rid of IMX_IOMUXC_BASE
usage.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-05 20:03:04 +02:00
Sascha Hauer 3525a8e4e8 ARM i.MX: Turn iomux-v2 into driver
To get proper resources allocated for it and to get rid of IOMUXC_BASE
usage.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-05 20:03:04 +02:00
Sascha Hauer d553125983 ARM i.MX iomux-v1: Add separate header file
- Add a separate header file for the iomux-v1 just like done for
  iomux-v3.
- initialize iomux from SoC code so that we do not depend on IMX_GPIO_BASE
  anymore.
- define registers as offset to the base rather than absolute addresses

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-05 20:03:04 +02:00
Sascha Hauer 3f35afd996 ARM i.MX1: move iomux definitions to separate header file
Just like we have a separate file for the other i.MX SoCs.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-05 20:03:04 +02:00
Sascha Hauer 5003e4ddc8 ARM i.MX: streamline imx_silicon_revision
All i.MX SoCs now use the same imx_silicon_revision() function to get
the revision. Add a separate header file for it and a common function
used on all SoCs.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-05 20:03:01 +02:00
Sascha Hauer 4008d0a34a ARM i.MX27: Use standard IMX_CHIP_REV_* defines
We have IMX_CHIP_REV_* defines which are used for most i.MX SoCs.
Use them for i.MX27 aswell.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-05 20:02:34 +02:00
Sascha Hauer aa64d57898 ARM i.MX: Add devicetree support to the ccm drivers
This adds the compatible strings to the CCM drivers.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-05 12:34:19 +02:00
Sascha Hauer 258e096e13 net fec_imx: determine fec version based on device ids
This adds the device id mechanism to the i.MX fec driver and
uses it to determine the fec version. Also adds devicetree
probing support.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-05 12:32:37 +02:00
Sascha Hauer 3e1f8a05b9 serial i.MX: Use devtype data to determine uart version
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-05 12:32:06 +02:00
Sascha Hauer 797bc5d911 ARM i.MX/watchdog: Make i.MX watchdog driver the reset source on i.MX
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-05 12:24:04 +02:00
Sascha Hauer 83f87b14eb ARM i.MX: Add watchdog devices to SoCs
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-05 12:23:35 +02:00
Jean-Christophe PLAGNIOL-VILLARD 695b8b49f5 gpio: provide generic gpio header
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-10-05 15:04:54 +08:00
Sascha Hauer 47d237e58a Merge branch 'for-next/fixes' 2012-10-04 15:25:12 +02:00
Sascha Hauer 94de405d8f Merge branch 'for-next/imx-clk' 2012-10-04 15:24:57 +02:00
Sascha Hauer e3e2ebb3ad ARM i.MX clocksource: fix timer source selection
- The i.MX1 timer does not have IPG clock as source, so rename
  the define accordingly
- for the i.MX31 timer we want to use the per clock, not the ipg
  clock.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-04 15:21:04 +02:00
Sascha Hauer d4edd480b2 ARM i.MX: Remove old clock support
The old clock support is now unused. Remove it. The former i.MX clko
command is superseeded by generic clock manipulation commands.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-04 15:19:57 +02:00
Sascha Hauer d510df23a0 ARM i.MX: Switch clocksource to clk_get
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-04 15:19:56 +02:00
Sascha Hauer b01f7e13b7 ARM i.MX35: Switch to common clk
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-04 15:19:56 +02:00
Sascha Hauer 018a986393 ARM i.MX21: Switch to common clk
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-04 15:19:56 +02:00
Sascha Hauer 555a1ff0c3 ARM i.MX6: Switch to common clk
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-04 15:19:56 +02:00
Sascha Hauer 44947a3bcd ARM i.MX31: Switch to common clk
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-04 15:19:56 +02:00
Sascha Hauer 13ccfddded ARM i.MX1: Switch to common clk support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-04 15:19:56 +02:00
Sascha Hauer ef38819eaa ARM i.MX5: Switch to common clk support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-04 15:19:56 +02:00
Sascha Hauer 3e40a76cba ARM i.MX25: Switch to common clk support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-04 15:19:55 +02:00
Sascha Hauer c422abc4e5 ARM i.MX27: implement clk support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-04 15:19:55 +02:00
Sascha Hauer 809549b1bf ARM i.MX: initial clk support
This adds the basic i.MX common clk support and some pll and pfd
drivers.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-04 15:19:55 +02:00
Sascha Hauer 83b0ed7fbf ARM i.MX25: Add function to setup chipselect
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-04 15:19:54 +02:00
Sascha Hauer aea42202d5 ARM i.MX35: Add function to setup chipselect
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-04 15:19:54 +02:00
Sascha Hauer 5552a1f51d ARM i.MX31: Add function to setup chipselect
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-04 15:19:54 +02:00
Sascha Hauer 9f5d274099 ARM i.MX21: Add function to setup chipselect
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-04 15:19:54 +02:00
Sascha Hauer a36a8f5d1b ARM i.MX1: Add function to setup chipselect
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-04 15:19:53 +02:00
Sascha Hauer 8b88e6dadb ARM i.MX: Add header file for WEIM cs setup
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-04 15:19:53 +02:00
Sascha Hauer fcd2ece1c2 ARM i.MX51: Use defines rather than hardcoded addresses
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-04 15:19:53 +02:00
Sascha Hauer 02480b3a74 ARM i.MX/MXS: Allow to include imx*-regs.h directly
In fact we can be happy about everyone including the files directly.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-04 15:19:53 +02:00
Sascha Hauer ed07306aa8 ARM i.MX25: give register base addresses a proper MX25_ prefix
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-04 15:19:53 +02:00
Sascha Hauer 1d609aceae ARM i.MX27: give register base addresses a proper MX27_ prefix
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-04 15:19:53 +02:00
Sascha Hauer 5455ecea55 ARM i.MX1: give register base addresses a proper MX1_ prefix
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-04 15:19:53 +02:00
Sascha Hauer 1abd9ab08f ARM i.MX21: give register base addresses a proper MX21_ prefix
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-04 15:19:53 +02:00
Sascha Hauer 862a868069 ARM i.MX35: give register base addresses a proper MX35_ prefix
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-04 15:19:52 +02:00
Sascha Hauer ad09b59f8b ARM i.MX31: give register base addresses a proper MX31_ prefix
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-04 15:19:52 +02:00
Jean-Christophe PLAGNIOL-VILLARD 3c5327e660 switch all platform_bus device/driver registering to platform_driver/device_register
now register_driver and register_device are for bus only usage.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-10-04 15:19:12 +02:00
Sascha Hauer d1e65d2a7b Merge branch 'for-next/remove-fsf-address'
Conflicts:
	drivers/net/miidev.c
	include/miidev.h
2012-10-03 21:12:48 +02:00
Sascha Hauer 4517b5980f Merge branch 'for-next/misc' 2012-10-03 21:10:57 +02:00
Sascha Hauer 80ba2cac0e Merge branch 'for-next/karo-tx53' 2012-10-03 21:10:42 +02:00
Sascha Hauer d4541ee94f Merge branch 'for-next/driver' 2012-10-03 21:09:34 +02:00
Jan Luebbe bdc3be380f gpio: reduce verbosity while probing
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-28 16:34:21 +02:00
Sascha Hauer ba8c0a47ae ARM i.MX: add debug for iomux-v3
iomux setup often is the source of great fun. Add some debug printf
for it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-28 16:20:13 +02:00
Sascha Hauer 33a8fa16c6 ARM i.MX: Add devicetree support for clocksource driver
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-23 21:15:13 +02:00
Sascha Hauer 01bd66c9a2 ARM i.MX: add devicetree support for gpio driver
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-23 21:15:12 +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
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
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 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 813aa7c2cc ARM i.MX21: Add missing include
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-14 11:59:42 +02:00
Eric Bénard 298d15571d i.MX51: unbreak FEC iomux
in commit 2bdc9f57a8 the iomux was synced
with the kernel but this leads to some changes in the PAD_CTRL of some
FEC pins leading to a non working FEC on our cpuimx51 board.

This patch set back the PAD_CTRL of the missing pins to the initial
value.

Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-07 10:28:17 +02:00
Sascha Hauer bed1a6ffab Merge branch 'for-next/pbl' 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 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 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
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
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
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
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 7b1afaeaeb Merge branch 'for-next/tqma53' 2012-08-01 17:50:22 +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 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 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
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
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
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
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
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
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
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 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 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 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 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
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
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
Alexander Shiyan 2b0aa00921 i.MX51: Added support for "clko" command
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 12:46:55 +02:00
Alexander Shiyan 9ec34264f0 i.MX clko: Added support for more than one CLKO outputs
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 12:46:55 +02:00
Alexander Shiyan 3e2ed9423f I.MX clko: Using strtol function instead strtoul for getting argument for clko source
This change is necessary because valid source argument for the clko command
can be negative.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 12:46:55 +02:00
Alexander Shiyan fe25781a1b ARM: initial ConnectCore® i.MX51 board support
This patch adds support for ConnectCore® i.MX51 board from Digi International.
A separate option includes support for debugging board for this module.
Some code taken from the bootloader U-Boot and patch from Digi.
Functional of Ethernet not tested yet.

barebox 2012.05.0-00316-g4024d9c-dirty #0 Wed Jun 6 13:08:25 MSK 2012

Board: ConnectCore i.MX51
Module Variant: i.MX515@600MHz, PHY, Acceleromter (0x0b)
Module HW Rev : 02
Module Serial : B111156789
mc13xxx-spi@mc13xxx-spi0: Found MC13892 ID: 0x0045d0 [Rev: 2.0a]
NAND device: Manufacturer ID: 0x2c, Chip ID: 0xda (Micron NAND 256MiB 3,3V 8-bit)
Bad block table found at page 131008, version 0x01
Bad block table found at page 130944, version 0x01
nand_read_bbt: Bad block at 0x00ce0000
nand_read_bbt: Bad block at 0x05bc0000
nand_read_bbt: Bad block at 0x0bc40000
ehci@ehci0: USB EHCI 1.00
detected i.MX51 rev 3.0
imx-esdhc@mci0: registered as mci0
imx-esdhc@mci1: registered as mci1
Malloc space: 0x95f00000 -> 0x97efffff (size 32 MB)
Stack space : 0x95ef8000 -> 0x95f00000 (size 32 kB)
envfs: wrong magic on /dev/env0
no valid environment found on /dev/env0. Using default environment
running /env/bin/init...

Hit any key to stop autoboot: 3
barebox@ConnectCore i.MX51:/

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 12:46:12 +02:00
Alexander Shiyan 68b32be492 i.MX51: Synchronize iomux header file from kernel
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 12:46:12 +02:00
Sascha Hauer 497d1c49f4 Merge branch 'next' 2012-06-06 14:11:57 +02:00
Alexander Shiyan 434782f84a i.MX51 clock: Added USB clock to dump_clocks command.
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-31 09:00:07 +02:00
Alexander Shiyan 1ce7966745 i.MX51 clock: Added lp_apm clock support for frequency calculations.
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-31 09:00:07 +02:00
Alexander Shiyan 4d2c24fa34 ARM i.MX: Possible bug fixed due misspelling when copy/paste
We must check pointer to function rather than result.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-29 11:09:31 +02:00
Alexander Shiyan b2533ec18e i.MX51: Raise frequency for SDHC by switch to PLL2 source
Currently, both SDHC clock source is PLL3. We can raise clock
for SDHC driver by change source from PLL3 to PLL2.
Below, is debug ouputs with old and new settings.

Detection (PLL3):
set clock: wanted: 400000 got: 375000
Operation (PLL3):
set clock: wanted: 25000000 got: 18000000
Operation SD4.0 (PLL3):
set clock: wanted: 52000000 got: 27000000

Detection (PLL2):
set clock: wanted: 400000 got: 399639
Operation (PLL2):
set clock: wanted: 25000000 got: 23750000
Operation SD4.0 (PLL2):
set clock: wanted: 52000000 got: 41562500

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-25 08:39:43 +02:00
Sascha Hauer 5e490ffd5d Merge branch 'pu/defenv-2' into next 2012-05-23 22:29:56 +02:00
Alexander Shiyan 0f888c289e PCM970: Added support for CompactFlash
Added support for CompactFlash cards for PCM970 development board via
PCMCIA window.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-23 19:02:02 +02:00
Sascha Hauer f105c1f3d2 ARM Freescale i.MX51 babbage: switch to new default env
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-21 09:11:40 +02:00
Sascha Hauer 3d37d661ed ARM pcm038: Switch to new environment
This switches the pcm038 board to the new environment template and
does the necessary defaultconfig adjustments. Additionally it disables
UBI support as the pcm038 image is getting bigger and bigger and UBI
seems to be the most unused big (in size) feature.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-18 12:26:52 +02:00
Alexander Shiyan 12179b4c91 i.MX51: Added helper for SDHC3 registration.
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-17 12:14:26 +02:00
Alexander Shiyan a0c76b0d7c i.MX51: Changed naming registers and procedures for SPI
This patch reflects real naming of SPI by Freescale.
We have two ECSPI channels and one CSPI.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-17 12:14:26 +02:00
Alexander Shiyan 0c5554919c PCM038: Initial PCM970 development board support
Some devices need to be moved to the PCM970 source file later, because
in fact these devices are not installed on the main unit PCM038.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-13 11:12:43 +02:00
Jean-Christophe PLAGNIOL-VILLARD 8e6f45f54f complete: add empty complete support
for cpuinfo, clear, dhcp, false, login, lsmod, meminfo, passwd, pwd, reginfo,
reset, true, usb, version

for mach-imx and mach-mxs: dump_clocks
for u_serial: mycdev

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-04-30 20:37:40 +08:00
Sascha Hauer ba361ee78f Merge branch 'pu/mx6-v2' into next
Conflicts:
	arch/arm/Makefile
	arch/arm/mach-imx/Kconfig

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-24 10:38:23 +02:00
Sascha Hauer 79b7b546b9 ARM: initial Freescale i.MX6q Armadillo2 support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-24 10:31:48 +02:00
Sascha Hauer 2e7db33d4b ARM: add initial i.MX6 support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-24 10:31:44 +02:00
Alexander Shiyan 4ff04d6503 Merge silicon definitions i.MX35, i.MX51 and i.MX53
Also definition can be modified in arch/arm/boards/pcm043/lowlevel.c,
but I am not sure is we can call imx_silicon_revision() from
board_init_lowlevel().

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-19 08:47:49 +02:00
Sascha Hauer 86b9eb2105 Merge branch 'work/dns' into next 2012-04-16 11:34:41 +02:00
Sascha Hauer abe4560c8a Use DEVICE_ID_DYNAMIC where applicable
We now have DEVICE_ID_DYNAMIC for dynamic allocation of device ids,
Use it where applicable.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-16 09:43:02 +02:00
Christian Kapeller 767dd5fa3b Add board support for Karo TX51 i.mx51 SODIMM module.
Supported devices:
 - nand
 - ethernet
 - mmc0, mmc1 (on stk5v3 development board)
 - led (on stk5v3 development board)

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-15 18:42:33 +02:00
Sascha Hauer d66d79eefb Merge branch 'work/iomux-v3' into next
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-13 10:47:43 +02:00
Sascha Hauer ed921b0401 Merge branch 'work/usb' into next 2012-04-13 10:46:52 +02:00