* [PATCH v7 3/4] PHY: add APM X-Gene SoC 15Gbps Multi-purpose PHY driver
From: Mark Rutland @ 2014-01-15 12:09 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1389769840-15469-4-git-send-email-lho@apm.com>
On Wed, Jan 15, 2014 at 07:10:39AM +0000, Loc Ho wrote:
[...]
> + * The APM X-Gene PHY consists of two PLL clock macro's (CMU) and lanes.
> + * The first PLL clock macro is used for internal reference clock. The second
> + * PLL clock macro is used to generate the clock for the PHY. This driver
> + * configures the first PLL CMU, the second PLL CMU, and programs the PHY to
> + * operate according to the mode of operation. The first PLL CMU is only
> + * required if internal clock is enabled.
> + *
> + * Logical Layer Out Of HW module units:
> + *
> + * -----------------
> + * | Internal | |------|
> + * | Ref PLL CMU |----| | ------------- ---------
> + * ------------ ---- | MUX |-----|PHY PLL CMU|----| Serdes|
> + * | | | | ---------
> + * External Clock ------| | -------------
> + * |------|
> + *
> + * The Ref PLL CMU CSR (Configureation System Registers) is accessed
> + * indirectly from the SDS offset at 0x2000. It is only required for
> + * internal reference clock.
> + * The PHY PLL CMU CSR is accessed indirectly from the SDS offset at 0x0000.
> + * The Serdes CSR is accessed indirectly from the SDS offset at 0x0400.
> + *
> + * The Ref PLL CMU can be located within the same PHY IP or outside the PHY IP
> + * due to shared Ref PLL CMU. For PHY with Ref PLL CMU shared with another IP,
> + * it is located outside the PHY IP. This is the case for the PHY located
> + * at 0x1f23a000 (SATA Port 4/5). For such PHY, another resource is required
> + * to located the SDS/Ref PLL CMU module and its clock for that IP enabled.
> + *
> + * Currently, this driver only supports SATA mode with external clock.
> + */
Having looked at this and the binding, I'm confused as to why we need an
additional reg entry when we're using the external clock.
Surely the second resource (the external CMU base) is a property of the
shared ref PLL clock, rather than the PHY itself. How do you handle two
units trying to use the shared PLL?
I think makes sense to model the ref PLL CMU as a separate clock, and
use clock-names to differentiate between the two inputs to the mux:
external: external_clock {
compatible = "fixed-clock";
clock-frequency = < ... >;
#clock-cells = <0>;
};
ref_pll: reference_clock {
compatible = "apm,xgene-ref-pll";
reg = < .... >;
#clock-cells = <0>;
};
phy {
compatible = "apm,xgene-phy";
reg = < ... >;
clocks = <&ref_pll>, <&external>;
clock-names = "ref-pll", "external";
...
};
That also means the phy only needs a single compatible string -- you can
figure out what to do by probing the set of clocks.
Does that make sense? Is there something I'm missing?
[...]
> + /* Retrieve optional clock */
> + ctx->clk = clk_get(&pdev->dev, NULL);
There's no clocks proeprty in the binding. Please add one.
Cheers,
Mark.
^ permalink raw reply
* device-tree: at91: irq and gpios: problem while requesting a gpio used as an interrupt source.
From: Jean-Christophe PLAGNIOL-VILLARD @ 2014-01-15 12:02 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <CACh+v5Os_FHh39oXGt=srw0s7bVkpnpH0pQ4ugit_k5BL_k-0A@mail.gmail.com>
On 11:29 Mon 13 Jan , Jean-Jacques Hiblot wrote:
> Hello Nicolas, Jean-Christophe,
>
> As I was trying to enable the touchscreen on the at91sam9261ek with
> device-tree support, I ran into an issue. The touchscreen driver needs
> to know the state of the pendown gpio and also needs it as an
> interrupt source.
>
> The problem is that when a gpio is used as an interrupt, it's
> requested by the pinctrl driver during the xlate stage, marking it
> unavaliable for the other driver.
> It looks like the at91 pinctrl driver is the only one to use
> gpio_request() in the xlate stage. Maybe we should remove this:
>
> diff --git a/drivers/pinctrl/pinctrl-at91.c b/drivers/pinctrl/pinctrl-at91.c
> index a7549c4..cf91a35 100644
> --- a/drivers/pinctrl/pinctrl-at91.c
> +++ b/drivers/pinctrl/pinctrl-at91.c
> @@ -1463,14 +1463,6 @@ static int at91_gpio_irq_domain_xlate(struct
> irq_domain *d,
> *out_hwirq = intspec[0];
> *out_type = intspec[1] & IRQ_TYPE_SENSE_MASK;
>
> - ret = gpio_request(pin, ctrlr->full_name);
> - if (ret)
> - return ret;
> -
> - ret = gpio_direction_input(pin);
> - if (ret)
> - return ret;
> -
Nack
the gpio is request automaticaly as the driver NEVER need to known
that is a GPIO
Best Regards,
J.
> return 0;
> }
>
> Jean-Jacques
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* [PATCH] mmc: dw_mmc: fix dw_mci_get_cd
From: Seungwon Jeon @ 2014-01-15 11:58 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1389780469-32633-1-git-send-email-zhangfei.gao@linaro.org>
On Wed, January 15, 2014, Zhangfei Gao wrote:
> Introduced from commit bf626e5550f24aec24975a0e85ad8e572ca76a6b
> CDETECT is ignored since negated return value of mmc_gpio_get_cd(mmc)
> can not be checked by IS_ERR_VALUE.
> Add spin_lock_bh(&host->lock) for atomic accessing DW_MMC_CARD_PRESENT,
> otherwise sd detect may occasionally fail.
>
> Signed-off-by: Zhangfei Gao <zhangfei.gao@linaro.org>
> Reported-by: Kevin Hilman <khilman@linaro.org>
> Reviewed-by: Sachin Kamat <sachin.kamat@linaro.org>
> Tested-by: Sachin Kamat <sachin.kamat@linaro.org>
> ---
> drivers/mmc/host/dw_mmc.c | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
> index a776f24f4311..9ded62c8225e 100644
> --- a/drivers/mmc/host/dw_mmc.c
> +++ b/drivers/mmc/host/dw_mmc.c
> @@ -1033,7 +1033,8 @@ static int dw_mci_get_cd(struct mmc_host *mmc)
> int present;
> struct dw_mci_slot *slot = mmc_priv(mmc);
> struct dw_mci_board *brd = slot->host->pdata;
> - int gpio_cd = !mmc_gpio_get_cd(mmc);
> + struct dw_mci *host = slot->host;
> + int gpio_cd = mmc_gpio_get_cd(mmc);
>
> /* Use platform get_cd function, else try onboard card detect */
> if (brd->quirks & DW_MCI_QUIRK_BROKEN_CARD_DETECTION)
> @@ -1041,11 +1042,12 @@ static int dw_mci_get_cd(struct mmc_host *mmc)
> else if (brd->get_cd)
> present = !brd->get_cd(slot->id);
> else if (!IS_ERR_VALUE(gpio_cd))
> - present = !!gpio_cd;
> + present = !gpio_cd;
!!gpio_cd or gpio_cd is correct, isn't it?
Thanks,
Seungwon Jeon
> else
> present = (mci_readl(slot->host, CDETECT) & (1 << slot->id))
> == 0 ? 1 : 0;
>
> + spin_lock_bh(&host->lock);
> if (present) {
> set_bit(DW_MMC_CARD_PRESENT, &slot->flags);
> dev_dbg(&mmc->class_dev, "card is present\n");
> @@ -1053,6 +1055,7 @@ static int dw_mci_get_cd(struct mmc_host *mmc)
> clear_bit(DW_MMC_CARD_PRESENT, &slot->flags);
> dev_dbg(&mmc->class_dev, "card is not present\n");
> }
> + spin_unlock_bh(&host->lock);
>
> return present;
> }
> @@ -2081,7 +2084,7 @@ static int dw_mci_of_get_wp_gpio(struct device *dev, u8 slot)
> return gpio;
> }
>
> -/* find the cd gpio for a given slot; or -1 if none specified */
> +/* find the cd gpio for a given slot */
> static void dw_mci_of_get_cd_gpio(struct device *dev, u8 slot,
> struct mmc_host *mmc)
> {
> --
> 1.7.9.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* [PATCH 3/3] Binding: atmel-wm8904: add option to choose clock
From: Jean-Christophe PLAGNIOL-VILLARD @ 2014-01-15 11:54 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1389669956-2304-4-git-send-email-voice.shen@atmel.com>
On 11:25 Tue 14 Jan , Bo Shen wrote:
> Add the option to choose clock output on which pin connect to SSC.
> Default is on TK pin to SSC, add clk_from_rk_pin option, the clock
> is on RK pin to SSC.
>
> Signed-off-by: Bo Shen <voice.shen@atmel.com>
> ---
>
> Documentation/devicetree/bindings/sound/atmel-wm8904.txt | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/sound/atmel-wm8904.txt b/Documentation/devicetree/bindings/sound/atmel-wm8904.txt
> index 8bbe50c..68a5c1a 100644
> --- a/Documentation/devicetree/bindings/sound/atmel-wm8904.txt
> +++ b/Documentation/devicetree/bindings/sound/atmel-wm8904.txt
> @@ -33,6 +33,8 @@ Required properties:
>
> Optional properties:
> - pinctrl-names, pinctrl-0: Please refer to pinctrl-bindings.txt
> + - clk_from_rk_pin: according to hardware design, clk privide on rk pin
provide
?? no example?
> + to ssc device
>
> Example:
> sound {
> --
> 1.8.5.2
>
^ permalink raw reply
* [PATCH v4 6/6] regmap: spmi: support base and extended register spaces
From: Mark Brown @ 2014-01-15 11:50 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <39f0fd65345f4c2b75b036234514ca02279fc21f.1389738151.git.joshc@codeaurora.org>
On Tue, Jan 14, 2014 at 12:41:40PM -0600, Josh Cartwright wrote:
> SPMI states that a slave may contain two register spaces, the Base
> register space is a 5-bit byte-addressable space accessed via the
> Register Read/Write and Register Zero Write command sequences, and the
Acked-by: Mark Brown <broonie@linaro.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140115/5c25fed0/attachment.sig>
^ permalink raw reply
* [RFC PATCH 1/1] of/irq: create interrupts-extended-2 property
From: Jean-Christophe PLAGNIOL-VILLARD @ 2014-01-15 11:47 UTC (permalink / raw)
To: linux-arm-kernel
The new interrupts-extended property, which reuses the phandle+arguments
pattern used by GPIOs and other core bindings, still have some issue.
If an SoC have already specifiy interrupt and a board want to add specific
interrupt such as GPIO (which can be optionnal) be need to re-define
interrupts-extended. So allow to have an optionnale interrupts-extended-2
property.
Today the problem is ofen solve by defining a gpio-xxx property and then do a gpio_to_irq
in the C code. *Which is wrong!!*. We need to describe the IRQ.
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Grant Likely <grant.likely@linaro.org>
Cc: Rob Herring <rob.herring@calxeda.com>
---
We have the same issue on pinctrl
.../devicetree/bindings/interrupt-controller/interrupts.txt | 4 ++++
drivers/of/irq.c | 10 ++++++++--
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/Documentation/devicetree/bindings/interrupt-controller/interrupts.txt b/Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
index 1486497..5d559fd 100644
--- a/Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
+++ b/Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
@@ -25,8 +25,12 @@ to reference multiple interrupt parents. Each entry in this property contains
both the parent phandle and the interrupt specifier. "interrupts-extended"
should only be used when a device has multiple interrupt parents.
+The "interrupts-extended-2" allow to extend at board level node interrupt without
+having to re-define the SoC interrupts.
+
Example:
interrupts-extended = <&intc1 5 1>, <&intc2 1 0>;
+ interrupts-extended-2 = <&intc1 6 1>
A device node may contain either "interrupts" or "interrupts-extended", but not
both. If both properties are present, then the operating system should log an
diff --git a/drivers/of/irq.c b/drivers/of/irq.c
index 786b0b4..bc36710 100644
--- a/drivers/of/irq.c
+++ b/drivers/of/irq.c
@@ -307,8 +307,14 @@ int of_irq_parse_one(struct device_node *device, int index, struct of_phandle_ar
/* Try the new-style interrupts-extended */
res = of_parse_phandle_with_args(device, "interrupts-extended",
"#interrupt-cells", index, out_irq);
- if (res)
- return -EINVAL;
+ if (res) {
+ /* Try the new-style interrupts-extended-2 */
+ res = of_parse_phandle_with_args(device, "interrupts-extended-2",
+ "#interrupt-cells", index, out_irq);
+ if (res)
+ return -EINVAL;
+ }
+
return of_irq_parse_raw(addr, out_irq);
}
intlen /= sizeof(*intspec);
--
1.8.4.3
^ permalink raw reply related
* [PATCH V6 6/8] Add EFI stub for ARM
From: Leif Lindholm @ 2014-01-15 11:47 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <CAFECyb9jbVHjM7--tRgbjfS9_MaAAvOhR3qXEKPKS6eW23V9Kg@mail.gmail.com>
On Tue, Jan 14, 2014 at 06:16:58PM -0800, Roy Franz wrote:
> >>> + .align 3
> >>> +pe_header:
> >>> + .ascii "PE"
> >>> + .short 0
> >>> +
> >>> +coff_header:
> >>> + .short 0x01c2 @ ARM or Thumb
> >>
> >> Could you explain why you are using 0x1c2 (Thumb) here and not 0x1c0 (ARM) ?
> >
> > Nope. It should be 0x1c0.
>
> OK, now I resolved the nagging feeling that I had already fixed
> this... Right now, the EDK2 UEFI implementation
> requires the machine type for ARM to be "0x1c2". I don't think that
> this is correct, but correcting this in EDK2 slipped through
> the cracks, but is now back on my todo list.
Nope, it should be 0x1c2.
0x1c0 is the COFF code for ARM only, which corresponds roughly with
OABI - which is not supported (and never will be) by the UEFI
specification.
0x1c2 means ARM or Thumb (Interworking), which is what we have.
The UEFI specification (correctly) neglects to even mention 0x1c0
and 0x1c4.
Do also note that the COFF information relates to the executable,
the stub. The rest of the kernel image is just a blob as far as UEFI
is concerned.
> I think that for now we should leave this as 0x1c2 so that the
> unpatched EDK2 builds will boot it, and some time after EDK2 is
> updated
> this can be changed. I'll work on a patch for EDK2 and get the
> discussion going on that list to resolve this in EDK2.
No need.
/
Leif
^ permalink raw reply
* [PATCH 4/4] arm64: topology: Provide relative power numbers for cores
From: Mark Brown @ 2014-01-15 11:38 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1389785930-28507-1-git-send-email-broonie@kernel.org>
From: Mark Brown <broonie@linaro.org>
Provide performance numbers to the scheduler to help it fill the cores in
the system on big.LITTLE systems. With the current scheduler this may
perform poorly for applications that try to do OpenMP style work over all
cores but should help for more common workloads. The current 32 bit ARM
implementation provides a similar estimate so this helps ensure that
work to improve big.LITTLE systems on ARMv7 systems performs similarly
on ARMv8 systems.
The power numbers are the same as for ARMv7 since it seems that the
expected differential between the big and little cores is very similar on
both ARMv7 and ARMv8. In both ARMv7 and ARMv8 cases the numbers were
based on the published DMIPS numbers.
These numbers are just an initial and basic approximation for use with
the current scheduler, it is likely that both experience with silicon
and ongoing work on improving the scheduler will lead to further tuning
or will tune automatically at runtime and so make the specific choice of
numbers here less critical.
Signed-off-by: Mark Brown <broonie@linaro.org>
---
arch/arm64/kernel/topology.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm64/kernel/topology.c b/arch/arm64/kernel/topology.c
index 951b55e24f13..0728264e14ee 100644
--- a/arch/arm64/kernel/topology.c
+++ b/arch/arm64/kernel/topology.c
@@ -177,6 +177,8 @@ struct cpu_efficiency {
* use the default SCHED_POWER_SCALE value for cpu_scale.
*/
static const struct cpu_efficiency table_efficiency[] = {
+ { "arm,cortex-a57", 3891 },
+ { "arm,cortex-a53", 2048 },
{ NULL, },
};
--
1.8.5.2
^ permalink raw reply related
* [PATCH 3/4] arm64: topology: Tell the scheduler about the relative power of cores
From: Mark Brown @ 2014-01-15 11:38 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1389785930-28507-1-git-send-email-broonie@kernel.org>
From: Mark Brown <broonie@linaro.org>
In heterogeneous systems like big.LITTLE systems the scheduler will be
able to make better use of the available cores if we provide power numbers
to it indicating their relative performance. Do this by parsing the CPU
nodes in the DT.
This code currently has no effect as no information on the relative
performance of the cores is provided.
Signed-off-by: Mark Brown <broonie@linaro.org>
---
arch/arm64/kernel/topology.c | 142 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 142 insertions(+)
diff --git a/arch/arm64/kernel/topology.c b/arch/arm64/kernel/topology.c
index 061e3b813b9f..951b55e24f13 100644
--- a/arch/arm64/kernel/topology.c
+++ b/arch/arm64/kernel/topology.c
@@ -19,9 +19,33 @@
#include <linux/nodemask.h>
#include <linux/of.h>
#include <linux/sched.h>
+#include <linux/slab.h>
#include <asm/topology.h>
+/*
+ * cpu power table
+ * This per cpu data structure describes the relative capacity of each core.
+ * On a heteregenous system, cores don't have the same computation capacity
+ * and we reflect that difference in the cpu_power field so the scheduler can
+ * take this difference into account during load balance. A per cpu structure
+ * is preferred because each CPU updates its own cpu_power field during the
+ * load balance except for idle cores. One idle core is selected to run the
+ * rebalance_domains for all idle cores and the cpu_power can be updated
+ * during this sequence.
+ */
+static DEFINE_PER_CPU(unsigned long, cpu_scale);
+
+unsigned long arch_scale_freq_power(struct sched_domain *sd, int cpu)
+{
+ return per_cpu(cpu_scale, cpu);
+}
+
+static void set_power_scale(unsigned int cpu, unsigned long power)
+{
+ per_cpu(cpu_scale, cpu) = power;
+}
+
#ifdef CONFIG_OF
static int __init get_cpu_for_node(struct device_node *node)
{
@@ -137,9 +161,49 @@ static void __init parse_cluster(struct device_node *cluster, int depth)
cluster_id++;
}
+struct cpu_efficiency {
+ const char *compatible;
+ unsigned long efficiency;
+};
+
+/*
+ * Table of relative efficiency of each processors
+ * The efficiency value must fit in 20bit and the final
+ * cpu_scale value must be in the range
+ * 0 < cpu_scale < 3*SCHED_POWER_SCALE/2
+ * in order to return@most 1 when DIV_ROUND_CLOSEST
+ * is used to compute the capacity of a CPU.
+ * Processors that are not defined in the table,
+ * use the default SCHED_POWER_SCALE value for cpu_scale.
+ */
+static const struct cpu_efficiency table_efficiency[] = {
+ { NULL, },
+};
+
+static unsigned long *__cpu_capacity;
+#define cpu_capacity(cpu) __cpu_capacity[cpu]
+
+static unsigned long middle_capacity = 1;
+
+/*
+ * Iterate all CPUs' descriptor in DT and compute the efficiency
+ * (as per table_efficiency). Also calculate a middle efficiency
+ * as close as possible to (max{eff_i} - min{eff_i}) / 2
+ * This is later used to scale the cpu_power field such that an
+ * 'average' CPU is of middle power. Also see the comments near
+ * table_efficiency[] and update_cpu_power().
+ */
static void __init parse_dt_topology(void)
{
+ const struct cpu_efficiency *cpu_eff;
struct device_node *cn;
+ unsigned long min_capacity = ULONG_MAX;
+ unsigned long max_capacity = 0;
+ unsigned long capacity = 0;
+ int cpu;
+
+ __cpu_capacity = kcalloc(nr_cpu_ids, sizeof(*__cpu_capacity),
+ GFP_NOWAIT);
cn = of_find_node_by_path("/cpus");
if (!cn) {
@@ -155,10 +219,84 @@ static void __init parse_dt_topology(void)
if (!cn)
return;
parse_cluster(cn, 0);
+
+ for_each_possible_cpu(cpu) {
+ const u32 *rate;
+ int len;
+
+ /* Too early to use cpu->of_node */
+ cn = of_get_cpu_node(cpu, NULL);
+ if (!cn) {
+ pr_err("Missing device node for CPU %d\n", cpu);
+ continue;
+ }
+
+ for (cpu_eff = table_efficiency; cpu_eff->compatible; cpu_eff++)
+ if (of_device_is_compatible(cn, cpu_eff->compatible))
+ break;
+
+ if (cpu_eff->compatible == NULL) {
+ pr_warn("%s: Unknown CPU type\n", cn->full_name);
+ continue;
+ }
+
+ rate = of_get_property(cn, "clock-frequency", &len);
+ if (!rate || len != 4) {
+ pr_err("%s: Missing clock-frequency property\n",
+ cn->full_name);
+ continue;
+ }
+
+ capacity = ((be32_to_cpup(rate)) >> 20) * cpu_eff->efficiency;
+
+ /* Save min capacity of the system */
+ if (capacity < min_capacity)
+ min_capacity = capacity;
+
+ /* Save max capacity of the system */
+ if (capacity > max_capacity)
+ max_capacity = capacity;
+
+ cpu_capacity(cpu) = capacity;
+ }
+
+ /* If min and max capacities are equal we bypass the update of the
+ * cpu_scale because all CPUs have the same capacity. Otherwise, we
+ * compute a middle_capacity factor that will ensure that the capacity
+ * of an 'average' CPU of the system will be as close as possible to
+ * SCHED_POWER_SCALE, which is the default value, but with the
+ * constraint explained near table_efficiency[].
+ */
+ if (min_capacity == max_capacity)
+ return;
+ else if (4 * max_capacity < (3 * (max_capacity + min_capacity)))
+ middle_capacity = (min_capacity + max_capacity)
+ >> (SCHED_POWER_SHIFT+1);
+ else
+ middle_capacity = ((max_capacity / 3)
+ >> (SCHED_POWER_SHIFT-1)) + 1;
+
+}
+
+/*
+ * Look for a customed capacity of a CPU in the cpu_topo_data table during the
+ * boot. The update of all CPUs is in O(n^2) for heteregeneous system but the
+ * function returns directly for SMP system.
+ */
+static void update_cpu_power(unsigned int cpu)
+{
+ if (!cpu_capacity(cpu))
+ return;
+
+ set_power_scale(cpu, cpu_capacity(cpu) / middle_capacity);
+
+ pr_info("CPU%u: update cpu_power %lu\n",
+ cpu, arch_scale_freq_power(NULL, cpu));
}
#else
static inline void parse_dt_topology(void) {}
+static inline void update_cpu_power(unsigned int cpuid) {}
#endif
/*
@@ -207,6 +345,8 @@ void store_cpu_topology(unsigned int cpuid)
pr_info("CPU%u: No topology information configured\n", cpuid);
else
update_siblings_masks(cpuid);
+
+ update_cpu_power(cpuid);
}
/*
@@ -226,6 +366,8 @@ void __init init_cpu_topology(void)
cpu_topo->cluster_id = -1;
cpumask_clear(&cpu_topo->core_sibling);
cpumask_clear(&cpu_topo->thread_sibling);
+
+ set_power_scale(cpu, SCHED_POWER_SCALE);
}
parse_dt_topology();
--
1.8.5.2
^ permalink raw reply related
* [PATCH 2/4] arm64: topology: Add support for topology DT bindings
From: Mark Brown @ 2014-01-15 11:38 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1389785930-28507-1-git-send-email-broonie@kernel.org>
From: Mark Brown <broonie@linaro.org>
Add support for parsing the explicit topology bindings to discover the
topology of the system.
Since it is not currently clear how to map multi-level clusters for the
scheduler all leaf clusters are presented to the scheduler at the same
level. This should be enough to provide good support for current systems.
Signed-off-by: Mark Brown <broonie@linaro.org>
---
arch/arm64/kernel/topology.c | 143 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 143 insertions(+)
diff --git a/arch/arm64/kernel/topology.c b/arch/arm64/kernel/topology.c
index a6d4ed2d69c0..061e3b813b9f 100644
--- a/arch/arm64/kernel/topology.c
+++ b/arch/arm64/kernel/topology.c
@@ -17,10 +17,150 @@
#include <linux/percpu.h>
#include <linux/node.h>
#include <linux/nodemask.h>
+#include <linux/of.h>
#include <linux/sched.h>
#include <asm/topology.h>
+#ifdef CONFIG_OF
+static int __init get_cpu_for_node(struct device_node *node)
+{
+ struct device_node *cpu_node;
+ int cpu;
+
+ cpu_node = of_parse_phandle(node, "cpu", 0);
+ if (!cpu_node)
+ return -1;
+
+ for_each_possible_cpu(cpu) {
+ if (of_get_cpu_node(cpu, NULL) == cpu_node)
+ return cpu;
+ }
+
+ pr_crit("Unable to find CPU node for %s\n", cpu_node->full_name);
+ return -1;
+}
+
+static void __init parse_core(struct device_node *core, int cluster_id,
+ int core_id)
+{
+ char name[10];
+ bool leaf = true;
+ int i = 0;
+ int cpu;
+ struct device_node *t;
+
+ do {
+ snprintf(name, sizeof(name), "thread%d", i);
+ t = of_get_child_by_name(core, name);
+ if (t) {
+ leaf = false;
+ cpu = get_cpu_for_node(t);
+ if (cpu >= 0) {
+ cpu_topology[cpu].cluster_id = cluster_id;
+ cpu_topology[cpu].core_id = core_id;
+ cpu_topology[cpu].thread_id = i;
+ } else {
+ pr_err("%s: Can't get CPU for thread\n",
+ t->full_name);
+ }
+ }
+ i++;
+ } while (t);
+
+ cpu = get_cpu_for_node(core);
+ if (cpu >= 0) {
+ if (!leaf) {
+ pr_err("%s: Core has both threads and CPU\n",
+ core->full_name);
+ return;
+ }
+
+ cpu_topology[cpu].cluster_id = cluster_id;
+ cpu_topology[cpu].core_id = core_id;
+ } else if (leaf) {
+ pr_err("%s: Can't get CPU for leaf core\n", core->full_name);
+ }
+}
+
+static void __init parse_cluster(struct device_node *cluster, int depth)
+{
+ char name[10];
+ bool leaf = true;
+ bool has_cores = false;
+ struct device_node *c;
+ static int __initdata cluster_id;
+ int core_id = 0;
+ int i;
+
+ /*
+ * First check for child clusters; we currently ignore any
+ * information about the nesting of clusters and present the
+ * scheduler with a flat list of them.
+ */
+ i = 0;
+ do {
+ snprintf(name, sizeof(name), "cluster%d", i);
+ c = of_get_child_by_name(cluster, name);
+ if (c) {
+ parse_cluster(c, depth + 1);
+ leaf = false;
+ }
+ i++;
+ } while (c);
+
+ /* Now check for cores */
+ i = 0;
+ do {
+ snprintf(name, sizeof(name), "core%d", i);
+ c = of_get_child_by_name(cluster, name);
+ if (c) {
+ has_cores = true;
+
+ if (depth == 0)
+ pr_err("%s: cpu-map children should be clusters\n",
+ c->full_name);
+
+ if (leaf)
+ parse_core(c, cluster_id, core_id++);
+ else
+ pr_err("%s: Non-leaf cluster with core %s\n",
+ cluster->full_name, name);
+ }
+ i++;
+ } while (c);
+
+ if (leaf && !has_cores)
+ pr_warn("%s: empty cluster\n", cluster->full_name);
+
+ if (leaf)
+ cluster_id++;
+}
+
+static void __init parse_dt_topology(void)
+{
+ struct device_node *cn;
+
+ cn = of_find_node_by_path("/cpus");
+ if (!cn) {
+ pr_err("No CPU information found in DT\n");
+ return;
+ }
+
+ /*
+ * When topology is provided cpu-map is essentially a root
+ * cluster with restricted subnodes.
+ */
+ cn = of_find_node_by_name(cn, "cpu-map");
+ if (!cn)
+ return;
+ parse_cluster(cn, 0);
+}
+
+#else
+static inline void parse_dt_topology(void) {}
+#endif
+
/*
* cpu topology table
*/
@@ -87,5 +227,8 @@ void __init init_cpu_topology(void)
cpumask_clear(&cpu_topo->core_sibling);
cpumask_clear(&cpu_topo->thread_sibling);
}
+
+ parse_dt_topology();
+
smp_wmb();
}
--
1.8.5.2
^ permalink raw reply related
* [PATCH 1/4] arm64: topology: Implement basic CPU topology support
From: Mark Brown @ 2014-01-15 11:38 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1389785930-28507-1-git-send-email-broonie@kernel.org>
From: Mark Brown <broonie@linaro.org>
Add basic CPU topology support to arm64, based on the existing pre-v8
code and some work done by Mark Hambleton. This patch does not
implement any topology discovery support since that should be based on
information from firmware, it merely implements the scaffolding for
integration of topology support in the architecture.
The goal is to separate the architecture hookup for providing topology
information from the DT parsing in order to ease review and avoid
blocking the architecture code (which will be built on by other work)
with the DT code review by providing something simple and basic.
A following patch will implement support for parsing the DT topology
bindings for ARM, similar patches will be needed for ACPI.
Signed-off-by: Mark Brown <broonie@linaro.org>
---
arch/arm64/Kconfig | 24 +++++++++++
arch/arm64/include/asm/topology.h | 39 +++++++++++++++++
arch/arm64/kernel/Makefile | 1 +
arch/arm64/kernel/smp.c | 11 +++++
arch/arm64/kernel/topology.c | 91 +++++++++++++++++++++++++++++++++++++++
5 files changed, 166 insertions(+)
create mode 100644 arch/arm64/include/asm/topology.h
create mode 100644 arch/arm64/kernel/topology.c
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index dd4327f09ba4..02309c3eec33 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -163,6 +163,30 @@ config SMP
If you don't know what to do here, say N.
+config CPU_TOPOLOGY
+ bool "Support CPU topology definition"
+ depends on SMP
+ default y
+ help
+ Support CPU topology definition, based on configuration
+ provided by the firmware.
+
+config SCHED_MC
+ bool "Multi-core scheduler support"
+ depends on CPU_TOPOLOGY
+ help
+ Multi-core scheduler support improves the CPU scheduler's decision
+ making when dealing with multi-core CPU chips at a cost of slightly
+ increased overhead in some places. If unsure say N here.
+
+config SCHED_SMT
+ bool "SMT scheduler support"
+ depends on CPU_TOPOLOGY
+ help
+ Improves the CPU scheduler's decision making when dealing with
+ MultiThreading at a cost of slightly increased overhead in some
+ places. If unsure say N here.
+
config NR_CPUS
int "Maximum number of CPUs (2-32)"
range 2 32
diff --git a/arch/arm64/include/asm/topology.h b/arch/arm64/include/asm/topology.h
new file mode 100644
index 000000000000..c8a47e8f452b
--- /dev/null
+++ b/arch/arm64/include/asm/topology.h
@@ -0,0 +1,39 @@
+#ifndef __ASM_TOPOLOGY_H
+#define __ASM_TOPOLOGY_H
+
+#ifdef CONFIG_CPU_TOPOLOGY
+
+#include <linux/cpumask.h>
+
+struct cpu_topology {
+ int thread_id;
+ int core_id;
+ int cluster_id;
+ cpumask_t thread_sibling;
+ cpumask_t core_sibling;
+};
+
+extern struct cpu_topology cpu_topology[NR_CPUS];
+
+#define topology_physical_package_id(cpu) (cpu_topology[cpu].cluster_id)
+#define topology_core_id(cpu) (cpu_topology[cpu].core_id)
+#define topology_core_cpumask(cpu) (&cpu_topology[cpu].core_sibling)
+#define topology_thread_cpumask(cpu) (&cpu_topology[cpu].thread_sibling)
+
+#define mc_capable() (cpu_topology[0].cluster_id != -1)
+#define smt_capable() (cpu_topology[0].thread_id != -1)
+
+void init_cpu_topology(void);
+void store_cpu_topology(unsigned int cpuid);
+const struct cpumask *cpu_coregroup_mask(int cpu);
+
+#else
+
+static inline void init_cpu_topology(void) { }
+static inline void store_cpu_topology(unsigned int cpuid) { }
+
+#endif
+
+#include <asm-generic/topology.h>
+
+#endif /* _ASM_ARM_TOPOLOGY_H */
diff --git a/arch/arm64/kernel/Makefile b/arch/arm64/kernel/Makefile
index 2d4554b13410..252b62181532 100644
--- a/arch/arm64/kernel/Makefile
+++ b/arch/arm64/kernel/Makefile
@@ -20,6 +20,7 @@ arm64-obj-$(CONFIG_HAVE_HW_BREAKPOINT)+= hw_breakpoint.o
arm64-obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
arm64-obj-$(CONFIG_ARM64_CPU_SUSPEND) += sleep.o suspend.o
arm64-obj-$(CONFIG_JUMP_LABEL) += jump_label.o
+arm64-obj-$(CONFIG_CPU_TOPOLOGY) += topology.o
obj-y += $(arm64-obj-y) vdso/
obj-m += $(arm64-obj-m)
diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c
index 1b7617ab499b..faca699de62d 100644
--- a/arch/arm64/kernel/smp.c
+++ b/arch/arm64/kernel/smp.c
@@ -114,6 +114,11 @@ int __cpu_up(unsigned int cpu, struct task_struct *idle)
return ret;
}
+static void smp_store_cpu_info(unsigned int cpuid)
+{
+ store_cpu_topology(cpuid);
+}
+
/*
* This is the secondary CPU boot entry. We're using this CPUs
* idle thread stack, but a set of temporary page tables.
@@ -152,6 +157,8 @@ asmlinkage void secondary_start_kernel(void)
*/
notify_cpu_starting(cpu);
+ smp_store_cpu_info(cpu);
+
/*
* OK, now it's safe to let the boot CPU continue. Wait for
* the CPU migration code to notice that the CPU is online
@@ -391,6 +398,10 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
int err;
unsigned int cpu, ncores = num_possible_cpus();
+ init_cpu_topology();
+
+ smp_store_cpu_info(smp_processor_id());
+
/*
* are we trying to boot more cores than exist?
*/
diff --git a/arch/arm64/kernel/topology.c b/arch/arm64/kernel/topology.c
new file mode 100644
index 000000000000..a6d4ed2d69c0
--- /dev/null
+++ b/arch/arm64/kernel/topology.c
@@ -0,0 +1,91 @@
+/*
+ * arch/arm64/kernel/topology.c
+ *
+ * Copyright (C) 2011,2013 Linaro Limited.
+ *
+ * Based on the arm32 version written by Vincent Guittot in turn based on
+ * arch/sh/kernel/topology.c
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
+ */
+
+#include <linux/cpu.h>
+#include <linux/cpumask.h>
+#include <linux/init.h>
+#include <linux/percpu.h>
+#include <linux/node.h>
+#include <linux/nodemask.h>
+#include <linux/sched.h>
+
+#include <asm/topology.h>
+
+/*
+ * cpu topology table
+ */
+struct cpu_topology cpu_topology[NR_CPUS];
+EXPORT_SYMBOL_GPL(cpu_topology);
+
+const struct cpumask *cpu_coregroup_mask(int cpu)
+{
+ return &cpu_topology[cpu].core_sibling;
+}
+
+static void update_siblings_masks(unsigned int cpuid)
+{
+ struct cpu_topology *cpu_topo, *cpuid_topo = &cpu_topology[cpuid];
+ int cpu;
+
+ /* update core and thread sibling masks */
+ for_each_possible_cpu(cpu) {
+ cpu_topo = &cpu_topology[cpu];
+
+ if (cpuid_topo->cluster_id != cpu_topo->cluster_id)
+ continue;
+
+ cpumask_set_cpu(cpuid, &cpu_topo->core_sibling);
+ if (cpu != cpuid)
+ cpumask_set_cpu(cpu, &cpuid_topo->core_sibling);
+
+ if (cpuid_topo->core_id != cpu_topo->core_id)
+ continue;
+
+ cpumask_set_cpu(cpuid, &cpu_topo->thread_sibling);
+ if (cpu != cpuid)
+ cpumask_set_cpu(cpu, &cpuid_topo->thread_sibling);
+ }
+ smp_wmb();
+}
+
+void store_cpu_topology(unsigned int cpuid)
+{
+ struct cpu_topology *cpuid_topo = &cpu_topology[cpuid];
+
+ /* DT should have been parsed by the time we get here */
+ if (cpuid_topo->core_id == -1)
+ pr_info("CPU%u: No topology information configured\n", cpuid);
+ else
+ update_siblings_masks(cpuid);
+}
+
+/*
+ * init_cpu_topology is called at boot when only one cpu is running
+ * which prevent simultaneous write access to cpu_topology array
+ */
+void __init init_cpu_topology(void)
+{
+ unsigned int cpu;
+
+ /* init core mask and power*/
+ for_each_possible_cpu(cpu) {
+ struct cpu_topology *cpu_topo = &cpu_topology[cpu];
+
+ cpu_topo->thread_id = -1;
+ cpu_topo->core_id = -1;
+ cpu_topo->cluster_id = -1;
+ cpumask_clear(&cpu_topo->core_sibling);
+ cpumask_clear(&cpu_topo->thread_sibling);
+ }
+ smp_wmb();
+}
--
1.8.5.2
^ permalink raw reply related
* [PATCH v12 0/4] arm64 topology
From: Mark Brown @ 2014-01-15 11:38 UTC (permalink / raw)
To: linux-arm-kernel
Another round of cosmetic updates here, this should address everything
from the last round.
arm64: topology: Implement basic CPU topology support
arm64: topology: Add support for topology DT bindings
arm64: topology: Tell the scheduler about the relative
arm64: topology: Provide relative power numbers for cores
^ permalink raw reply
* [PATCH v2 01/12] at91: dt: Add at91sam9261 dt SoC support
From: Jean-Christophe PLAGNIOL-VILLARD @ 2014-01-15 11:31 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <52D56D5B.5000505@atmel.com>
On 18:01 Tue 14 Jan , Nicolas Ferre wrote:
> On 09/01/2014 13:31, Jean-Jacques Hiblot :
> > This patch adds the basics to support the Device Tree on a sam9261-based platform
> >
> > Signed-off-by: Jean-Jacques Hiblot <jjhiblot@traphandler.com>
> > ---
> > arch/arm/boot/dts/at91sam9261.dtsi | 476 +++++++++++++++++++++++++++++++++++++
> > arch/arm/mach-at91/at91sam9261.c | 15 ++
> > 2 files changed, 491 insertions(+)
> > create mode 100644 arch/arm/boot/dts/at91sam9261.dtsi
> >
> > diff --git a/arch/arm/boot/dts/at91sam9261.dtsi b/arch/arm/boot/dts/at91sam9261.dtsi
> > new file mode 100644
> > index 0000000..773c3d6
> > --- /dev/null
> > +++ b/arch/arm/boot/dts/at91sam9261.dtsi
> > @@ -0,0 +1,476 @@
> > +/*
> > + * at91sam9261.dtsi - Device Tree Include file for AT91SAM9261 SoC
> > + *
> > + * Copyright (C) 2013 Jean-Jacques Hiblot <jjhiblot@traphandler.com>
> > + *
> > + * Licensed under GPLv2 only.
> > + */
> > +
> > +#include "skeleton.dtsi"
> > +#include <dt-bindings/pinctrl/at91.h>
> > +#include <dt-bindings/interrupt-controller/irq.h>
> > +#include <dt-bindings/gpio/gpio.h>
> > +
> > +/ {
> > + model = "Atmel AT91SAM9261 family SoC";
> > + compatible = "atmel,at91sam9261";
> > + interrupt-parent = <&aic>;
> > +
> > + aliases {
> > + serial0 = &dbgu;
> > + serial1 = &usart0;
> > + serial2 = &usart1;
> > + serial3 = &usart2;
> > + gpio0 = &pioA;
> > + gpio1 = &pioB;
> > + gpio2 = &pioC;
> > + tcb0 = &tcb0;
> > + i2c0 = &i2c0;
> > + ssc0 = &ssc0;
> > + ssc1 = &ssc1;
> > + };
> > + cpus {
> > + #address-cells = <0>;
> > + #size-cells = <0>;
> > +
> > + cpu {
> > + compatible = "arm,arm926ej-s";
> > + device_type = "cpu";
> > + };
> > + };
> > +
> > + memory {
> > + reg = <0x20000000 0x08000000>;
> > + };
> > +
> > + ahb {
> > + compatible = "simple-bus";
> > + #address-cells = <1>;
> > + #size-cells = <1>;
> > + ranges;
> > +
> > + apb {
> > + compatible = "simple-bus";
> > + #address-cells = <1>;
> > + #size-cells = <1>;
> > + ranges;
>
> I know that it is not always done but can you please sort all nodes by
> ascending address order? It is always simple to deal with node additions
> when sorted this way.
>
> > +
> > + aic: interrupt-controller at fffff000 {
> > + #interrupt-cells = <3>;
> > + compatible = "atmel,at91rm9200-aic";
> > + interrupt-controller;
> > + reg = <0xfffff000 0x200>;
> > + atmel,external-irqs = <29 30 31>;
> > + };
> > +
> > + pmc: pmc at fffffc00 {
> > + compatible = "atmel,at91rm9200-pmc";
> > + reg = <0xfffffc00 0x100>;
> > + };
> > +
> > + ramc: ramc at ffffea00 {
> > + compatible = "atmel,at91sam9260-sdramc";
> > + reg = <0xffffea00 0x200>;
> > + };
> > +
> > + pit: timer at fffffd30 {
> > + compatible = "atmel,at91sam9260-pit";
> > + reg = <0xfffffd30 0xf>;
> > + interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
> > + };
> > +
> > + tcb0: timer at fffa0000 {
> > + compatible = "atmel,at91rm9200-tcb";
> > + reg = <0xfffa0000 0x100>;
> > + interrupts = < 17 IRQ_TYPE_LEVEL_HIGH 0
> > + 18 IRQ_TYPE_LEVEL_HIGH 0
> > + 19 IRQ_TYPE_LEVEL_HIGH 0
> > + >;
> > + status = "disabled";
> > + };
> > +
> > + rstc at fffffd00 {
> > + compatible = "atmel,at91sam9260-rstc";
> > + reg = <0xfffffd00 0x10>;
> > + };
> > +
> > + shdwc at fffffd10 {
> > + compatible = "atmel,at91sam9260-shdwc";
> > + reg = <0xfffffd10 0x10>;
> > + };
> > +
> > + pinctrl at fffff400 {
> > + #address-cells = <1>;
> > + #size-cells = <1>;
> > + compatible = "atmel,at91rm9200-pinctrl", "simple-bus";
> > + ranges = <0xfffff400 0xfffff400 0xa00>;
> > +
> > + atmel,mux-mask = <
> > + /* A B */
> > + 0xffffffff 0xfffffff7 /* pioA */
> > + 0xffffffff 0xfffffff4 /* pioB */
> > + 0xffffffff 0xffffff07 /* pioC */
> > + >;
> > +
> > + /* shared pinctrl settings */
> > + dbgu {
> > + pinctrl_dbgu: dbgu-0 {
> > + atmel,pins =
> > + <AT91_PIOA 9 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA9 periph A */
>
> You may have to remove comments for pin descriptions. It is not needed
> anymore with pre-processor macros.
>
> > + AT91_PIOA 10 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>; /* PA10 periph A with pullup */
> > + };
> > + };
> > +
> > + usart0 {
> > + pinctrl_usart0: usart0-0 {
> > + atmel,pins =
> > + <AT91_PIOC 8 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PC8 periph A with pullup */
> > + AT91_PIOC 9 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PC9 periph A */
> > + };
> > +
> > + pinctrl_usart0_rts: usart0_rts-0 {
> > + atmel,pins =
> > + <AT91_PIOC 10 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PC10 periph A */
> > + };
> > +
> > + pinctrl_usart0_cts: usart0_cts-0 {
> > + atmel,pins =
> > + <AT91_PIOC 11 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PC11 periph A */
> > + };
> > + };
> > +
> > + usart1 {
> > + pinctrl_usart1: usart1-0 {
> > + atmel,pins =
> > + <AT91_PIOC 12 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PC12 periph A with pullup */
> > + AT91_PIOC 13 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PC13 periph A */
> > + };
> > +
> > + pinctrl_usart1_rts: usart1_rts-0 {
> > + atmel,pins =
> > + <AT91_PIOA 12 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PA12 periph B */
> > + };
> > +
> > + pinctrl_usart1_cts: usart1_cts-0 {
> > + atmel,pins =
> > + <AT91_PIOA 13 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PA13 periph B */
> > + };
> > + };
> > +
> > + usart2 {
> > + pinctrl_usart2: usart2-0 {
> > + atmel,pins =
> > + <AT91_PIOC 14 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PC14 periph A with pullup */
> > + AT91_PIOC 15 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PC15 periph A */
> > + };
> > +
> > + pinctrl_usart2_rts: usart2_rts-0 {
> > + atmel,pins =
> > + <AT91_PIOA 15 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PA15 periph B */
> > + };
> > +
> > + pinctrl_usart2_cts: usart2_cts-0 {
> > + atmel,pins =
> > + <AT91_PIOA 16 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PA16 periph B */
> > + };
> > + };
> > +
> > + nand {
> > + pinctrl_nand: nand-0 {
> > + atmel,pins =
> > + <AT91_PIOC 15 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP /* PC15 gpio RDY pin pull_up*/
> > + AT91_PIOC 14 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP>; /* PC14 gpio enable pin pull_up */
> > + };
> > + };
> > +
> > + mmc0 {
> > + pinctrl_mmc0_clk: mmc0_clk-0 {
> > + atmel,pins =
> > + <AT91_PIOA 2 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PA2 periph B */
> > + };
> > +
> > + pinctrl_mmc0_slot0_cmd_dat0: mmc0_slot0_cmd_dat0-0 {
> > + atmel,pins =
> > + <AT91_PIOA 1 AT91_PERIPH_B AT91_PINCTRL_PULL_UP /* PA1 periph B with pullup */
> > + AT91_PIOA 0 AT91_PERIPH_B AT91_PINCTRL_PULL_UP>; /* PA0 periph B with pullup */
> > + };
> > +
> > + pinctrl_mmc0_slot0_dat1_3: mmc0_slot0_dat1_3-0 {
> > + atmel,pins =
> > + <AT91_PIOA 4 AT91_PERIPH_B AT91_PINCTRL_PULL_UP /* PA4 periph B with pullup */
> > + AT91_PIOA 5 AT91_PERIPH_B AT91_PINCTRL_PULL_UP /* PA5 periph B with pullup */
> > + AT91_PIOA 6 AT91_PERIPH_B AT91_PINCTRL_PULL_UP>; /* PA6 periph B with pullup */
> > + };
> > + };
> > +
> > + ssc0 {
> > + pinctrl_ssc0_tx: ssc0_tx-0 {
> > + atmel,pins =
> > + <AT91_PIOB 21 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB21 periph A */
> > + AT91_PIOB 22 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB22 periph A */
> > + AT91_PIOB 23 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB23 periph A */
> > + };
> > +
> > + pinctrl_ssc0_rx: ssc0_rx-0 {
> > + atmel,pins =
> > + <AT91_PIOB 24 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB24 periph A */
> > + AT91_PIOB 25 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB25 periph A */
> > + AT91_PIOB 26 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB26 periph A */
> > + };
> > + };
> > +
> > + ssc1 {
> > + pinctrl_ssc1_tx: ssc1_tx-0 {
> > + atmel,pins =
> > + <AT91_PIOA 17 AT91_PERIPH_B AT91_PINCTRL_NONE /* PA17 periph B */
> > + AT91_PIOA 18 AT91_PERIPH_B AT91_PINCTRL_NONE /* PA18 periph B */
> > + AT91_PIOA 19 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PA19 periph B */
> > + };
> > +
> > + pinctrl_ssc1_rx: ssc1_rx-0 {
> > + atmel,pins =
> > + <AT91_PIOA 20 AT91_PERIPH_B AT91_PINCTRL_NONE /* PA20 periph B */
> > + AT91_PIOA 21 AT91_PERIPH_B AT91_PINCTRL_NONE /* PA21 periph B */
> > + AT91_PIOA 22 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PA22 periph B */
> > + };
> > + };
> > +
> > + spi0 {
> > + pinctrl_spi0: spi0-0 {
> > + atmel,pins =
> > + <AT91_PIOA 0 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA0 periph A SPI0_MISO pin */
> > + AT91_PIOA 1 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA1 periph A SPI0_MOSI pin */
> > + AT91_PIOA 2 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PA2 periph A SPI0_SPCK pin */
> > + };
> > + };
> > +
> > + spi1 {
> > + pinctrl_spi1: spi1-0 {
> > + atmel,pins =
> > + <AT91_PIOB 30 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB30 periph A SPI1_MISO pin */
> > + AT91_PIOB 31 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB31 periph A SPI1_MOSI pin */
> > + AT91_PIOB 29 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB29 periph A SPI1_SPCK pin */
> > + };
> > + };
> > +
> > + tcb0 {
> > + pinctrl_tcb0_tclk0: tcb0_tclk0-0 {
> > + atmel,pins = <AT91_PIOC 16 AT91_PERIPH_B AT91_PINCTRL_NONE>;
> > + };
> > +
> > + pinctrl_tcb0_tclk1: tcb0_tclk1-0 {
> > + atmel,pins = <AT91_PIOC 17 AT91_PERIPH_B AT91_PINCTRL_NONE>;
> > + };
> > +
> > + pinctrl_tcb0_tclk2: tcb0_tclk2-0 {
> > + atmel,pins = <AT91_PIOC 18 AT91_PERIPH_B AT91_PINCTRL_NONE>;
> > + };
> > +
> > + pinctrl_tcb0_tioa0: tcb0_tioa0-0 {
> > + atmel,pins = <AT91_PIOC 19 AT91_PERIPH_B AT91_PINCTRL_NONE>;
> > + };
> > +
> > + pinctrl_tcb0_tioa1: tcb0_tioa1-0 {
> > + atmel,pins = <AT91_PIOC 21 AT91_PERIPH_B AT91_PINCTRL_NONE>;
> > + };
> > +
> > + pinctrl_tcb0_tioa2: tcb0_tioa2-0 {
> > + atmel,pins = <AT91_PIOC 23 AT91_PERIPH_B AT91_PINCTRL_NONE>;
> > + };
> > +
> > + pinctrl_tcb0_tiob0: tcb0_tiob0-0 {
> > + atmel,pins = <AT91_PIOC 20 AT91_PERIPH_B AT91_PINCTRL_NONE>;
> > + };
> > +
> > + pinctrl_tcb0_tiob1: tcb0_tiob1-0 {
> > + atmel,pins = <AT91_PIOC 22 AT91_PERIPH_B AT91_PINCTRL_NONE>;
> > + };
> > +
> > + pinctrl_tcb0_tiob2: tcb0_tiob2-0 {
> > + atmel,pins = <AT91_PIOC 24 AT91_PERIPH_B AT91_PINCTRL_NONE>;
> > + };
> > + };
> > +
> > + pioA: gpio at fffff400 {
> > + compatible = "atmel,at91rm9200-gpio";
> > + reg = <0xfffff400 0x200>;
> > + interrupts = <2 IRQ_TYPE_LEVEL_HIGH 1>;
> > + #gpio-cells = <2>;
> > + gpio-controller;
> > + interrupt-controller;
> > + #interrupt-cells = <2>;
> > + };
> > +
> > + pioB: gpio at fffff600 {
> > + compatible = "atmel,at91rm9200-gpio";
> > + reg = <0xfffff600 0x200>;
> > + interrupts = <3 IRQ_TYPE_LEVEL_HIGH 1>;
> > + #gpio-cells = <2>;
> > + gpio-controller;
> > + interrupt-controller;
> > + #interrupt-cells = <2>;
> > + };
> > +
> > + pioC: gpio at fffff800 {
> > + compatible = "atmel,at91rm9200-gpio";
> > + reg = <0xfffff800 0x200>;
> > + interrupts = <4 IRQ_TYPE_LEVEL_HIGH 1>;
> > + #gpio-cells = <2>;
> > + gpio-controller;
> > + interrupt-controller;
> > + #interrupt-cells = <2>;
> > + };
> > + };
> > +
> > + dbgu: serial at fffff200 {
> > + compatible = "atmel,at91sam9260-usart";
> > + reg = <0xfffff200 0x200>;
> > + interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
> > + pinctrl-names = "default";
> > + pinctrl-0 = <&pinctrl_dbgu>;
> > + status = "disabled";
> > + };
> > +
> > + usart0: serial at fffb0000 {
> > + compatible = "atmel,at91sam9260-usart";
> > + reg = <0xfffb0000 0x200>;
> > + interrupts = <6 IRQ_TYPE_LEVEL_HIGH 5>;
> > + atmel,use-dma-rx;
> > + atmel,use-dma-tx;
> > + pinctrl-names = "default";
> > + pinctrl-0 = <&pinctrl_usart0>;
> > + status = "disabled";
> > + };
> > +
> > + usart1: serial at ffffb400 {
> > + compatible = "atmel,at91sam9260-usart";
> > + reg = <0xfffb4000 0x200>;
> > + interrupts = <7 IRQ_TYPE_LEVEL_HIGH 5>;
> > + atmel,use-dma-rx;
> > + atmel,use-dma-tx;
> > + pinctrl-names = "default";
> > + pinctrl-0 = <&pinctrl_usart1>;
> > + status = "disabled";
> > + };
> > +
> > + usart2: serial at fff94000 {
> > + compatible = "atmel,at91sam9260-usart";
> > + reg = <0xfffb8000 0x200>;
> > + interrupts = <8 IRQ_TYPE_LEVEL_HIGH 5>;
> > + atmel,use-dma-rx;
> > + atmel,use-dma-tx;
> > + pinctrl-names = "default";
> > + pinctrl-0 = <&pinctrl_usart2>;
> > + status = "disabled";
> > + };
> > +
> > + ssc0: ssc at fffbc000 {
> > + compatible = "atmel,at91rm9200-ssc";
> > + reg = <0xfffbc000 0x4000>;
> > + interrupts = <14 IRQ_TYPE_LEVEL_HIGH 5>;
> > + pinctrl-names = "default";
> > + pinctrl-0 = <&pinctrl_ssc0_tx &pinctrl_ssc0_rx>;
> > + status = "disabled";
> > + };
> > +
> > + ssc1: ssc at fffc0000 {
> > + compatible = "atmel,at91rm9200-ssc";
> > + reg = <0xfffc0000 0x4000>;
> > + interrupts = <15 IRQ_TYPE_LEVEL_HIGH 5>;
> > + pinctrl-names = "default";
> > + pinctrl-0 = <&pinctrl_ssc1_tx &pinctrl_ssc1_rx>;
> > + status = "disabled";
> > + };
> > +
> > + usb1: gadget at fffa4000 {
> > + compatible = "atmel,at91rm9200-udc";
> > + reg = <0xfffa4000 0x4000>;
> > + interrupts = <10 IRQ_TYPE_LEVEL_HIGH 2>;
> > + status = "disabled";
> > + };
> > +
> > + i2c0: i2c at fffac000 {
> > + compatible = "atmel,at91sam9261-i2c";
>
> isn't it "atmel,at91sam9260-i2c" ?
>
> > + reg = <0xfffac000 0x100>;
> > + interrupts = <11 IRQ_TYPE_LEVEL_HIGH 6>;
> > + #address-cells = <1>;
> > + #size-cells = <0>;
> > + status = "disabled";
> > + };
> > +
> > + mmc0: mmc at fffa8000 {
> > + compatible = "atmel,hsmci";
> > + reg = <0xfffa8000 0x600>;
> > + interrupts = <9 IRQ_TYPE_LEVEL_HIGH 0>;
> > + #address-cells = <1>;
> > + #size-cells = <0>;
> > + status = "disabled";
> > + };
> > +
> > + watchdog at fffffd40 {
> > + compatible = "atmel,at91sam9260-wdt";
> > + reg = <0xfffffd40 0x10>;
> > + status = "disabled";
> > + };
> > +
> > + spi0: spi at fffc8000 {
> > + #address-cells = <1>;
> > + #size-cells = <0>;
> > + compatible = "atmel,at91rm9200-spi";
> > + reg = <0xfffc8000 0x200>;
> > + interrupts = <12 IRQ_TYPE_LEVEL_HIGH 3>;
> > + pinctrl-names = "default";
> > + pinctrl-0 = <&pinctrl_spi0>;
> > + status = "disabled";
> > + };
> > +
> > + spi1: spi at fffcc000 {
> > + #address-cells = <1>;
> > + #size-cells = <0>;
> > + compatible = "atmel,at91rm9200-spi";
> > + reg = <0xfffcc000 0x200>;
> > + interrupts = <13 IRQ_TYPE_LEVEL_HIGH 3>;
> > + pinctrl-names = "default";
> > + pinctrl-0 = <&pinctrl_spi1>;
> > + status = "disabled";
> > + };
> > + };
> > +
> > + nand0: nand at 40000000 {
> > + compatible = "atmel,at91rm9200-nand";
> > + #address-cells = <1>;
> > + #size-cells = <1>;
> > + reg = <0x40000000 0x10000000>;
> > + atmel,nand-addr-offset = <22>;
> > + atmel,nand-cmd-offset = <21>;
> > + pinctrl-names = "default";
> > + pinctrl-0 = <&pinctrl_nand>;
> > +
> > + gpios = <&pioC 15 GPIO_ACTIVE_HIGH
> > + &pioC 14 GPIO_ACTIVE_HIGH
> > + 0
> > + >;
> > + status = "disabled";
> > + };
> > +
> > + usb0: ohci at 00500000 {
> > + compatible = "atmel,at91rm9200-ohci", "usb-ohci";
> > + reg = <0x00500000 0x100000>;
> > + interrupts = <20 IRQ_TYPE_LEVEL_HIGH 2>;
> > + status = "disabled";
> > + };
> > + };
> > +
> > + i2c at 0 {
> > + compatible = "i2c-gpio";
> > + gpios = <&pioA 7 GPIO_ACTIVE_HIGH /* sda */
> > + &pioA 8 GPIO_ACTIVE_HIGH /* scl */
> > + >;
> > + i2c-gpio,sda-open-drain;
> > + i2c-gpio,scl-open-drain;
> > + i2c-gpio,delay-us = <2>; /* ~100 kHz */
> > + #address-cells = <1>;
> > + #size-cells = <0>;
> > + status = "disabled";
> > + };
> > +};
> > diff --git a/arch/arm/mach-at91/at91sam9261.c b/arch/arm/mach-at91/at91sam9261.c
> > index 6276b4c..200d17a 100644
> > --- a/arch/arm/mach-at91/at91sam9261.c
> > +++ b/arch/arm/mach-at91/at91sam9261.c
> > @@ -189,6 +189,21 @@ static struct clk_lookup periph_clocks_lookups[] = {
> > CLKDEV_CON_ID("pioA", &pioA_clk),
> > CLKDEV_CON_ID("pioB", &pioB_clk),
> > CLKDEV_CON_ID("pioC", &pioC_clk),
> > + /* more usart lookup table for DT entries */
> > + CLKDEV_CON_DEV_ID("usart", "fffff200.serial", &mck),
> > + CLKDEV_CON_DEV_ID("usart", "fffb0000.serial", &usart0_clk),
> > + CLKDEV_CON_DEV_ID("usart", "ffffb400.serial", &usart1_clk),
> > + CLKDEV_CON_DEV_ID("usart", "fff94000.serial", &usart2_clk),
> > + /* more tc lookup table for DT entries */
> > + CLKDEV_CON_DEV_ID("t0_clk", "fffa0000.timer", &tc0_clk),
> > + CLKDEV_CON_DEV_ID("hclk", "500000.ohci", &ohci_clk),
> > + CLKDEV_CON_DEV_ID("spi_clk", "fffc8000.spi", &spi0_clk),
> > + CLKDEV_CON_DEV_ID("spi_clk", "fffcc000.spi", &spi1_clk),
> > + CLKDEV_CON_DEV_ID("mci_clk", "fffa8000.mmc", &mmc_clk),
> > + CLKDEV_CON_DEV_ID(NULL, "fffac000.i2c", &twi_clk),
> > + CLKDEV_CON_DEV_ID(NULL, "fffff400.gpio", &pioA_clk),
> > + CLKDEV_CON_DEV_ID(NULL, "fffff600.gpio", &pioB_clk),
> > + CLKDEV_CON_DEV_ID(NULL, "fffff800.gpio", &pioC_clk),
>
> Yes, this is where I would like the CCF to be implemented...
all new SoC need to CCF the old implementation is just for already present SoC
in dt
and also no interrupt-parent and interrupts anymore
we use now interrupts-extended
Best Regards,
J.
^ permalink raw reply
* [PATCH v7 2/4] Documentation: Add APM X-Gene SoC 15Gbps Multi-purpose PHY driver binding documentation
From: Mark Rutland @ 2014-01-15 11:31 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1389769840-15469-3-git-send-email-lho@apm.com>
On Wed, Jan 15, 2014 at 07:10:38AM +0000, Loc Ho wrote:
> Signed-off-by: Loc Ho <lho@apm.com>
> Signed-off-by: Tuan Phan <tphan@apm.com>
> Signed-off-by: Suman Tripathi <stripathi@apm.com>
> ---
> .../devicetree/bindings/phy/apm-xgene-phy.txt | 94 ++++++++++++++++++++
> 1 files changed, 94 insertions(+), 0 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/phy/apm-xgene-phy.txt
>
> diff --git a/Documentation/devicetree/bindings/phy/apm-xgene-phy.txt b/Documentation/devicetree/bindings/phy/apm-xgene-phy.txt
> new file mode 100644
> index 0000000..4ffbae0
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/phy/apm-xgene-phy.txt
> @@ -0,0 +1,94 @@
> +* APM X-Gene 15Gbps Multi-purpose PHY nodes
> +
> +PHY nodes are defined to describe on-chip 15Gbps Multi-purpose PHY. Each
> +PHY (pair of lanes) has its own node.
> +
> +Required properties:
> +- compatible : Shall be "apm,xgene-phy" or
> + "apm,xgene-phy-ext". The "apm,xgene-phy" describes
> + an PHY with internal reference PLL located within
> + the IP. The "apm,xgene-phy-ext" describes an PHY
> + where the internal reference PLL located outside of
> + the IP.
How about:
- compatible: shall contain one of:
* "apm,xgene-phy" - PHY has an internal reference PLL.
* "apm,xgene-phy-ext" - PHYs has an external reference PLL.
Cheers,
Mark.
^ permalink raw reply
* [PATCH] ARM: imx: clk-imx6sl: Suppress duplicate const sparse warning
From: Shawn Guo @ 2014-01-15 11:27 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1389766774-16661-1-git-send-email-Ying.Liu@freescale.com>
On Wed, Jan 15, 2014 at 02:19:34PM +0800, Liu Ying wrote:
> There should be no duplicate const specifiers for those static
> constant character string arrays defined for clock mux options.
> Also, the arrays are only taken as the 5th argument for the
> imx_clk_mux() function, which is in the type of 'const char
> **parents'. So, let's remove the 2nd const specifier right
> after 'char'.
>
> This patch fixes these sparse warnings:
> arch/arm/mach-imx/clk-imx6sl.c:21:25: warning: duplicate const
> arch/arm/mach-imx/clk-imx6sl.c:22:25: warning: duplicate const
> arch/arm/mach-imx/clk-imx6sl.c:23:25: warning: duplicate const
> arch/arm/mach-imx/clk-imx6sl.c:24:25: warning: duplicate const
> arch/arm/mach-imx/clk-imx6sl.c:25:25: warning: duplicate const
> arch/arm/mach-imx/clk-imx6sl.c:26:25: warning: duplicate const
> arch/arm/mach-imx/clk-imx6sl.c:27:25: warning: duplicate const
> arch/arm/mach-imx/clk-imx6sl.c:28:25: warning: duplicate const
> arch/arm/mach-imx/clk-imx6sl.c:29:25: warning: duplicate const
> arch/arm/mach-imx/clk-imx6sl.c:30:25: warning: duplicate const
> arch/arm/mach-imx/clk-imx6sl.c:31:25: warning: duplicate const
> arch/arm/mach-imx/clk-imx6sl.c:32:25: warning: duplicate const
> arch/arm/mach-imx/clk-imx6sl.c:33:25: warning: duplicate const
> arch/arm/mach-imx/clk-imx6sl.c:34:25: warning: duplicate const
> arch/arm/mach-imx/clk-imx6sl.c:35:25: warning: duplicate const
> arch/arm/mach-imx/clk-imx6sl.c:36:25: warning: duplicate const
> arch/arm/mach-imx/clk-imx6sl.c:37:25: warning: duplicate const
> arch/arm/mach-imx/clk-imx6sl.c:38:25: warning: duplicate const
> arch/arm/mach-imx/clk-imx6sl.c:39:25: warning: duplicate const
> arch/arm/mach-imx/clk-imx6sl.c:40:25: warning: duplicate const
> arch/arm/mach-imx/clk-imx6sl.c:41:25: warning: duplicate const
>
> Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
Applied both, thanks.
^ permalink raw reply
* [PATCH v2 03/12] at91: dt: sam9261: Added support for the lcd display
From: Jean-Christophe PLAGNIOL-VILLARD @ 2014-01-15 11:27 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <52CED74B.3030806@overkiz.com>
On 18:07 Thu 09 Jan , boris brezillon wrote:
> On 09/01/2014 13:31, Jean-Jacques Hiblot wrote:
> >Signed-off-by: Jean-Jacques Hiblot <jjhiblot@traphandler.com>
> >---
> > arch/arm/boot/dts/at91sam9261.dtsi | 37 ++++++++++++++++++++++++++++++++++++-
> > arch/arm/boot/dts/at91sam9261ek.dts | 31 +++++++++++++++++++++++++++++++
> > arch/arm/mach-at91/at91sam9261.c | 1 +
> > 3 files changed, 68 insertions(+), 1 deletion(-)
> >
> >diff --git a/arch/arm/boot/dts/at91sam9261.dtsi b/arch/arm/boot/dts/at91sam9261.dtsi
> >index 773c3d6..cd219b9 100644
> >--- a/arch/arm/boot/dts/at91sam9261.dtsi
> >+++ b/arch/arm/boot/dts/at91sam9261.dtsi
> >@@ -290,7 +290,33 @@
> > atmel,pins = <AT91_PIOC 24 AT91_PERIPH_B AT91_PINCTRL_NONE>;
> > };
> > };
> >-
> >+ fb {
> >+ pinctrl_fb: fb-0 {
> >+ atmel,pins =
> >+ <AT91_PIOB 1 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB1 periph A */
> >+ AT91_PIOB 2 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB2 periph A */
> >+ AT91_PIOB 3 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB3 periph A */
> >+ AT91_PIOB 7 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB7 periph A */
> >+ AT91_PIOB 8 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB8 periph A */
> >+ AT91_PIOB 9 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB9 periph A */
> >+ AT91_PIOB 10 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB10 periph A */
> >+ AT91_PIOB 11 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB11 periph A */
> >+ AT91_PIOB 12 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB12 periph A */
> >+ AT91_PIOB 15 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB15 periph A */
> >+ AT91_PIOB 16 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB16 periph A */
> >+ AT91_PIOB 17 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB17 periph A */
> >+ AT91_PIOB 18 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB18 periph A */
> >+ AT91_PIOB 19 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB19 periph A */
> >+ AT91_PIOB 20 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB20 periph A */
> >+ AT91_PIOB 23 AT91_PERIPH_B AT91_PINCTRL_NONE /* PB23 periph B */
> >+ AT91_PIOB 24 AT91_PERIPH_B AT91_PINCTRL_NONE /* PB24 periph B */
> >+ AT91_PIOB 25 AT91_PERIPH_B AT91_PINCTRL_NONE /* PB25 periph B */
> >+ AT91_PIOB 26 AT91_PERIPH_B AT91_PINCTRL_NONE /* PB26 periph B */
> >+ AT91_PIOB 27 AT91_PERIPH_B AT91_PINCTRL_NONE /* PB27 periph B */
> >+ AT91_PIOB 28 AT91_PERIPH_B AT91_PINCTRL_NONE /* PB28 periph B */
> >+ >;
> >+ };
> >+ };
> > pioA: gpio at fffff400 {
> > compatible = "atmel,at91rm9200-gpio";
> > reg = <0xfffff400 0x200>;
> >@@ -436,6 +462,15 @@
> > };
> > };
> >+ fb0: fb at 0x00600000 {
> >+ compatible = "atmel,at91sam9261-lcdc";
> >+ reg = <0x00600000 0x1000>;
> >+ interrupts = <21 IRQ_TYPE_LEVEL_HIGH 3>;
> >+ pinctrl-names = "default";
> >+ pinctrl-0 = <&pinctrl_fb>;
> >+ status = "disabled";
> >+ };
> >+
> > nand0: nand at 40000000 {
> > compatible = "atmel,at91rm9200-nand";
> > #address-cells = <1>;
> >diff --git a/arch/arm/boot/dts/at91sam9261ek.dts b/arch/arm/boot/dts/at91sam9261ek.dts
> >index f3d22a9..03c05fc 100644
> >--- a/arch/arm/boot/dts/at91sam9261ek.dts
> >+++ b/arch/arm/boot/dts/at91sam9261ek.dts
> >@@ -52,6 +52,37 @@
> > reg = <0x0 0x20000>;
> > };
> > };
>
> One more nitpick :
> I think this should be taken out in another patch (first 9261 lcdc support,
> then ek board lcd def) :p.
yes mandatory
Best Regards,
J.
>
> >+
> >+ fb0: fb at 0x00600000 {
> >+ display = <&display0>;
> >+ status = "okay";
> >+ atmel,power-control-gpio = <&pioA 12 GPIO_ACTIVE_LOW>;
> >+ display0: display {
> >+ bits-per-pixel = <16>;
> >+ atmel,lcdcon-backlight;
> >+ atmel,dmacon = <0x1>;
> >+ atmel,lcdcon2 = <0x80008002>;
> >+ atmel,guard-time = <1>;
> >+ atmel,lcd-wiring-mode = "BRG";
> >+
> >+ display-timings {
> >+ native-mode = <&timing0>;
> >+ timing0: timing0 {
> >+ clock-frequency = <4965000>;
> >+ hactive = <240>;
> >+ vactive = <320>;
> >+ hback-porch = <1>;
> >+ hfront-porch = <33>;
> >+ vback-porch = <1>;
> >+ vfront-porch = <0>;
> >+ hsync-len = <5>;
> >+ vsync-len = <1>;
> >+ hsync-active = <1>;
> >+ vsync-active = <1>;
> >+ };
> >+ };
> >+ };
> >+ };
> > };
> > leds {
> >diff --git a/arch/arm/mach-at91/at91sam9261.c b/arch/arm/mach-at91/at91sam9261.c
> >index 200d17a..a67bfe6 100644
> >--- a/arch/arm/mach-at91/at91sam9261.c
> >+++ b/arch/arm/mach-at91/at91sam9261.c
> >@@ -197,6 +197,7 @@ static struct clk_lookup periph_clocks_lookups[] = {
> > /* more tc lookup table for DT entries */
> > CLKDEV_CON_DEV_ID("t0_clk", "fffa0000.timer", &tc0_clk),
> > CLKDEV_CON_DEV_ID("hclk", "500000.ohci", &ohci_clk),
> >+ CLKDEV_CON_DEV_ID("hclk", "600000.fb", &hck1),
> > CLKDEV_CON_DEV_ID("spi_clk", "fffc8000.spi", &spi0_clk),
> > CLKDEV_CON_DEV_ID("spi_clk", "fffcc000.spi", &spi1_clk),
> > CLKDEV_CON_DEV_ID("mci_clk", "fffa8000.mmc", &mmc_clk),
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* [PATCH RFC v2 REPOST 3/8] ASoC: davinci-evm: HDMI audio support for TDA998x trough McASP I2S bus
From: Jyri Sarha @ 2014-01-15 11:27 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20131231132555.GA31886@sirena.org.uk>
On 12/31/2013 03:25 PM, Mark Brown wrote:
> On Fri, Dec 20, 2013 at 12:39:38PM +0200, Jyri Sarha wrote:
>
>> Add machine driver support for BeagleBone-Black and other boards with
>> tilcdc support and NXP TDA998X HDMI transmitter connected to McASP
>> port in I2S mode. The 44100 Hz sample-rate and it's multiples can not
>> be supported on Beaglebone-Black because of limited clock-rate
>
> Can the drivers infer this from the clocks?
It does. The commit message is referring to a BBB HW specific feature.
Guess I should remove that note from the commit message, since it does
not concern the code itself.
>
>> support. The only supported sample format is SNDRV_PCM_FORMAT_S32_LE.
>> The 8 least significant bits are ignored.
>
> Where does this constraint come from?
>
From driver/gpu/drm/i2c/tda998x_drv.c. The driver configures CTS_N
register statically to a value that works only with 4 byte samples.
According to my tests it is possible to support 3 and 2 byte samples too
by changing the CTS_N register value, but I am not sure if the
configuration can be changed on the fly. My data sheet of the nxp chip
is very vague about the register definitions, but I suppose the register
configures some clock divider on the chip. HDMI supports only upto 24bit
audio and the data sheet states that any extraneous least significant
bits are ignored.
>> + struct snd_soc_card_drvdata_davinci *drvdata =
>> + (struct snd_soc_card_drvdata_davinci *)
>> + snd_soc_card_get_drvdata(soc_card);
>
> Again with the casting.
>
I'll fix that.
>> + runtime->hw.rate_min = drvdata->rate_constraint->list[0];
>> + runtime->hw.rate_max = drvdata->rate_constraint->list[
>> + drvdata->rate_constraint->count - 1];
>> + runtime->hw.rates = SNDRV_PCM_RATE_KNOT;
>> +
>> + snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_RATE,
>> + drvdata->rate_constraint);
>> + snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_CHANNELS,
>> + 2, 2);
>
> Why not just set all this statically when registering the DAI?
Because there is no relevant DAI to where to put these limitations. I
did not want to add yet another dummy codec driver, but decided to use
the already existing ASoC HDMI codec. By default the driver support all
audio params supported by HDMI. The limitations are coming from NXP
chip, the NXP driver, and because the chip is used in i2s mode. In other
words the limitation is coming from machine setup, not from the DAIs.
>
>> +static unsigned int evm_get_bclk(struct snd_pcm_hw_params *params)
>> +{
>> + int sample_size = snd_pcm_format_width(params_format(params));
>> + int rate = params_rate(params);
>> + int channels = params_channels(params);
>> +
>> + return sample_size * channels * rate;
>> +}
>
> snd_soc_params_to_frame_size().
>
Rather snd_soc_params_to_bclk(), but thanks. I'll use that.
>> +static int evm_tda998x_hw_params(struct snd_pcm_substream *substream,
>> + struct snd_pcm_hw_params *params)
>> +{
>> + struct snd_soc_pcm_runtime *rtd = substream->private_data;
>> + struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
>> + struct snd_soc_codec *codec = rtd->codec;
>> + struct snd_soc_card *soc_card = codec->card;
>> + struct platform_device *pdev = to_platform_device(soc_card->dev);
>> + unsigned int bclk_freq = evm_get_bclk(params);
>> + unsigned sysclk = ((struct snd_soc_card_drvdata_davinci *)
>> + snd_soc_card_get_drvdata(soc_card))->sysclk;
>> + int ret;
>> +
>> + ret = snd_soc_dai_set_clkdiv(cpu_dai, 1, sysclk / bclk_freq);
>> + if (ret < 0) {
>> + dev_err(&pdev->dev, "can't set CPU DAI clock divider %d\n",
>> + ret);
>> + return ret;
>> + }
>
> This looks like something the DAI driver ought to be able to work out
> for itself based on the clock rate and sample format.
>
I guess that could be done.
Peter, what do you say if I set BCLK divider automatically if mcasp
set_sysclk() has been called with SND_SOC_CLOCK_IN?
>> +static unsigned int tda998x_hdmi_rates[] = {
>> + 32000,
>> + 44100,
>> + 48000,
>> + 88200,
>> + 96000,
>> +};
>
> The changelog said that 44.1kHz and its multiples couldn't be supported
> - is that just the multiples?
>
As I mentioned earlier, that is a BBB HW limitation only, the code
bellow is able to decide what rates are available based on the sysclk rate.
>> +static struct snd_pcm_hw_constraint_list *evm_tda998x_rate_constraint(
>> + struct snd_soc_card *soc_card)
>> +{
>> + struct platform_device *pdev = to_platform_device(soc_card->dev);
>> + unsigned sysclk = ((struct snd_soc_card_drvdata_davinci *)
>> + snd_soc_card_get_drvdata(soc_card))->sysclk;
>> + struct snd_pcm_hw_constraint_list *ret;
>> + unsigned int *rates;
>> + int i = 0, j = 0;
>> +
>> + ret = devm_kzalloc(soc_card->dev, sizeof(*ret) +
>> + sizeof(tda998x_hdmi_rates), GFP_KERNEL);
>> + if (!ret) {
>> + dev_err(&pdev->dev, "Unable to allocate rate constraint!\n");
>
> OOM is already very verbose, don't bother.
>
Ok, I'll remove that.
>> + return NULL;
>> + }
>> +
>> + rates = (unsigned int *)&ret[1];
>> + ret->list = rates;
>> + ret->mask = 0;
>> + for (; i < ARRAY_SIZE(tda998x_hdmi_rates); i++) {
>
> This is all very hard to read. Why has the assignment of i been moved
> up to the declaration rather than put here as is idiomatic, what's all
> the casting going on with ret and in general?
>
No excuse for i initialization, I'll fix that. The casting is just to
survive with just one kmalloc call instead of separate memory blobs for
struct snd_pcm_hw_constraint_list and referred list of supported sample
rates. I'll allocate a second blob, if that is easier to read.
Best regards,
Jyri
^ permalink raw reply
* [PATCH v2 09/12] at91: dt: sam9261: Pinmux DT entries for the SMC/EBI interface
From: Jean-Christophe PLAGNIOL-VILLARD @ 2014-01-15 11:25 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1389270709-32662-10-git-send-email-jjhiblot@traphandler.com>
On 13:31 Thu 09 Jan , Jean-Jacques Hiblot wrote:
> Signed-off-by: Jean-Jacques Hiblot <jjhiblot@traphandler.com>
> ---
> arch/arm/boot/dts/at91sam9261.dtsi | 54 ++++++++++++++++++++++++++++++++++++++
> 1 file changed, 54 insertions(+)
>
> diff --git a/arch/arm/boot/dts/at91sam9261.dtsi b/arch/arm/boot/dts/at91sam9261.dtsi
> index cd219b9..695d5d2 100644
> --- a/arch/arm/boot/dts/at91sam9261.dtsi
> +++ b/arch/arm/boot/dts/at91sam9261.dtsi
> @@ -317,6 +317,60 @@
> >;
> };
> };
> + smc {
> + pinctrl_smc_nwait: smc_nwait-0 {
> + atmel,pins = <AT91_PIOC 2 AT91_PERIPH_A AT91_PINCTRL_NONE>;
> + };
> + pinctrl_smc_a23_a25: smc_a23_a25-0 {
use better name this is not clear
> + atmel,pins =
> + <AT91_PIOA 30 AT91_PERIPH_B AT91_PINCTRL_NONE
> + AT91_PIOA 31 AT91_PERIPH_B AT91_PINCTRL_NONE
> + AT91_PIOC 3 AT91_PERIPH_A AT91_PINCTRL_NONE>;
> + };
> + pinctrl_smc_d16_d31: smc_d16_d31-0 {
> + atmel,pins =
> + <AT91_PIOC 16 AT91_PERIPH_A AT91_PINCTRL_NONE
> + AT91_PIOC 17 AT91_PERIPH_A AT91_PINCTRL_NONE
> + AT91_PIOC 18 AT91_PERIPH_A AT91_PINCTRL_NONE
> + AT91_PIOC 19 AT91_PERIPH_A AT91_PINCTRL_NONE
> + AT91_PIOC 20 AT91_PERIPH_A AT91_PINCTRL_NONE
> + AT91_PIOC 21 AT91_PERIPH_A AT91_PINCTRL_NONE
> + AT91_PIOC 22 AT91_PERIPH_A AT91_PINCTRL_NONE
> + AT91_PIOC 23 AT91_PERIPH_A AT91_PINCTRL_NONE
> + AT91_PIOC 24 AT91_PERIPH_A AT91_PINCTRL_NONE
> + AT91_PIOC 25 AT91_PERIPH_A AT91_PINCTRL_NONE
> + AT91_PIOC 26 AT91_PERIPH_A AT91_PINCTRL_NONE
> + AT91_PIOC 27 AT91_PERIPH_A AT91_PINCTRL_NONE
> + AT91_PIOC 28 AT91_PERIPH_A AT91_PINCTRL_NONE
> + AT91_PIOC 29 AT91_PERIPH_A AT91_PINCTRL_NONE
> + AT91_PIOC 30 AT91_PERIPH_A AT91_PINCTRL_NONE
> + AT91_PIOC 31 AT91_PERIPH_A AT91_PINCTRL_NONE>;
> + };
> + pinctrl_smc_ncs4: smc_ncs4-0 {
> + atmel,pins = <AT91_PIOC 4 AT91_PERIPH_A AT91_PINCTRL_NONE>;
> + };
> + pinctrl_smc_ncs5: smc_ncs5-0 {
> + atmel,pins = <AT91_PIOC 5 AT91_PERIPH_A AT91_PINCTRL_NONE>;
> + };
> + pinctrl_smc_nandoe: smc_nandoe-0 {
> + atmel,pins = <AT91_PIOC 0 AT91_PERIPH_A AT91_PINCTRL_NONE>;
> + };
> + pinctrl_smc_ncs6: smc_ncs6-0 {
> + atmel,pins = <AT91_PIOC 0 AT91_PERIPH_B AT91_PINCTRL_NONE>;
> + };
> + pinctrl_smc_nandwe: smc_nandwe-0 {
> + atmel,pins = <AT91_PIOC 1 AT91_PERIPH_A AT91_PINCTRL_NONE>;
> + };
> + pinctrl_smc_ncs7: smc_ncs7-0 {
> + atmel,pins = <AT91_PIOC 1 AT91_PERIPH_B AT91_PINCTRL_NONE>;
> + };
> + pinctrl_smc_cfce1: smc_cfce1-0 {
> + atmel,pins = <AT91_PIOC 6 AT91_PERIPH_A AT91_PINCTRL_NONE>;
> + };
> + pinctrl_smc_cfce2: smc_cfce2-0 {
> + atmel,pins = <AT91_PIOC 7 AT91_PERIPH_A AT91_PINCTRL_NONE>;
> + };
> + };
> pioA: gpio at fffff400 {
> compatible = "atmel,at91rm9200-gpio";
> reg = <0xfffff400 0x200>;
> --
> 1.8.5.2
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* [RFC 2/2] arm: Get rid of meminfo
From: Catalin Marinas @ 2014-01-15 11:25 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20140115105347.GM15937@n2100.arm.linux.org.uk>
On Wed, Jan 15, 2014 at 10:53:47AM +0000, Russell King - ARM Linux wrote:
> On Wed, Jan 15, 2014 at 10:22:02AM +0000, Catalin Marinas wrote:
> > On 15 January 2014 09:49, Russell King - ARM Linux
> > <linux@arm.linux.org.uk> wrote:
> > > On Tue, Jan 14, 2014 at 09:55:22PM -0800, Laura Abbott wrote:
> > >> memblock is now fully integrated into the kernel and is the prefered
> > >> method for tracking memory. Rather than reinvent the wheel with
> > >> meminfo, migrate to using memblock directly instead of meminfo as
> > >> an intermediate.
> > >
> > > The reason I never killed meminfo was that for some of the functions here
> > > is that meminfo has a slightly different property to memblock.
> > >
> > > With meminfo, each sparsemem section mapping or discontigmem node must be
> > > specified as a separate bank of memory, even if it is contiguous with the
> > > previous block. This is so that the functions which walk the page arrays
> > > can do so efficiently (without having to convert from a PFN to a struct
> > > page for every page in the system, which is very inefficient.)
> >
> > pfn_to_page() conversion is indeed expensive with sparsemem (on
> > 32-bit) but does meminfo actually add a noticeable improvement to the
> > boot time? I don't think so but it's worth testing (something a
> > thousand cycles maximum would be lost in the noise).
>
> Why do you ask about boot time?
Is meminfo used on a critical path at run-time?
--
Catalin
^ permalink raw reply
* [PATCH] ARM: imx: clk-imx6sl: Suppress duplicate const sparse warning
From: Shawn Guo @ 2014-01-15 11:24 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1389777696.14001.14.camel@joe-AO722>
On Wed, Jan 15, 2014 at 01:21:36AM -0800, Joe Perches wrote:
> On Wed, 2014-01-15 at 14:58 +0800, Shawn Guo wrote:
> > On Wed, Jan 15, 2014 at 02:19:34PM +0800, Liu Ying wrote:
> > > There should be no duplicate const specifiers for those static
> > > constant character string arrays defined for clock mux options.
> > > Also, the arrays are only taken as the 5th argument for the
> > > imx_clk_mux() function, which is in the type of 'const char
> > > **parents'. So, let's remove the 2nd const specifier right
> > > after 'char'.
> > >
> > > This patch fixes these sparse warnings:
> > > arch/arm/mach-imx/clk-imx6sl.c:21:25: warning: duplicate const
> []
> > > diff --git a/arch/arm/mach-imx/clk-imx6sl.c b/arch/arm/mach-imx/clk-imx6sl.c
> []
> > > @@ -18,27 +18,27 @@
> > > #include "clk.h"
> > > #include "common.h"
> > >
> > > -static const char const *step_sels[] = { "osc", "pll2_pfd2", };
> > ...
> > > +static const char *step_sels[] = { "osc", "pll2_pfd2", };
> >
> > So now we're getting the following checkpatch warning:
> >
> > WARNING: static const char * array should probably be static const char * const
> >
> > It was added into checkpatch.pl by commit cb710ec (scripts/checkpatch.pl:
> > add warnings for static char that could be static const char). I'm not
> > sure which warning we should ignore, the sparse or the checkpatch one.
> >
> > Joe, comments?
>
> Maybe the const **parents argument could be const * const *
>
> That could change a lot of declarations through.
> You could also ignore checkpatch.
Okay, for now, I will ignore the checkpatch warning for this case.
Thanks, Joe.
Shawn
^ permalink raw reply
* [PATCH v2 12/12] at91: dt: sam9261: Added DM9000 in the device tree
From: Jean-Christophe PLAGNIOL-VILLARD @ 2014-01-15 11:23 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1389270709-32662-13-git-send-email-jjhiblot@traphandler.com>
On 13:31 Thu 09 Jan , Jean-Jacques Hiblot wrote:
> Signed-off-by: Jean-Jacques Hiblot <jjhiblot@traphandler.com>
> ---
> arch/arm/boot/dts/at91sam9261ek.dts | 32 ++++++++++++++++++++++++++++++++
> 1 file changed, 32 insertions(+)
>
> diff --git a/arch/arm/boot/dts/at91sam9261ek.dts b/arch/arm/boot/dts/at91sam9261ek.dts
> index e92cb8e..a3d9d5a 100644
> --- a/arch/arm/boot/dts/at91sam9261ek.dts
> +++ b/arch/arm/boot/dts/at91sam9261ek.dts
> @@ -76,6 +76,38 @@
> smc: smc at ffffec00 {
> status = "okay";
>
> + ebi_cs2 at 2,0 {
> + status = "okay";
> + smc,converter = "nanosec";
> + smc,ncs_read_setup = <0>;
> + smc,nrd_setup = <20>;
> + smc,ncs_write_setup = <0>;
> + smc,nwe_setup = <20>;
> + smc,ncs_read_pulse = <80>;
> + smc,nrd_pulse = <40>;
> + smc,ncs_write_pulse = <80>;
> + smc,nwe_pulse = <40>;
> + smc,read_cycle = <160>;
> + smc,write_cycle = <160>;
> + smc,tdf_cycles = <10>;
> + smc,tdf_optimized = <0>;
> + smc,page_size = <0>;
> + smc,byte_access_type = <1>;
> + smc,bus_width = <1>;
> + smc,nwait_mode = <0>;
> + smc,read_mode = <1>;
> + smc,write_mode = <1>;
> +
> + ethernet at 2,0 {
> + compatible = "davicom,dm9000";
> + reg = <0x0 0x2 0x4 0x2>;
> + interrupt-parent = <&pioC>;
> + interrupts = <11 IRQ_TYPE_EDGE_BOTH>;
use the new binding no interrupt-parent now
> + local-mac-address = [00 00 de ad be ef];
drop the mac this is board specific
> + davicom,no-eeprom;
> + };
> + };
> +
> ebi_cs3 at 3,0 {
> status = "okay";
> smc,ncs_read_setup = <0>;
> --
> 1.8.5.2
>
>
> _______________________________________________
> linux-arm-kernel mailing list:wqa
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* [PATCH] at91: dt: i2c: add a new compatibility string for the at91sam9261
From: Wolfram Sang @ 2014-01-15 11:20 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <52D66A0C.4090509@atmel.com>
On Wed, Jan 15, 2014 at 11:59:24AM +0100, Nicolas Ferre wrote:
> On 15/01/2014 11:24, Jean-Jacques Hiblot :
> > Signed-off-by: Jean-Jacques Hiblot <jjhiblot@traphandler.com>
>
> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
>
> Thanks Jean-Jacques.
>
> Side note: do not forget i2c maintainer and ml.
Yes, I don't have the original patch, needs resend.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140115/a3375a31/attachment.sig>
^ permalink raw reply
* [PATCH v9 2/4] Documentation: Add documentation for APM X-Gene SoC SATA host controller DTS binding
From: Mark Rutland @ 2014-01-15 11:18 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1389769910-15505-3-git-send-email-lho@apm.com>
On Wed, Jan 15, 2014 at 07:11:48AM +0000, Loc Ho wrote:
> Signed-off-by: Loc Ho <lho@apm.com>
> Signed-off-by: Tuan Phan <tphan@apm.com>
> Signed-off-by: Suman Tripathi <stripathi@apm.com>
> ---
> .../devicetree/bindings/ata/apm-xgene.txt | 68 ++++++++++++++++++++
> 1 files changed, 68 insertions(+), 0 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/ata/apm-xgene.txt
>
> diff --git a/Documentation/devicetree/bindings/ata/apm-xgene.txt b/Documentation/devicetree/bindings/ata/apm-xgene.txt
> new file mode 100644
> index 0000000..3d1421a
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/ata/apm-xgene.txt
> @@ -0,0 +1,68 @@
> +* APM X-Gene 6.0 Gb/s SATA host controller nodes
> +
> +SATA host controller nodes are defined to describe on-chip Serial ATA
> +controllers. Each SATA controller (pair of ports) have its own node.
> +
> +Required properties:
> +- compatible : Shall be "apm,xgene-ahci-sgmii" if mux'ed with SGMII
> + or "apm,xgene-ahci-pcie" if mux'ed with PCIe.
> +- reg : First memory resource shall be the AHCI memory
> + resource.
> + Second memory resource shall be the host controller
> + memory resource.
> +- interrupts : Interrupt mapping for SATA host controller IRQ.
s/Interrupt-mapping/interrupt-specifier/
> +- clocks : Reference to the clock entry.
> +- phys : PHY reference with parameter 0.
The specific value of the phy-specifier shouldn't matter to this
binding. What should matter is what it logically corresponds to.
> +- phy-names : Name of the PHY. Shall be "sata-6g".
Could you define phys in terms of phy-names please? It makes the
relationship clearer:
- phys: a list of phandles + phy-sciefiers, one for each entry in
phy-names
- phy-names: Should contain:
* "sata-6g" for the SATA PHY <notes about requirements go here>
Cheers,
Mark.
^ permalink raw reply
* [PATCH v3 2/2] serial: fsl_lpuart: add DMA support
From: Arnd Bergmann @ 2014-01-15 11:17 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20140115110537.GA25824@e106331-lin.cambridge.arm.com>
On Wednesday 15 January 2014 11:05:37 Mark Rutland wrote:
> On Wed, Jan 15, 2014 at 05:21:05AM +0000, Yuan Yao wrote:
> > --- a/Documentation/devicetree/bindings/serial/fsl-lpuart.txt
> > +++ b/Documentation/devicetree/bindings/serial/fsl-lpuart.txt
> > @@ -4,11 +4,24 @@ Required properties:
> > - compatible : Should be "fsl,<soc>-lpuart"
> > - reg : Address and length of the register set for the device
> > - interrupts : Should contain uart interrupt
> > +- clocks : from common clock binding: handle to uart clock
> > +- clock-names : from common clock binding: Shall be "ipg"
>
> Why are these now requried if they weren't previously? That breaks old
> dts. I can't see any new code touching clocks. Was this an old but
> undocumented requirement?
It was previously required but not documented. I asked Yuan Yao to
add the text to the binding along with the new "dmas" addition.
It would have been cleaner to do this as a separate patch, but at
the very least it should be mentioned in the changelog.
Arnd
^ permalink raw reply
* [GIT PULL] KVM/ARM Updates for 3.14
From: Paolo Bonzini @ 2014-01-15 11:15 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1389221250-30034-1-git-send-email-christoffer.dall@linaro.org>
Il 08/01/2014 23:47, Christoffer Dall ha scritto:
> git://git.linaro.org/people/christoffer.dall/linux-kvm-arm.git tags/kvm-arm-for-3.14
Pulled, thanks.
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox