u-boot/arch/arm/include/asm
Masahiro Yamada d6bc30af52 ARM: UniPhier: remove __packed that causes a problem on GCC 4.9
The DDR PHY training function, ddrphy_prepare_training() would not
work if compiled with GCC 4.9.

The struct ddrphy (arch/arm/include/asm/arch-uniphier/ddrphy-regs.h)
is specified with __packed because it represents a hardware register
mapping, but it turned out to cause a problem on GCC 4.9.

If -mno-unaligned-access is specified (yes, it is in
arch/arm/cpu/armv7/config.mk), GCC 4.9 is aware of the
__attribute__((packed)) and generates extra instructions to perform
the memory access in a way that does not cause unaligned access.
(Actually it is not need here because the register base, the first
argument of the ddrphy_prepare_training(), is always given with a
4-byte aligned address.)

Anyway, as a result, readl() / writel() is divided into byte-wise
accesses.  The problem is that this hardware only accepts 4-byte
register access.  Byte-wise accesses lead to unexpected behavior.

There are some options to avoid this problem.

[1] Remove -mno-unaligned-access
[2] Add __aligned(4) along with __packed to struct ddrphy
[3] Remove __packed from struct ddrphy

[1] solves the problem for ARMv7, but it does not for pre-ARMv6 and
ARMv6-M architectures where -mno-unaligned-access is default.
So, [1] does not seem reasonable in terms of code portability.

Both [2] and [3] work well, but [2] seems too much.  All the members
of struct ddrphy have the u32 type.  No padding would be inserted
even if __packed is dropped.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Reviewed-by: Tom Rini <trini@ti.com>
2015-01-23 00:44:17 +09:00
..
arch-a320 Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
arch-am33xx arm: am437x: Enable hardware leveling for EMIF 2015-01-13 11:53:39 -05:00
arch-arm720t Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
arch-armada-xp arm: armada-xp: Add basic support for Marvell Armada XP SoC 2014-10-23 09:59:21 -04:00
arch-armada100 ARM: remove CONFIG_ARM926EJS defines 2014-11-20 11:28:25 -05:00
arch-armv7 Merge branch 'u-boot/master' into u-boot-arm/master 2013-07-25 17:57:46 +02:00
arch-at91 Merge git://git.denx.de/u-boot-dm 2014-11-24 12:01:48 -05:00
arch-bcm281xx bcm281xx: add support for "USB OTG clock" 2014-12-29 16:31:23 -05:00
arch-bcm2835 ARM: rpi: support model A+ 2014-12-29 16:31:22 -05:00
arch-bcmcygnus arm: add Cygnus and NSP boards 2014-08-30 07:46:40 -04:00
arch-bcmnsp arm: add Cygnus and NSP boards 2014-08-30 07:46:40 -04:00
arch-davinci Merge branch 'u-boot-ti/master' into 'u-boot-arm/master' 2014-07-01 15:11:18 +02:00
arch-ep93xx arm: ep9315: Return back Cirrus Logic EDB9315A board support 2014-07-04 23:45:48 +02:00
arch-exynos exynos5420: fix compilation without parade video 2014-12-22 20:38:27 +09:00
arch-fsl-lsch3 armv8/fsl-lsch3: Release secondary cores from boot hold off with Boot Page 2014-09-25 08:36:19 -07:00
arch-imx imx: consolidate set_chipselect_size function 2014-11-20 10:30:19 +01:00
arch-keystone keystone: set default pci mode to root complex 2015-01-05 15:13:47 -05:00
arch-kirkwood ARM: remove CONFIG_ARM926EJS defines 2014-11-20 11:28:25 -05:00
arch-ks8695 Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
arch-lpc32xx ARM: remove CONFIG_ARM926EJS defines 2014-11-20 11:28:25 -05:00
arch-ls102xa ARM: ls102xa: Setting device's stream id for SMMUs. 2014-12-11 09:42:22 -08:00
arch-mb86r0x sizes.h - consolidate for all architectures 2014-03-04 12:15:01 -05:00
arch-mvebu arm: marvell: Move arch-kirkwood/spi.h to arch-mvebu/spi.h 2014-10-23 09:59:20 -04:00
arch-mx5 imx: consolidate set_chipselect_size function 2014-11-20 10:30:19 +01:00
arch-mx6 arm:mx6sx add QSPI support 2014-12-31 14:52:32 +05:30
arch-mx25 imx25: Add new hardware registers 2014-05-09 15:10:53 +02:00
arch-mx27 mx27: add missing constant for mx27 2013-09-10 19:12:55 +02:00
arch-mx31 arm: mx31: use common timer functions 2014-09-16 12:51:46 +02:00
arch-mx35 arm: mx35: use common timer functions 2014-09-16 12:53:09 +02:00
arch-mxs arch-mx: add missing include 2014-10-25 07:27:37 -04:00
arch-nomadik Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
arch-omap3 Merge branch 'master' of git://git.denx.de/u-boot-ti 2014-10-27 09:05:43 -04:00
arch-omap4 ARM: OMAP4: Panda: rework DMM logic 2015-01-05 15:13:45 -05:00
arch-omap5 arm: omap: add support for am57xx devices 2014-12-04 11:04:14 -05:00
arch-orion5x Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
arch-pantheon ARM: remove CONFIG_ARM926EJS defines 2014-11-20 11:28:25 -05:00
arch-pxa include: delete include/linux/config.h 2013-11-08 15:25:13 -05:00
arch-rmobile mmc: rmobile: Add SDHC support for Renesas rmobile ARM SoC 2015-01-19 16:24:25 +02:00
arch-s3c24x0 mtd: nand: s3c: Unify the register definition and naming 2014-11-26 23:21:43 -06:00
arch-s5pc1xx dm: exynos: gpio: Convert to driver model 2014-10-22 10:36:36 -06:00
arch-sa1100 Move architecture-specific includes to arch/$ARCH/include/asm 2010-04-13 09:13:12 +02:00
arch-socfpga socfpga: correctly increment freeze_controller_base address 2014-12-06 13:53:57 +01:00
arch-spear spear: move CONFIG_SYS_I2C_BASE from arch-spear/hardware to board configs 2014-02-20 06:49:02 +01:00
arch-stv0991 stv0991: enable ethernet support 2014-12-09 15:16:19 -05:00
arch-sunxi sunxi: usbc: Add support for usb0 to the common usbc code 2015-01-14 14:56:40 +01:00
arch-tegra ARM: tegra: Implement XUSB pad controller 2014-12-18 13:19:20 -07:00
arch-tegra20 ARM: tegra: Implement powergate support 2014-12-18 13:19:20 -07:00
arch-tegra30 ARM: tegra: Implement powergate support 2014-12-18 13:19:20 -07:00
arch-tegra114 ARM: tegra: Implement powergate support 2014-12-18 13:19:20 -07:00
arch-tegra124 ARM: tegra: Implement powergate support 2014-12-18 13:19:20 -07:00
arch-tnetv107x mtd: nand: davinci: add header file for driver definitions 2014-06-19 17:53:58 -04:00
arch-u8500 Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
arch-uniphier ARM: UniPhier: remove __packed that causes a problem on GCC 4.9 2015-01-23 00:44:17 +09:00
arch-vf610 arm: vf610: improve evaluation of reset source 2014-12-01 10:20:22 +01:00
arch-zynq ARM: zynq: Remove spl.h 2014-08-19 08:48:18 +02:00
armv8 ARMv8: Adjust MMU setup 2014-07-03 08:40:48 +02:00
imx-common Merge branch 'master' of git://www.denx.de/git/u-boot-imx 2014-11-05 12:48:09 -05:00
iproc-common arm: add Cygnus and NSP boards 2014-08-30 07:46:40 -04:00
kona-common bcm281xx: add support for "USB OTG clock" 2014-12-29 16:31:23 -05:00
proc-armv ARM: add missing HYP mode constant 2014-07-28 17:06:35 +02:00
ti-common dma: ti-edma3: introduce edma3 driver 2014-10-23 11:27:29 -04:00
armv7.h ARM: bootm: do not add PSCI to fdt when booting in secure mode. 2015-01-05 15:02:03 -05:00
assembler.h arm: build arch memset/memcpy in Thumb2 mode 2015-01-09 10:20:22 -05:00
atomic.h Remove ${objtree}/include/asm/proc/ link 2014-06-11 16:27:05 -04:00
bitops.h Remove ${objtree}/include/asm/proc/ link 2014-06-11 16:27:05 -04:00
bootm.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
byteorder.h armv8: Use __aarch64__ rather than CONFIG_ARM64 in some cases 2014-01-10 10:10:23 +01:00
cache.h ARM: cache_v7: use __weak 2014-07-04 19:57:22 +02:00
config.h arm: ls102xa: Add Freescale LS102xA SoC support 2014-09-08 10:30:32 -07:00
davinci_rtc.h am33xx, davinci: Create and use <asm/davinci_rtc.h> 2013-11-01 15:30:22 -04:00
dma-mapping.h arm: dma_alloc_coherent: malloc() -> memalign() 2013-09-14 12:08:00 +02:00
ehci-omap.h usb: new board-specific USB init interface 2013-10-20 23:42:40 +02:00
emif.h arm: am437x: Enable hardware leveling for EMIF 2015-01-13 11:53:39 -05:00
errno.h Move architecture-specific includes to arch/$ARCH/include/asm 2010-04-13 09:13:12 +02:00
gic.h arm64 patch: gicv3 support 2014-04-08 00:15:12 +02:00
global_data.h qe: add u-qe support to arm board 2014-11-19 12:55:45 -08:00
gpio.h gpio: Replace ARM gpio.h with the common API in include/asm-generic 2012-01-09 20:10:32 -06:00
hardware.h Move architecture-specific includes to arch/$ARCH/include/asm 2010-04-13 09:13:12 +02:00
io.h arm: ls102xa: Add Freescale LS102xA SoC support 2014-09-08 10:30:32 -07:00
linkage.h arm: adapt asm/linkage.h from Linux 2012-05-15 08:31:26 +02:00
mach-types.h arm: tegra: initial support for apalis t30 2014-10-22 09:30:54 -07:00
macro.h gic: fixed compilation error in GICv2 wait for interrupt macro 2014-10-28 07:57:31 +01:00
memory.h include: delete include/linux/config.h 2013-11-08 15:25:13 -05:00
omap_boot.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
omap_common.h arm: omap_common: expose tps659038 and dra7xx_dplls 2014-12-04 11:04:14 -05:00
omap_gpio.h dm: omap: gpio: Support driver model 2014-10-23 19:29:07 -06:00
omap_mmc.h omap_hsmmc: add driver check for write protection 2013-03-08 16:41:13 -05:00
omap_musb.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
pcie_layerscape.h arm: ls102xa: Update PCIe dts node status 2014-12-11 09:35:56 -08:00
pl310.h mx6: Enable L2 cache support 2014-02-11 11:24:12 +01:00
posix_types.h armv8: Use __aarch64__ rather than CONFIG_ARM64 in some cases 2014-01-10 10:10:23 +01:00
processor.h Remove ${objtree}/include/asm/proc/ link 2014-06-11 16:27:05 -04:00
psci.h ARM: HYP/non-sec: add generic ARMv7 PSCI code 2014-07-28 17:19:18 +02:00
ptrace.h Remove ${objtree}/include/asm/proc/ link 2014-06-11 16:27:05 -04:00
sections.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
secure.h ARM: HYP/non-sec: allow relocation to secure RAM 2014-07-28 17:19:09 +02:00
semihosting.h arm: semihosting: fix up compile bugs 2014-12-29 07:44:06 -05:00
setup.h arm bootm: Allow to pass board specified atags 2012-10-30 15:28:05 -07:00
spl.h arm: socfpga: Zap spl.h and ad-hoc related syms 2014-10-27 02:26:24 +01:00
string.h arm: Use optimized memcpy and memset from linux 2011-04-27 19:38:07 +02:00
system.h ARM: Implement non-cached memory support 2014-12-18 13:19:21 -07:00
types.h arm64: core support 2014-01-09 16:08:44 +01:00
u-boot-arm.h arm: vectors: provide protypes from vectors.S 2014-10-25 15:27:36 -04:00
u-boot.h bd_info: remove bi_barudrate member from struct bd_info 2014-05-12 15:19:45 -04:00
unaligned.h arm64: core support 2014-01-09 16:08:44 +01:00
utils.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00