1. 02 Nov, 2015 1 commit
  2. 28 Oct, 2015 3 commits
  3. 27 Oct, 2015 21 commits
  4. 23 Oct, 2015 2 commits
    • Scott Wood's avatar
      2c7693e0
    • Scott Wood's avatar
      powerpc/85xx: Load all early TLB entries at once · d9e1831a
      Scott Wood authored
      Use an AS=1 trampoline TLB entry to allow all normal TLB1 entries to
      be loaded at once.  This avoids the need to keep the translation that
      code is executing from in the same TLB entry in the final TLB
      configuration as during early boot, which in turn is helpful for
      relocatable kernels (e.g. kdump) where the kernel is not running from
      what would be the first TLB entry.
      
      On e6500, we limit map_mem_in_cams() to the primary hwthread of a
      core (the boot cpu is always considered primary, as a kdump kernel
      can be entered on any cpu).  Each TLB only needs to be set up once,
      and when we do, we don't want another thread to be running when we
      create a temporary trampoline TLB1 entry.
      Signed-off-by: default avatarScott Wood <scottwood@freescale.com>
      d9e1831a
  5. 21 Oct, 2015 13 commits
    • Scott Wood's avatar
      clk: qoriq: Add ls2080a support. · 9e19ca2f
      Scott Wood authored
      LS2080A is the first implementation of the chassis 3 clockgen, which
      has a different register layout than previous chips.  It is also little
      endian, unlike previous chips.
      Signed-off-by: default avatarScott Wood <scottwood@freescale.com>
      Acked-by: default avatarStephen Boyd <sboyd@codeaurora.org>
      9e19ca2f
    • Scott Wood's avatar
      clk: qoriq: Move chip-specific knowledge into driver · 0dfc86b3
      Scott Wood authored
      The device tree should describe the chips (or chip-like subblocks) in
      the system, but it generally does not describe individual registers --
      it should identify, rather than describe, a programming interface.
      
      This has not been the case with the QorIQ clockgen nodes.  The
      knowledge of what each bit setting of CLKCnCSR means is encoded in
      three places (binding, pll node, and mux node), and the last also needs
      to know which options are valid on a particular chip.  All three of
      these locations are considered stable ABI, making it difficult to fix
      mistakes (of which I have found several), much less refactor the
      abstraction to be able to address problems, limitations, or new chips.
      
      Under the current binding, a pll clock specifier of 2 means that the
      PLL is divided by 4 -- and the driver implements this, unless there
      happen to be four clock-output-names rather than 3, in which case it
      interprets it as PLL divided by 3.  This does not appear in the binding
      documentation at all.  That hack is now considered stable ABI.
      
      The current device tree nodes contain errors, such as saying that
      T1040 can set a core clock to PLL/4 when only PLL and PLL/2 are options.
      The current binding also ignores some restrictions on clock selection,
      such as p5020's requirement that if a core uses the "wrong" PLL, that
      PLL must be clocked lower than the "correct" PLL and be at most 80% of
      the rated CPU frequency.
      
      Possibly because of the lack of the ability to express such nuance in
      the binding, some valid options are omitted from the device trees, such
      as the ability on p4080 to run cores 0-3 from PLL3 and cores 4-7 from
      PLL1 (again, only if they are at most 80% of rated CPU frequency).
      This omission, combined with excessive caution in the cpufreq driver
      (addressed in a subsequent patch), means that currently on a 1500 MHz
      p4080 with typical PLL configuration, cpufreq can lower the frequency
      to 1200 MHz on half the CPUs and do nothing on the others.  With this
      patchset, all CPUs can be lowered to 1200 MHz on a rev2 p4080, and on a
      rev3 p4080 half can be lowered to 750 MHz and the other half to 600
      MHz.
      
      The current binding only deals with CPU clocks.  To describe FMan in
      the device tree, we need to describe its clock.  Some chips have
      additional muxes that work like the CPU muxes, but are not described in
      the device tree.  Others require inspecting the Reset Control Word to
      determine which PLL is used.  Rather than continue to extend this mess,
      replace it.  Have the driver bind to the chip-specific clockgen
      compatible, and keep the detailed description of quirky chip variations
      in the driver, where it can be easily fixed, refactored, and extended.
      
      Older device trees will continue to work (including a workaround for
      old ls1021a device trees that are missing compatible and reg in the
      clockgen node, which even the old binding required).  The pll/mux
      details in old device trees will be ignored, but "clocks" properties
      pointing at the old nodes will still work, and be directed at the
      corresponding new clock.
      Signed-off-by: default avatarScott Wood <scottwood@freescale.com>
      Acked-by: default avatarStephen Boyd <sboyd@codeaurora.org>
      0dfc86b3
    • Scott Wood's avatar
      powerpc/fsl: Move fsl_guts.h out of arch/powerpc · 94848654
      Scott Wood authored
      Freescale's Layerscape ARM chips use the same structure.
      Signed-off-by: default avatarScott Wood <scottwood@freescale.com>
      94848654
    • Gavin Shan's avatar
      powerpc/eeh: Fix recursive fenced PHB on Broadcom shiner adapter · 353169ac
      Gavin Shan authored
      Similar to commit b6541db1 ("powerpc/eeh: Block PCI config access
      upon frozen PE"), this blocks the PCI config space of Broadcom
      Shiner adapter until PE reset is completed, to avoid recursive
      fenced PHB when dumping PCI config registers during the period
      of error recovery.
      
         ~# lspci -ns 0003:03:00.0
         0003:03:00.0 0200: 14e4:168a (rev 10)
         ~# lspci -s 0003:03:00.0
         0003:03:00.0 Ethernet controller: Broadcom Corporation \
                      NetXtreme II BCM57800 1/10 Gigabit Ethernet (rev 10)
      Signed-off-by: default avatarGavin Shan <gwshan@linux.vnet.ibm.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      353169ac
    • Gavin Shan's avatar
      powerpc/powernv: Simplify pnv_eeh_set_option() · f9433718
      Gavin Shan authored
      This simplifies pnv_eeh_set_option() to avoid unnecessary nested
      if statements, to improve readability. No functional changes.
      Signed-off-by: default avatarGavin Shan <gwshan@linux.vnet.ibm.com>
      Reviewed-by: default avatarAndrew Donnellan <andrew.donnellan@au1.ibm.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      f9433718
    • Gavin Shan's avatar
      powerpc/powernv: Remove pnv_eeh_cap_start() · 4d6186ca
      Gavin Shan authored
      This moves the logic of pnv_eeh_cap_start() to pnv_eeh_find_cap()
      as the function is only called by pnv_eeh_find_cap(). The logic
      of both functions are pretty simple. No need to have separate
      functions.
      Signed-off-by: default avatarGavin Shan <gwshan@linux.vnet.ibm.com>
      Reviewed-by: default avatarAndrew Donnellan <andrew.donnellan@au1.ibm.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      4d6186ca
    • Gavin Shan's avatar
      powerpc/powernv: Cleanup on EEH comments · 608fb9c2
      Gavin Shan authored
      This applies cleanup on eeh-powernv.c, no functional changes:
      
         * Remove unnecessary comments and empty line.
         * Correct inaccurate comments.
      Signed-off-by: default avatarGavin Shan <gwshan@linux.vnet.ibm.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      608fb9c2
    • Gavin Shan's avatar
      powerpc/pseries: Cleanup on pseries_eeh_get_state() · 00ba05a1
      Gavin Shan authored
      This cleans up pseries_eeh_get_state(), no functional changes:
      
         * Return EEH_STATE_NOT_SUPPORT early when the 2nd RTAS output
           argument is zero to avoid nested if statements.
         * Skip clearing bits in the PE state represented by variable
           "result" to simplify the code.
      Signed-off-by: default avatarGavin Shan <gwshan@linux.vnet.ibm.com>
      Reviewed-by: default avatarAndrew Donnellan <andrew.donnellan@au1.ibm.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      00ba05a1
    • Gavin Shan's avatar
      powerpc/eeh: More relaxed condition for enabled IO path · 872ee2d6
      Gavin Shan authored
      When one or both of the below two flags are marked in the PE state, the
      PE's IO path is regarded as enabled: EEH_STATE_MMIO_ACTIVE or
      EEH_STATE_MMIO_ENABLED.
      Signed-off-by: default avatarGavin Shan <gwshan@linux.vnet.ibm.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      872ee2d6
    • Gavin Shan's avatar
      powerpc/eeh: Force reset on fenced PHB · 8234fced
      Gavin Shan authored
      On fenced PHB, the error handlers in the drivers of its subordinate
      devices could return PCI_ERS_RESULT_CAN_RECOVER, indicating no reset
      will be issued during the recovery. It's conflicting with the fact
      that fenced PHB won't be recovered without reset.
      
      This limits the return value from the error handlers in the drivers
      of the fenced PHB's subordinate devices to PCI_ERS_RESULT_NEED_NONE
      or PCI_ERS_RESULT_NEED_RESET, to ensure reset will be issued during
      recovery.
      Signed-off-by: default avatarGavin Shan <gwshan@linux.vnet.ibm.com>
      Reviewed-by: default avatarDaniel Axtens <dja@axtens.net>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      8234fced
    • Gavin Shan's avatar
      powerpc/eeh: More relaxed hotplug criterion · f2da4ccf
      Gavin Shan authored
      Currently, we rely on the existence of struct pci_driver::err_handler
      to decide if the corresponding PCI device should be unplugged during
      EEH recovery (partially hotplug case). However that check is not
      sufficient. Some device drivers implement only some of the EEH error
      handlers to collect diag-data. That means the driver still expects a
      hotplug to recover from the EEH error.
      
      This makes the hotplug criterion more relaxed: if the device driver
      doesn't provide all necessary EEH error handlers, it will experience
      hotplug during EEH recovery.
      Signed-off-by: default avatarGavin Shan <gwshan@linux.vnet.ibm.com>
      [mpe: Minor change log rewording]
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      f2da4ccf
    • Gavin Shan's avatar
      powerpc/eeh: Don't unfreeze PHB PE after reset · 527d10ef
      Gavin Shan authored
      On PowerNV platform, the PE is kept in frozen state until the PE
      reset is completed to avoid recursive EEH error caused by MMIO
      access during the period of EEH reset. The PE's frozen state is
      cleared after BARs of PCI device included in the PE are restored
      and enabled. However, we needn't clear the frozen state for PHB PE
      explicitly at this point as there is no real PE for PHB PE. As the
      PHB PE is always binding with PE#0, we actually clear PE#0, which
      is wrong. It doesn't incur any problem though.
      
      This checks if the PE is PHB PE and doesn't clear the frozen state
      if it is.
      Signed-off-by: default avatarGavin Shan <gwshan@linux.vnet.ibm.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      527d10ef
    • Geoff Levand's avatar
      powerpc/ps3: Quieten boot wrapper output with run_cmd · 879c26d4
      Geoff Levand authored
      Add a boot wrapper script function run_cmd which will run a shell command
      quietly and only print the output if either V=1 or an error occurs.
      
      Also, run the ps3 dd commands with run_cmd to clean up the build output.
      Signed-off-by: default avatarGeoff Levand <geoff@infradead.org>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      879c26d4