1. 02 2月, 2016 29 次提交
  2. 31 1月, 2016 7 次提交
    • M
      arm: novena: Fix EEPROM i2c configuration · 735b1a2e
      Marek Vasut 提交于
      On Novena, the DRAM SPD is connected to i2c1 while the Utility EEPROM
      is connected to i2c3. Now that the EEPROM handling in U-Boot is fixed,
      also fix this bit on Novena.
      Signed-off-by: NMarek Vasut <marex@denx.de>
      Cc: Sean Cross <xobs@kosagi.com>
      Cc: Stefano Babic <sbabic@denx.de>
      735b1a2e
    • P
      arm: config: enforce -fno-pic for gcc · 397d7d5a
      Peng Fan 提交于
      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: NPeng Fan <peng.fan@nxp.com>
      Cc: Albert Aribaud <albert.u.boot@aribaud.net>
      Reviewed-by: NTom Rini <trini@konsulko.com>
      397d7d5a
    • W
      ARM: Disable "DISCARD" for secure section if CONFIG_ARMV7_SECURE_BASE isn't defined · c5e954ec
      Wang Dongsheng 提交于
      "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: NWang Dongsheng <dongsheng.wang@nxp.com>
      Reviewed-by: NTom Rini <trini@konsulko.com>
      c5e954ec
    • M
      arm: cache: Implement cache range check for v7 · 11aa6a32
      Marek Vasut 提交于
      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: NMarek 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
    • A
      armv7: add cacheline sizes where missing · 3709844f
      Albert ARIBAUD 提交于
      Some armv7 targets are missing a cache line size declaration.
      In preparation for "arm: cache: Implement cache range check for v7"
      patch, add these declarations with the appropriate value for
      the target's SoC or CPU.
      Signed-off-by: NAlbert ARIBAUD <albert.u.boot@aribaud.net>
      Reviewed-by: NTom Rini <trini@konsulko.com>
      3709844f
    • M
      arm: Remove S bit from MMU section entry · 8890c2fb
      Marek Vasut 提交于
      Restore the old behavior of the MMU section entries configuration,
      which is without the S-bit.
      Signed-off-by: NMarek 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
    • M
      arm: Replace test for CONFIG_ARMV7 with CONFIG_CPU_V7 · a592e6fb
      Marek Vasut 提交于
      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: NMarek 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
  3. 30 1月, 2016 4 次提交