9
0
Fork 0
Commit Graph

2738 Commits

Author SHA1 Message Date
Steffen Trumtrar 097513b8f8 ARM: zynq: add clk support for zynq7000
This adds support for the clocktree on zynq7000 SoCs.
The patch is based on clocks.c from the larger patch
	ARM: zynq: add suppport for Zynq 7000 SoC
by Josh Cartwright.

The driver in that patch is converted to a platform_driver and code to
enable plls was added.

Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-27 09:23:49 +01:00
Steffen Trumtrar 1bb8460fc1 ARM: zynq: Add new architecture zynq
Add basic support for the Xilinx Zynq-7000 EPP architecture.
The Zynq-7000 is an embedded processing platform that combines a Cortex A9
dualcore MPSoC with an Artix-7 FPGA.

Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-27 09:23:48 +01:00
Sascha Hauer f1e1dc306d ARM i.MX ESDCTL: Fix default enabled esdctl v2 controller
On some i.MX SoCs the SDRAM controller has chipselect 2 enabled
by reset default. This confuses our SDRAM size detection. We
already have a fix for this in place. This patch adds the fix
for i.MX35 which needs it aswell. Also since we now detect the
SDRAM size in the SoC specific entry functions we have to apply
the fixup there, too.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-26 10:23:01 +01:00
Sascha Hauer d46a8eebcd ARM: OMAP: beagle: Add missing MMC iomux setup
When the board is booted from NAND we have to setup the iomux to
make the SD card work. Unfortunately this still is not enough :(
The SD card still will only work when booting from it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-04 17:00:23 +01:00
Sascha Hauer b7451329b5 ARM: OMAP3: invalidate L2 cache using ROM API
Code taken from U-Boot. This makes the beagle board much more
reliable.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-04 17:00:23 +01:00
Jean-Christophe PLAGNIOL-VILLARD 2ecdea32dd switch more boards to lwl-y
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-04 09:23:45 +01:00
Sascha Hauer 13b4e37c1c Merge branch 'for-next/vexpress' 2013-03-04 09:21:54 +01:00
Sascha Hauer 678832e17a Merge branch 'for-next/usb' 2013-03-04 09:21:54 +01:00
Sascha Hauer ea0f831cd0 Merge branch 'for-next/mxs' 2013-03-04 09:21:54 +01:00
Sascha Hauer 62ee96bd3b Merge branch 'for-next/mtd'
Conflicts:
	arch/arm/configs/eukrea_cpuimx27_defconfig
	drivers/mtd/core.c
2013-03-04 09:21:49 +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 831d83e922 Merge branch 'for-next/highbank' 2013-03-04 09:21:37 +01:00
Sascha Hauer 1eb77960b8 Merge branch 'for-next/dt' 2013-03-04 09:21:37 +01:00
Sascha Hauer b7314e47a5 Merge branch 'for-next/clps711x' 2013-03-04 09:21:36 +01:00
Sascha Hauer 40d8780de5 Merge branch 'for-next/at91' 2013-03-04 09:21:36 +01:00
Sascha Hauer 3451e2c44f Merge branch 'for-next/arm-l2x0' 2013-03-04 09:21:36 +01:00
Maxime Ripard 3d61f0865b ARM: cfa10036: Remove the boot partition and boot from ext
Support for ext filesystems has been introduced recently. We can now
boot directly from our rootfs, loading the kernel and device tree
images from /boot.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-03 16:22:06 +01:00
Jean-Christophe PLAGNIOL-VILLARD 07ca814239 highbank: add of fixup
depending on the power domain register we need to disable sata or mmc
and update the cpu informations

take from Calxeda U-Boot git

Register the original dtb to /dev/firmware-dtb and the fixed dtb to /dev/dtb

Cc: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-03 14:08:44 +01:00
Jean-Christophe PLAGNIOL-VILLARD e503b299ef highbank: move register value to include/mach
so the board can use it

Cc: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-03 14:08:44 +01:00
Maxime Ripard 2cc328ec2d cfa10036: Update the environment
Since we added a new partition in the board, the partitions number of
the boot and rootfs partition have changed as well.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-27 08:58:14 +01:00
Maxime Ripard c981b83356 cfa-10036: Use the second MMC partition to store the environment
Since the only storage medium on the cfa-10036 is the MMC card, we need
to have a registered environment partition on it if we want to be able
to modify at runtime.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-27 08:58:14 +01:00
Sascha Hauer a9f50d96e5 ARM i.MX pcm043: Use imx_bootsource() to detect bootsource
Also, print out where our environment comes from.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-27 08:57:08 +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
Fabio Porcedda 4cb9d4fa0e ARM at91 telit-evk-pro3: move config-board out of /env/init
This is to complete the work of two recent commits:
- defenv2: move config-board out of /env/init
- defenv2: comment setting default values in /env/config

Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-26 11:05:02 +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 d2e68e2d65 ARM: pcm038: Using "get_ram_size" for determine SRAM size
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 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 cb8ee706af ARM: pcm970: Replace #ifdef with IS_ENABLED()
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 97dfd44a57 ARM: pcm970: Fix bug with CompactFlash
Patch adds missing MX27_PCMCIA_CTL_BASE_ADDR offset for "readl" operator.

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 d16adc0557 ARM: pcm038: Fix serial number IIM-address
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
Alexander Shiyan 240194f0e5 ARM: pcm038: Remove duplicate imx27_barebox_entry() call
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-25 08:55:27 +01:00
Eric Bénard 2aa41b9a19 falconwing: switch to generic peristent env
Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-21 14:45:43 +01:00
Eric Bénard 2ce56634a5 imx23-olinuxino: swith to generic peristent env
Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-21 14:45:43 +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
Jean-Christophe PLAGNIOL-VILLARD 3f1f8821d6 highbank: add wfi for poweroff
needed by the real hardware

Cc: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-21 14:20:53 +01:00
Fabio Porcedda 19f8f1166d ARM: at91: use -EINVAL for invalid gpio on atmel_mci
Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-19 20:06:56 +01:00
Fabio Porcedda d15b81b41a at91sam9260/9g20ek: refactor init_board script
Refactor to remove duplicated code without changing functionality.
Put "then" on the same line of "if", because:
 - is the most used style in barebox
 - is like c code style
 - is more compact

Reduce the number of lines from 50 to 40.

Tested on at91sam9260ek.

Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-19 08:56:20 +01:00
Jean-Christophe PLAGNIOL-VILLARD b1fccec3ee highbank: add power off support
Cc: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-18 10:58:54 +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
Ivan Djelic 3fe6f23b76 arm: fix memset-related crashes caused by recent GCC (4.7.2) optimizations
Recent GCC versions (e.g. GCC-4.7.2) perform optimizations based on
assumptions about the implementation of memset and similar functions.
The current ARM optimized memset code does not return the value of
its first argument, as is usually expected from standard implementations.

For instance in the following function:

void debug_mutex_lock_common(struct mutex *lock, struct mutex_waiter *waiter)
{
	memset(waiter, MUTEX_DEBUG_INIT, sizeof(*waiter));
	waiter->magic = waiter;
	INIT_LIST_HEAD(&waiter->list);
}

compiled as:

800554d0 <debug_mutex_lock_common>:
800554d0:       e92d4008        push    {r3, lr}
800554d4:       e1a00001        mov     r0, r1
800554d8:       e3a02010        mov     r2, #16 ; 0x10
800554dc:       e3a01011        mov     r1, #17 ; 0x11
800554e0:       eb04426e        bl      80165ea0 <memset>
800554e4:       e1a03000        mov     r3, r0
800554e8:       e583000c        str     r0, [r3, #12]
800554ec:       e5830000        str     r0, [r3]
800554f0:       e5830004        str     r0, [r3, #4]
800554f4:       e8bd8008        pop     {r3, pc}

GCC assumes memset returns the value of pointer 'waiter' in register r0; causing
register/memory corruptions.

This patch fixes the return value of the assembly version of memset.
Could you please review, or suggest better alternatives ?

Thanks,

--
Ivan

(this is a shorter and (hopefully) clearer repost of
http://lists.infradead.org/pipermail/linux-arm-kernel/2013-January/144916.html)

The patch adds a 'mov' instruction and merges an additional load+store into
existing load/store instructions.
For ease of review, here is a breakdown of the patch into 4 simple steps:

Step 1
======
Perform the following substitutions:
ip -> r8, then
r0 -> ip,
and insert 'mov ip, r0' as the first statement of the function.
At this point, we have a memset() implementation returning the proper result,
but corrupting r8 on some paths (the ones that were using ip).

Step 2
======
Make sure r8 is saved and restored when (! CALGN(1)+0) == 1:

save r8:
-       str     lr, [sp, #-4]!
+       stmfd   sp!, {r8, lr}

and restore r8 on both exit paths:
-       ldmeqfd sp!, {pc}               @ Now <64 bytes to go.
+       ldmeqfd sp!, {r8, pc}           @ Now <64 bytes to go.
(...)
        tst     r2, #16
        stmneia ip!, {r1, r3, r8, lr}
-       ldr     lr, [sp], #4
+       ldmfd   sp!, {r8, lr}

Step 3
======
Make sure r8 is saved and restored when (! CALGN(1)+0) == 0:

save r8:
-       stmfd   sp!, {r4-r7, lr}
+       stmfd   sp!, {r4-r8, lr}

and restore r8 on both exit paths:
        bgt     3b
-       ldmeqfd sp!, {r4-r7, pc}
+       ldmeqfd sp!, {r4-r8, pc}
(...)
        tst     r2, #16
        stmneia ip!, {r4-r7}
-       ldmfd   sp!, {r4-r7, lr}
+       ldmfd   sp!, {r4-r8, lr}

Step 4
======
Rewrite register list "r4-r7, r8" as "r4-r8".

Signed-off-by: Ivan Djelic <ivan.djelic@parrot.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-15 19:58:49 +01:00
Sascha Hauer efc93a7429 ARM i.MX28: Add missing return value in non-void function
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-15 19:20:53 +01:00
Sascha Hauer 4008fef944 ARM at91sam9n12ek_defconfig: Fix reassigning of BAREBOX_MAX_IMAGE_SIZE
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-15 19:20:23 +01:00
Sascha Hauer 31668da3a5 ARM OMAP phycard-a-l1: Add missing include
Fixes:

arch/arm/boards/phycard-a-l1/lowlevel.c: In function 'pcaal1_sdrc_init':
arch/arm/boards/phycard-a-l1/lowlevel.c:105:2: warning: implicit declaration of function 'get_ram_size' [-Wimplicit-function-declaration]
arch/arm/boards/phycard-a-l1/lowlevel.c:113:3: warning: implicit declaration of function 'hang' [-Wimplicit-function-declaration]

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-15 19:19:15 +01:00
Fabio Porcedda 61c5f054f7 at91sam9260/9g20ek: use IS_ENABLED instead of #if/#ifdef
Using IS_ENABLED instead of #if/#ifdef the compiler can check
all the code.
Using IS_ENABLED for configuring smc->mode is an optimization,
reduce init.o text from 905 to 877.

Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-15 18:25:51 +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