1. 06 Feb, 2016 1 commit
  2. 04 Feb, 2016 2 commits
    • Peng Fan's avatar
      imx: mx6: implement mmc_get_env_dev · 216d286c
      Peng Fan authored
      Implement mmc_get_env_dev, devno can be got from smbr1 of SRC.
      Introduce a weak function board_mmc_get_env_dev, different
      boards can implement it according to different sdhc controllers
      that used by the board.
      Signed-off-by: default avatarPeng Fan <peng.fan@nxp.com>
      Cc: Stefano Babic <sbabic@denx.de>
      216d286c
    • Peng Fan's avatar
      imx: mx7dsabresd: move mmc_get_env_devno to soc code · 62d8cce9
      Peng Fan authored
      Move mmc_get_env_devno to soc.c and rename to mmc_get_env_dev to
      match the one in common/env_mmc.c.
      Introduce a weak function board_mmc_get_env_dev. Different
      boards can implement this according to sdhc controller which
      is used by the board.
      Signed-off-by: default avatarPeng Fan <peng.fan@nxp.com>
      Cc: Stefano Babic <sbabic@denx.de>
      62d8cce9
  3. 02 Feb, 2016 14 commits
  4. 01 Feb, 2016 14 commits
  5. 31 Jan, 2016 5 commits
    • Peng Fan's avatar
      arm: config: enforce -fno-pic for gcc · 397d7d5a
      Peng Fan authored
      Android's tool chain enable the -mandroid at default.
      This option will enable the -fpic, which cause uboot compilation
      failure:
      "
       LD      u-boot
       u-boot contains unexpected relocations: R_ARM_ABS32
       R_ARM_RELATIVE
      "
      
      In my testcase, arm-linux-androideabi-gcc-4.9 internally
      enables '-fpic', so when compiling code, there will be
      relocation entries using type R_ARM_GOT_BREL and .got
      section. When linking all the built-in.o using ld, there
      will be R_ARM_ABS32 relocation entry and .got section
      in the final u-boot elf image. This can not be handled
      by u-boot, since u-boot only expects R_ARM_RELATIVE
      relocation entry.
      arm-poky-linux-gnueabi-gcc-4.9 default does not enable '-fpic',
      so there is not .got section and R_ARM_GOT_BREL in built-in.o.
      And in the final u-boot elf image, all relocation entries are
      R_ARM_RELATIVE.
      
      we can pass '-fno-pic' to xxx-gcc to disable pic. whether
      the toolchain internally enables or disables pic, '-fno-pic'
      can work well.
      Signed-off-by: default avatarPeng Fan <peng.fan@nxp.com>
      Cc: Albert Aribaud <albert.u.boot@aribaud.net>
      Reviewed-by: default avatarTom Rini <trini@konsulko.com>
      397d7d5a
    • Wang Dongsheng's avatar
      ARM: Disable "DISCARD" for secure section if CONFIG_ARMV7_SECURE_BASE isn't defined · c5e954ec
      Wang Dongsheng authored
      "DISCARD" will remove ._secure.text relocate, but PSCI framework
      has already used some absolute address those need to relocate.
      
      Use readelf -t -r u-boot show us:
      .__secure_start		addr: 601408e4
      .__secure_end		addr: 60141460
      
      60141140  00000017 R_ARM_RELATIVE
      46	_secure_monitor:
      47	#ifdef CONFIG_ARMV7_PSCI
      48      ldr     r5, =_psci_vectors
      
      60141194  00000017 R_ARM_RELATIVE
      6014119c  00000017 R_ARM_RELATIVE
      601411a4  00000017 R_ARM_RELATIVE
      601411ac  00000017 R_ARM_RELATIVE
      64	_psci_table:
      66	.word	psci_cpu_suspend
      ...
      72	.word	psci_migrate
      
      60141344  00000017 R_ARM_RELATIVE
      6014145c  00000017 R_ARM_RELATIVE
      202	ldr     r5, =psci_text_end
      
      Solutions:
      1. Change absolute address to RelAdr.
         Based on LDR (immediate, ARM), we only have 4K offset to jump.
      Now PSCI code size is close to 4K size that is LDR limit jump size,
      so even if the LDR is based on the current instruction address,
      there is also have a risk for RelAdr. If we use two jump steps I
      think we can fix this issue, but looks too hack, so give up this way.
      
      2. Enable "DISCARD" only for CONFIG_ARMV7_SECURE_BASE has defined.
         If CONFIG_ARMV7_SECURE_BASE is defined in platform, all of secure
      will in the BASE address that is absolute.
      Signed-off-by: default avatarWang Dongsheng <dongsheng.wang@nxp.com>
      Reviewed-by: default avatarTom Rini <trini@konsulko.com>
      c5e954ec
    • Marek Vasut's avatar
      arm: cache: Implement cache range check for v7 · 11aa6a32
      Marek Vasut authored
      Add code to aid tracking down cache alignment issues.
      In case DEBUG is defined in the cache.c, this code will
      check alignment of each attempt to flush/invalidate data
      cache and print a warning if the alignment is incorrect.
      If DEBUG is not defined, this code is optimized out.
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
      Cc: Albert Aribaud <albert.u.boot@aribaud.net>
      Cc: Tom Rini <trini@konsulko.com>
      11aa6a32
    • Marek Vasut's avatar
      arm: Remove S bit from MMU section entry · 8890c2fb
      Marek Vasut authored
      Restore the old behavior of the MMU section entries configuration,
      which is without the S-bit.
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Cc: Tom Rini <trini@konsulko.com>
      Cc: Albert Aribaud <albert.u.boot@aribaud.net>
      Cc: Simon Glass <sjg@chromium.org>
      8890c2fb
    • Marek Vasut's avatar
      arm: Replace test for CONFIG_ARMV7 with CONFIG_CPU_V7 · a592e6fb
      Marek Vasut authored
      The arch/arm/lib/cache-cp15.c checks for CONFIG_ARMV7 and if this macro is
      set, it configures TTBR0 register. This register must be configured for the
      cache on ARMv7 to operate correctly.
      
      The problem is that noone actually sets the CONFIG_ARMV7 macro and thus the
      TTBR0 is not configured at all. On SoCFPGA, this produces all sorts of minor
      issues which are hard to replicate, for example certain USB sticks are not
      detected or QSPI NOR sometimes fails to write pages completely.
      
      The solution is to replace CONFIG_ARMV7 test with CONFIG_CPU_V7 one. This is
      correct because the code which added the test(s) for CONFIG_ARMV7 was added
      shortly after CONFIG_ARMV7 was replaced by CONFIG_CPU_V7 and this code was
      not adjusted correctly to reflect that change.
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Cc: Tom Rini <trini@konsulko.com>
      Cc: Albert Aribaud <albert.u.boot@aribaud.net>
      Cc: Simon Glass <sjg@chromium.org>
      a592e6fb
  6. 29 Jan, 2016 1 commit
    • Stephen Warren's avatar
      ARM: tegra: shut down USB device controller at boot · dd8204de
      Stephen Warren authored
      When loading U-Boot into RAM over USB protocols using tools such as
      tegrarcm or L4T's exec-uboot.sh/tegraflash.py, Tegra's USB device
      mode controller is initialized and enumerated by the host PC running
      the tool. Unfortunately, these tools do not shut down the USB
      controller before executing the downloaded code, and so the host PC
      does not "de-enumerate" the USB device. This patch implements optional
      code to shut down the USB controller when U-Boot boots to avoid leaving
      a stale USB device present.
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
      dd8204de
  7. 28 Jan, 2016 3 commits