Skip to content
Snippets Groups Projects
  1. Apr 09, 2015
  2. Mar 23, 2015
  3. Mar 13, 2015
  4. Mar 09, 2015
    • Tom Rini's avatar
      ARM: PSCI: Rework the DT handler slightly · dd09f7e7
      Tom Rini authored
      
      The way the PSCI DT update happens currently means we pull in
      <asm/armv7.h> everywhere, including on ARMv8 and that in turn brings in
      <asm/io.h> for some non-PSCI related things that header needs to deal
      with.
      
      To fix this, we rework the hook slightly.  A good portion of
      arch/arm/cpu/armv7/virt-dt.c is common looking and I hope that when PSCI
      is needed on ARMv8 we can re-use this by and large.  So rename the
      current hook to psci_update_dt(), move the prototype to <asm/psci.h> and
      add an #ifdef that will make re-use later easier.
      
      Reported-by: default avatarYork Sun <yorksun@freescale.com>
      Cc: Marc Zyngier <marc.zyngier@arm.com>
      Cc: York Sun <yorksun@freescale.com>
      Cc: Ian Campbell <ijc@hellion.org.uk>
      Cc: Hans de Goede <hdegoede@redhat.com>
      Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
      Signed-off-by: default avatarTom Rini <trini@konsulko.com>
      Acked-by: default avatarYork Sun <yorksun@freescale.com>
      dd09f7e7
  5. Mar 06, 2015
  6. Mar 04, 2015
  7. Mar 01, 2015
  8. Feb 28, 2015
    • Masahiro Yamada's avatar
      ARM: UniPhier: move SoC sources to mach-uniphier · 4c425570
      Masahiro Yamada authored
      
      Move
      arch/arm/cpu/armv7/uniphier/* -> arch/arm/mach-uniphier/*
      
      Signed-off-by: default avatarMasahiro Yamada <yamada.m@jp.panasonic.com>
      4c425570
    • Doug Anderson's avatar
      Exynos: Fix L2 cache timings on Exynos5420 and Exynos5800 · 306f527e
      Doug Anderson authored
      
      It was found that the L2 cache timings that we had before could cause
      freezes and hangs.  We should make things more robust with better
      timings.  Currently the production ChromeOS kernel applies these
      timings, but it's nice to fixup firmware too (and upstream probably
      won't take our kernel hacks).
      
      This also provides a big cleanup of the L2 cache init code avoiding
      some duplication.  The way things used to work:
      * low_power_start() was installed by the SPL (both at boot and resume
        time) and left resident in iRAM for the kernel to use when bringing
        up additional CPUs.  It used configure_l2_ctlr() and
        configure_l2_actlr() when it detected it was on an A15.  This was
        needed (despite the L2 cache registers being shared among all A15s)
        because we might have been the first man in after the whole A15
        cluster was shutdown.
      * secondary_cores_configure() was called on at boot time and at resume
        time.  Strangely this called configure_l2_ctlr() but not
        configure_l2_actlr() which was almost certainly wrong.  Given that
        we'll call both (see next bullet) later in the boot process it
        didn't matter for normal boot, but I guess this is how L2 cache
        settings got set on 5420/5800 (but not 5250?) at resume time.
      * exynos5_set_l2cache_params() was called as part of cache enablement.
        This should happen at boot time (normally in the SPL except for USB
        boot where it happens in main U-Boot).
      
      Note that the old code wasn't setting ECC/parity in the cache
      enablement code but we happened to get it anyway because we'd call
      secondary_cores_configure() at boot time.  For resume time we'd get it
      anyway when the 2nd A15 core came up.
      
      Let's make this a whole lot simpler.  Now we always set these
      parameters in the same place for all boots and use the same code for
      setting up secondary CPUs.
      
      Intended net effects of this change (other than cleanup):
      * Timings go from before:
          data: 0 cycle setup, 3 cycles (0x2) latency
          tag:  0 cycle setup, 3 cycles (0x2) latency
        after:
          data: 1 cycle setup, 4 cycles (0x3) latency
          tag:  1 cycle setup, 4 cycles (0x3) latency
      * L2ACTLR is properly initted on 5420/5800 in all cases.
      
      One note is that we're still relying on luck to keep low_power_start()
      working.  The compiler is being nice and not storing anything on the
      stack.
      
      Another note is that on its own this patch won't help to fix cache
      settings in an RW U-Boot update where we still have the RO SPL.  The
      plan for that is:
      * Have RW U-Boot re-init the cache right before calling the kernel
        (after it has turned the L2 cache off).  This is why the functions
        are in a header file instead of lowlevel_init.c.
      
      * Have the kernel save the L2 cache settings of the boot CPU and apply
        them to all other CPUs.  We get a little lucky here because the old
        code was using "|=" to modify the registers and all of the bits that
        it's setting are also present in the new settings (!).  That means
        that when the 2nd CPU in the A15 cluster comes up it doesn't
        actually mess up the settings of the 1st CPU in the A15 cluster.  An
        alternative option is to have the kernel write its own
        low_power_start() code.
      
      Signed-off-by: default avatarDoug Anderson <dianders@chromium.org>
      Signed-off-by: default avatarAkshay Saraswat <akshay.s@samsung.com>
      Signed-off-by: default avatarMinkyu Kang <mk7.kang@samsung.com>
      306f527e
    • Akshay Saraswat's avatar
      Exynos542x: Make A7s boot with thumb-mode U-Boot on warm reset · c8fd8e66
      Akshay Saraswat authored
      
      On warm reset, all cores jump to the low_power_start function because iRAM
      data is retained and because while executing iROM code all cores find
      the jump flag 0x02020028 set. In low_power_start, cores check the reset
      status and if true they clear the jump flag and jump back to 0x0.
      
      The A7 cores do jump to 0x0 but consider following instructions as a Thumb
      instructions which in turn makes them loop inside the iROM code instead of
      jumping to power_down_core.
      
      This issue is fixed by replacing the "mov pc" instruction with a "bx"
      instruction which switches state along with the jump to make the execution
      unit consider the branch target as an ARM instruction.
      
      Signed-off-by: default avatarAkshay Saraswat <akshay.s@samsung.com>
      Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
      Tested-by: default avatarSimon Glass <sjg@chromium.org>
      Signed-off-by: default avatarMinkyu Kang <mk7.kang@samsung.com>
      c8fd8e66
    • Akshay Saraswat's avatar
      Exynos542x: Fix secondary core booting for thumb · cecf2db2
      Akshay Saraswat authored
      
      When compiled SPL for Thumb secondary cores failed to boot
      at the kernel boot up. Only one core came up out of 4.
      This was happening because the code relocated to the
      address 0x02073000 by the primary core was an ARM asm
      code which was executed by the secondary cores as if it
      was a thumb code.
      This patch fixes the issue of secondary cores considering
      relocated code as Thumb instructions and not ARM instructions
      by jumping to the relocated with the help of "bx" ARM instruction.
      "bx" instruction changes the 5th bit of CPSR which allows
      execution unit to consider the following instructions as ARM
      instructions.
      
      Signed-off-by: default avatarAkshay Saraswat <akshay.s@samsung.com>
      Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
      Tested-by: default avatarSimon Glass <sjg@chromium.org>
      Signed-off-by: default avatarMinkyu Kang <mk7.kang@samsung.com>
      cecf2db2
    • Akshay Saraswat's avatar
      Exynos542x: add L2 control register configuration · 7e514eef
      Akshay Saraswat authored
      
      This patch does 3 things:
      1. Enables ECC by setting 21st bit of L2CTLR.
      2. Restore data and tag RAM latencies to 3 cycles because iROM sets
         0x3000400 L2CTLR value during switching.
      3. Disable clean/evict push to external by setting 3rd bit of L2ACTLR.
         We need to restore this here due to switching.
      
      Signed-off-by: default avatarAbhilash Kesavan <a.kesavan@samsung.com>
      Signed-off-by: default avatarAkshay Saraswat <akshay.s@samsung.com>
      Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
      Tested-by: default avatarSimon Glass <sjg@chromium.org>
      Signed-off-by: default avatarMinkyu Kang <mk7.kang@samsung.com>
      7e514eef
    • Akshay Saraswat's avatar
      Exynos542x: cache: Disable clean/evict push to external · f0f76b0a
      Akshay Saraswat authored
      
      L2 Auxiliary Control Register provides configuration
      and control options for the L2 memory system. Bit 3
      of L2ACTLR stands for clean/evict push to external.
      Setting bit 3 disables clean/evict which is what
      this patch intends to do.
      
      Signed-off-by: default avatarAkshay Saraswat <akshay.s@samsung.com>
      Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
      Tested-by: default avatarSimon Glass <sjg@chromium.org>
      Signed-off-by: default avatarMinkyu Kang <mk7.kang@samsung.com>
      f0f76b0a
    • Akshay Saraswat's avatar
      Exynos542x: Add workaround for exynos iROM errata · 67a0652c
      Akshay Saraswat authored
      
      iROM logic provides undesired jump address for CPU2.
      This patch adds a programmable susbstitute for a part of
      iROM logic which wakes up cores and provides jump addresses.
      This patch creates a logic to make all secondary cores jump
      to a particular address which evades the possibility of CPU2
      jumping to wrong address and create undesired results.
      
      Logic of the workaround:
      
      Step-1: iROM code checks value at address 0x2020028.
      Step-2: If value is 0xc9cfcfcf, it jumps to the address (0x202000+CPUid*4),
      	else, it continues executing normally.
      Step-3: Primary core puts secondary cores in WFE and store 0xc9cfcfcf in
      	0x2020028 and jump address (pointer to function low_power_start)
      	in (0x202000+CPUid*4).
      Step-4: When secondary cores recieve event signal they jump to this address
      	and continue execution.
      
      Signed-off-by: default avatarKimoon Kim <kimoon.kim@samsung.com>
      Signed-off-by: default avatarAkshay Saraswat <akshay.s@samsung.com>
      Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
      Tested-by: default avatarSimon Glass <sjg@chromium.org>
      Signed-off-by: default avatarMinkyu Kang <mk7.kang@samsung.com>
      67a0652c
    • Akshay Saraswat's avatar
      Exynos542x: CPU: Power down all secondary cores · ac0d98cd
      Akshay Saraswat authored
      
      This patch adds code to shutdown secondary cores.
      When U-boot comes up, all secondary cores appear powered on,
      which is undesirable and causes side effects while
      initializing these cores in kernel.
      
      Secondary core power down happens in following steps:
      
      Step-1: After Exynos power-on, primary core starts executing first.
      Step-2: In iROM code every core has to check 2 flags i.e.
      	addresses 0x02020028 & 0x02020004.
      Step-3: Initially 0x02020028 is 0 for all cores and 0x02020004 has a
      	jump address for primary core and 0 for all secondary cores.
      Step-4: Therefore, primary core follows normal iROM execution and jumps
      	to BL1 eventually, whereas all secondary cores enter WFE.
      Step-5: When primary core comes into function secondary_cores_configure,
      	it puts pointer to function power_down_core into 0x02020004
      	and provides DSB and SEV for all cores so that they may come out
      	of WFE and jump to power_down_core function.
      Step-6: And ultimately because of power_down_core all
      	secondary cores shut-down.
      
      Signed-off-by: default avatarKimoon Kim <kimoon.kim@samsung.com>
      Signed-off-by: default avatarAkshay Saraswat <akshay.s@samsung.com>
      Signed-off-by: default avatarMinkyu Kang <mk7.kang@samsung.com>
      ac0d98cd
  9. Feb 25, 2015
  10. Feb 24, 2015
    • Masahiro Yamada's avatar
      kconfig: remove unneeded dependency on !SPL_BUILD · d648964f
      Masahiro Yamada authored
      
      Now CONFIG_SPL_BUILD is not defined in Kconfig, so
      "!depends on SPL_BUILD" and "if !SPL_BUILD" are redundant.
      
      Signed-off-by: default avatarMasahiro Yamada <yamada.m@jp.panasonic.com>
      d648964f
    • Masahiro Yamada's avatar
      kconfig: switch to single .config configuration · e02ee254
      Masahiro Yamada authored
      
      When Kconfig for U-boot was examined, one of the biggest issues was
      how to support multiple images (Normal, SPL, TPL).  There were
      actually two options, "single .config" and "multiple .config".
      After some discussions and thought experiments, I chose the latter,
      i.e. to create ".config", "spl/.config", "tpl/.config" for Normal,
      SPL, TPL, respectively.
      
      It is true that the "multiple .config" strategy provided us the
      maximum flexibility and helped to avoid duplicating CONFIGs among
      Normal, SPL, TPL, but I have noticed some fatal problems:
      
      [1] It is impossible to share CONFIG options across the images.
        If you change the configuration of Main image, you often have to
        adjust some SPL configurations correspondingly.  Currently, we
        cannot handle the dependencies between them.  It means one of the
        biggest advantages of Kconfig is lost.
      
      [2] It is too painful to change both ".config" and "spl/.config".
        Sunxi guys started to work around this problem by creating a new
        configuration target.  Commit cbdd9a97 (sunxi: kconfig: Add
        %_felconfig rule to enable FEL build of sunxi platforms.) added
        "make *_felconfig" to enable CONFIG_SPL_FEL on both images.
        Changing the configuration of multiple images in one command is a
        generic demand.  The current implementation cannot propose any
        good solution about this.
      
      [3] Kconfig files are getting ugly and difficult to understand.
        Commit b724bd7d (dm: Kconfig: Move CONFIG_SYS_MALLOC_F_LEN to
        Kconfig) has sprinkled "if !SPL_BUILD" over the Kconfig files.
      
      [4] The build system got more complicated than it should be.
        To adjust Linux-originated Kconfig to U-Boot, the helper script
        "scripts/multiconfig.sh" was introduced.  Writing a complicated
        text processor is a shell script sometimes caused problems.
      
      Now I believe the "single .config" will serve us better.  With it,
      all the problems above would go away.  Instead, we will have to add
      some CONFIG_SPL_* (and CONFIG_TPL_*) options such as CONFIG_SPL_DM,
      but we will not have much.  Anyway, this is what we do now in
      scripts/Makefile.spl.
      
      I admit my mistake with my apology and this commit switches to the
      single .config configuration.
      
      It is not so difficult to do that:
      
       - Remove unnecessary processings from scripts/multiconfig.sh
        This file will remain for a while to support the current defconfig
        format.  It will be removed after more cleanups are done.
      
       - Adjust some makefiles and Kconfigs
      
       - Add some entries to include/config_uncmd_spl.h and the new file
         scripts/Makefile.uncmd_spl.  Some CONFIG options that are not
         supported on SPL must be disabled because one .config is shared
         between SPL and U-Boot proper going forward.  I know this is not
         a beautiful solution and I think we can do better, but let's see
         how much we will have to describe them.
      
       - update doc/README.kconfig
      
      More cleaning up patches will follow this.
      
      Signed-off-by: default avatarMasahiro Yamada <yamada.m@jp.panasonic.com>
      Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
      e02ee254
    • Masahiro Yamada's avatar
      ARM: UniPhier: set CONFIG_SYS_MALLOC_F to the global default value · 6d4d05b1
      Masahiro Yamada authored
      
      It is true that malloc is necessary for Driver Model before
      relocation, but there is no good reason to reserve the malloc
      space more than enough.  The default value 0x400 works well.
      
      Signed-off-by: default avatarMasahiro Yamada <yamada.m@jp.panasonic.com>
      Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
      6d4d05b1
    • chenhui zhao's avatar
      arm: ls102xa: workaround for cache coherency problem · 9f076be7
      chenhui zhao authored
      
      The RCPM FSM may not be reset after power-on, for example,
      in the cases of cold boot and wakeup from deep sleep.
      It causes cache coherency problem and may block deep sleep.
      Therefore, reset them if they are not be reset.
      
      Signed-off-by: default avatarChenhui Zhao <chenhui.zhao@freescale.com>
      Reviewed-by: default avatarYork Sun <yorksun@freescale.com>
      9f076be7
    • Minghuan Lian's avatar
      arm/ls102xa: create TLB to map PCIe region · 636ef956
      Minghuan Lian authored
      
      LS1021A's PCIe1 region begins 0x40_00000000; PCIe2 begins
      0x48_00000000. In order to access PCIe device, we must create
      TLB to map the 40bit physical address to 32bit virtual address.
      This patch will enable MMU after DDR is available and creates MMU
      table in DRAM to map all 4G space; then, re-use the reserved space
      to map PCIe region. The following the mapping layout.
      
      VA mapping:
          -------  <---- 0GB
         |       |
         |       |
         |-------| <---- 0x24000000
         |///////|  ===> 192MB VA map for PCIe1 with offset 0x40_0000_0000
         |-------| <---- 0x300000000
         |       |
         |-------| <---- 0x34000000
         |///////|  ===> 192MB VA map for PCIe2 with offset 0x48_0000_0000
         |-------| <---- 0x40000000
         |       |
         |-------| <---- 0x80000000 DDR0 space start
         |\\\\\\\|
         |\\\\\\\|  ===> 2GB VA map for 2GB DDR0 Memory space
         |\\\\\\\|
         -------  <---- 4GB DDR0 space end
      
      Signed-off-by: default avatarMinghuan Lian <Minghuan.Lian@freescale.com>
      Reviewed-by: default avatarYork Sun <yorksun@freescale.com>
      636ef956
  11. Feb 21, 2015
Loading