All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/4] ARM: zynq: Remove CONFIG_BOOTP_SERVERIP
@ 2016-12-16 12:38 Michal Simek
  2016-12-16 12:38 ` [U-Boot] [PATCH 2/4] ARM: zynq: Remove spi-max-frequency Michal Simek
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Michal Simek @ 2016-12-16 12:38 UTC (permalink / raw)
  To: u-boot

Do the same change which was done in ZynqMP by:
"ARM64: zynqmp: Remove CONFIG_BOOTP_SERVERIP"
(sha1: a8b6a156c0f7fb99502229e454bc9c3b38645280)

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---

 include/configs/zynq-common.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/include/configs/zynq-common.h b/include/configs/zynq-common.h
index 57176f9c0619..6adb4e74745f 100644
--- a/include/configs/zynq-common.h
+++ b/include/configs/zynq-common.h
@@ -43,7 +43,6 @@
 # define CONFIG_PHY_MARVELL
 # define CONFIG_PHY_REALTEK
 # define CONFIG_PHY_XILINX
-# define CONFIG_BOOTP_SERVERIP
 # define CONFIG_BOOTP_BOOTPATH
 # define CONFIG_BOOTP_GATEWAY
 # define CONFIG_BOOTP_HOSTNAME
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH 2/4] ARM: zynq: Remove spi-max-frequency
  2016-12-16 12:38 [U-Boot] [PATCH 1/4] ARM: zynq: Remove CONFIG_BOOTP_SERVERIP Michal Simek
@ 2016-12-16 12:38 ` Michal Simek
  2016-12-16 17:28   ` Moritz Fischer
  2016-12-16 12:38 ` [U-Boot] [PATCH 3/4] ARM: zynq: Setup modeboot variable based on boot mode Michal Simek
  2016-12-16 12:38 ` [U-Boot] [PATCH 4/4] ARM: dts: zynq: replace gpio-key, wakeup with wakeup-source property Michal Simek
  2 siblings, 1 reply; 9+ messages in thread
From: Michal Simek @ 2016-12-16 12:38 UTC (permalink / raw)
  To: u-boot

spi-max-frequency for spi bus depends on devices which are
connected to it. Remove this parameter from dtsi file.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---

 arch/arm/dts/zynq-7000.dtsi | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/arm/dts/zynq-7000.dtsi b/arch/arm/dts/zynq-7000.dtsi
index 668f54ec219d..fa9ee276cb59 100644
--- a/arch/arm/dts/zynq-7000.dtsi
+++ b/arch/arm/dts/zynq-7000.dtsi
@@ -177,7 +177,6 @@
 			interrupts = <0 26 4>;
 			clocks = <&clkc 25>, <&clkc 34>;
 			clock-names = "ref_clk", "pclk";
-			spi-max-frequency = <166666700>;
 			#address-cells = <1>;
 			#size-cells = <0>;
 		};
@@ -190,7 +189,6 @@
 			interrupts = <0 49 4>;
 			clocks = <&clkc 26>, <&clkc 35>;
 			clock-names = "ref_clk", "pclk";
-			spi-max-frequency = <166666700>;
 			#address-cells = <1>;
 			#size-cells = <0>;
 		};
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH 3/4] ARM: zynq: Setup modeboot variable based on boot mode
  2016-12-16 12:38 [U-Boot] [PATCH 1/4] ARM: zynq: Remove CONFIG_BOOTP_SERVERIP Michal Simek
  2016-12-16 12:38 ` [U-Boot] [PATCH 2/4] ARM: zynq: Remove spi-max-frequency Michal Simek
@ 2016-12-16 12:38 ` Michal Simek
  2016-12-16 12:38 ` [U-Boot] [PATCH 4/4] ARM: dts: zynq: replace gpio-key, wakeup with wakeup-source property Michal Simek
  2 siblings, 0 replies; 9+ messages in thread
From: Michal Simek @ 2016-12-16 12:38 UTC (permalink / raw)
  To: u-boot

modeboot variable is used for saving inforation which bootmode
is used.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---

 board/xilinx/zynq/board.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/board/xilinx/zynq/board.c b/board/xilinx/zynq/board.c
index 5cd9bbf711f7..6a3cbe0a0dc4 100644
--- a/board/xilinx/zynq/board.c
+++ b/board/xilinx/zynq/board.c
@@ -85,6 +85,12 @@ int board_init(void)
 int board_late_init(void)
 {
 	switch ((zynq_slcr_get_boot_mode()) & ZYNQ_BM_MASK) {
+	case ZYNQ_BM_QSPI:
+		setenv("modeboot", "qspiboot");
+		break;
+	case ZYNQ_BM_NAND:
+		setenv("modeboot", "nandboot");
+		break;
 	case ZYNQ_BM_NOR:
 		setenv("modeboot", "norboot");
 		break;
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH 4/4] ARM: dts: zynq: replace gpio-key, wakeup with wakeup-source property
  2016-12-16 12:38 [U-Boot] [PATCH 1/4] ARM: zynq: Remove CONFIG_BOOTP_SERVERIP Michal Simek
  2016-12-16 12:38 ` [U-Boot] [PATCH 2/4] ARM: zynq: Remove spi-max-frequency Michal Simek
  2016-12-16 12:38 ` [U-Boot] [PATCH 3/4] ARM: zynq: Setup modeboot variable based on boot mode Michal Simek
@ 2016-12-16 12:38 ` Michal Simek
  2016-12-16 13:23   ` Sudeep Holla
  2 siblings, 1 reply; 9+ messages in thread
From: Michal Simek @ 2016-12-16 12:38 UTC (permalink / raw)
  To: u-boot

From: Sudeep Holla <sudeep.holla@arm.com>

Though the keyboard driver for GPIO buttons(gpio-keys) will continue to
check for/support the legacy "gpio-key,wakeup" boolean property to
enable gpio buttons as wakeup source, "wakeup-source" is the new
standard binding.

This patch replaces the legacy "gpio-key,wakeup" with the unified
"wakeup-source" property in order to avoid any futher copy-paste
duplication.

Cc: Michal Simek <michal.simek@xilinx.com>
Cc: "S?ren Brinkmann" <soren.brinkmann@xilinx.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---

 arch/arm/dts/zynq-zc702.dts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/dts/zynq-zc702.dts b/arch/arm/dts/zynq-zc702.dts
index 478e9fd4ef25..2696e70a89a7 100644
--- a/arch/arm/dts/zynq-zc702.dts
+++ b/arch/arm/dts/zynq-zc702.dts
@@ -40,14 +40,14 @@
 			label = "sw14";
 			gpios = <&gpio0 12 0>;
 			linux,code = <108>; /* down */
-			gpio-key,wakeup;
+			wakeup-source;
 			autorepeat;
 		};
 		sw13 {
 			label = "sw13";
 			gpios = <&gpio0 14 0>;
 			linux,code = <103>; /* up */
-			gpio-key,wakeup;
+			wakeup-source;
 			autorepeat;
 		};
 	};
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH 4/4] ARM: dts: zynq: replace gpio-key, wakeup with wakeup-source property
  2016-12-16 12:38 ` [U-Boot] [PATCH 4/4] ARM: dts: zynq: replace gpio-key, wakeup with wakeup-source property Michal Simek
@ 2016-12-16 13:23   ` Sudeep Holla
  2016-12-16 13:30     ` Michal Simek
  0 siblings, 1 reply; 9+ messages in thread
From: Sudeep Holla @ 2016-12-16 13:23 UTC (permalink / raw)
  To: u-boot



On 16/12/16 12:38, Michal Simek wrote:
> From: Sudeep Holla <sudeep.holla@arm.com>
> 
> Though the keyboard driver for GPIO buttons(gpio-keys) will continue to
> check for/support the legacy "gpio-key,wakeup" boolean property to
> enable gpio buttons as wakeup source, "wakeup-source" is the new
> standard binding.
> 
> This patch replaces the legacy "gpio-key,wakeup" with the unified
> "wakeup-source" property in order to avoid any futher copy-paste
> duplication.
> 

I assume this was sent by mistake as this patch is already in the
mainline now.

-- 
Regards,
Sudeep

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH 4/4] ARM: dts: zynq: replace gpio-key, wakeup with wakeup-source property
  2016-12-16 13:23   ` Sudeep Holla
@ 2016-12-16 13:30     ` Michal Simek
  2016-12-16 13:31       ` Sudeep Holla
  0 siblings, 1 reply; 9+ messages in thread
From: Michal Simek @ 2016-12-16 13:30 UTC (permalink / raw)
  To: u-boot

On 16.12.2016 14:23, Sudeep Holla wrote:
> 
> 
> On 16/12/16 12:38, Michal Simek wrote:
>> From: Sudeep Holla <sudeep.holla@arm.com>
>>
>> Though the keyboard driver for GPIO buttons(gpio-keys) will continue to
>> check for/support the legacy "gpio-key,wakeup" boolean property to
>> enable gpio buttons as wakeup source, "wakeup-source" is the new
>> standard binding.
>>
>> This patch replaces the legacy "gpio-key,wakeup" with the unified
>> "wakeup-source" property in order to avoid any futher copy-paste
>> duplication.
>>
> 
> I assume this was sent by mistake as this patch is already in the
> mainline now.
> 

It is syncup with u-boot source code and yes I took it from Linux kernel.

Thanks,
Michal

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH 4/4] ARM: dts: zynq: replace gpio-key, wakeup with wakeup-source property
  2016-12-16 13:30     ` Michal Simek
@ 2016-12-16 13:31       ` Sudeep Holla
  0 siblings, 0 replies; 9+ messages in thread
From: Sudeep Holla @ 2016-12-16 13:31 UTC (permalink / raw)
  To: u-boot



On 16/12/16 13:30, Michal Simek wrote:
> On 16.12.2016 14:23, Sudeep Holla wrote:
>>
>>
>> On 16/12/16 12:38, Michal Simek wrote:
>>> From: Sudeep Holla <sudeep.holla@arm.com>
>>>
>>> Though the keyboard driver for GPIO buttons(gpio-keys) will continue to
>>> check for/support the legacy "gpio-key,wakeup" boolean property to
>>> enable gpio buttons as wakeup source, "wakeup-source" is the new
>>> standard binding.
>>>
>>> This patch replaces the legacy "gpio-key,wakeup" with the unified
>>> "wakeup-source" property in order to avoid any futher copy-paste
>>> duplication.
>>>
>>
>> I assume this was sent by mistake as this patch is already in the
>> mainline now.
>>
> 
> It is syncup with u-boot source code and yes I took it from Linux kernel.
> 

Ah OK, sorry I didn't know U Boot has a copy of it.

-- 
Regards,
Sudeep

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH 2/4] ARM: zynq: Remove spi-max-frequency
  2016-12-16 12:38 ` [U-Boot] [PATCH 2/4] ARM: zynq: Remove spi-max-frequency Michal Simek
@ 2016-12-16 17:28   ` Moritz Fischer
  2016-12-20  6:54     ` Michal Simek
  0 siblings, 1 reply; 9+ messages in thread
From: Moritz Fischer @ 2016-12-16 17:28 UTC (permalink / raw)
  To: u-boot

Hi Michal,

On Fri, Dec 16, 2016 at 5:38 AM, Michal Simek <michal.simek@xilinx.com> wrote:
> spi-max-frequency for spi bus depends on devices which are
> connected to it. Remove this parameter from dtsi file.
>
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> ---
>
>  arch/arm/dts/zynq-7000.dtsi | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/arch/arm/dts/zynq-7000.dtsi b/arch/arm/dts/zynq-7000.dtsi
> index 668f54ec219d..fa9ee276cb59 100644
> --- a/arch/arm/dts/zynq-7000.dtsi
> +++ b/arch/arm/dts/zynq-7000.dtsi
> @@ -177,7 +177,6 @@
>                         interrupts = <0 26 4>;
>                         clocks = <&clkc 25>, <&clkc 34>;
>                         clock-names = "ref_clk", "pclk";
> -                       spi-max-frequency = <166666700>;
>                         #address-cells = <1>;
>                         #size-cells = <0>;
>                 };
> @@ -190,7 +189,6 @@
>                         interrupts = <0 49 4>;
>                         clocks = <&clkc 26>, <&clkc 35>;
>                         clock-names = "ref_clk", "pclk";
> -                       spi-max-frequency = <166666700>;
>                         #address-cells = <1>;
>                         #size-cells = <0>;
>                 };
> --
> 1.9.1
>

While I agree with the patch, doesn't the drivers/spi/zynq_spi.c in u-boot
(wrongly) use this to determine it's peripheral clock speed?

<snip>
plat->frequency = fdtdec_get_int(blob, node, "spi-max-frequency",
                                                      250000000);
</snip>

and later in zynq_spi_set_speed() to calculate divisors?

Cheers,

Moritz

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH 2/4] ARM: zynq: Remove spi-max-frequency
  2016-12-16 17:28   ` Moritz Fischer
@ 2016-12-20  6:54     ` Michal Simek
  0 siblings, 0 replies; 9+ messages in thread
From: Michal Simek @ 2016-12-20  6:54 UTC (permalink / raw)
  To: u-boot

On 16.12.2016 18:28, Moritz Fischer wrote:
> Hi Michal,
> 
> On Fri, Dec 16, 2016 at 5:38 AM, Michal Simek <michal.simek@xilinx.com> wrote:
>> spi-max-frequency for spi bus depends on devices which are
>> connected to it. Remove this parameter from dtsi file.
>>
>> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
>> ---
>>
>>  arch/arm/dts/zynq-7000.dtsi | 2 --
>>  1 file changed, 2 deletions(-)
>>
>> diff --git a/arch/arm/dts/zynq-7000.dtsi b/arch/arm/dts/zynq-7000.dtsi
>> index 668f54ec219d..fa9ee276cb59 100644
>> --- a/arch/arm/dts/zynq-7000.dtsi
>> +++ b/arch/arm/dts/zynq-7000.dtsi
>> @@ -177,7 +177,6 @@
>>                         interrupts = <0 26 4>;
>>                         clocks = <&clkc 25>, <&clkc 34>;
>>                         clock-names = "ref_clk", "pclk";
>> -                       spi-max-frequency = <166666700>;
>>                         #address-cells = <1>;
>>                         #size-cells = <0>;
>>                 };
>> @@ -190,7 +189,6 @@
>>                         interrupts = <0 49 4>;
>>                         clocks = <&clkc 26>, <&clkc 35>;
>>                         clock-names = "ref_clk", "pclk";
>> -                       spi-max-frequency = <166666700>;
>>                         #address-cells = <1>;
>>                         #size-cells = <0>;
>>                 };
>> --
>> 1.9.1
>>
> 
> While I agree with the patch, doesn't the drivers/spi/zynq_spi.c in u-boot
> (wrongly) use this to determine it's peripheral clock speed?
> 
> <snip>
> plat->frequency = fdtdec_get_int(blob, node, "spi-max-frequency",
>                                                       250000000);
> </snip>
> 
> and later in zynq_spi_set_speed() to calculate divisors?

Based on DT binding
spi-max-frequency - (required) Maximum SPI clocking speed of device in Hz

In node itself it should be max speed what controller can operate. Every
node should set it up for self and driver should be able to handle it.

Back to your point. plat->frequency setup is weird. It looks like input
reference clock to IP itself instead of max IP freq. I expect the reason
was that we couldn't get this value and Jagan was using it as workaround
how to get any value.
It should be simply clk_get_rate() and clk driver should return value.
And this value should be used in speed calculation. (Linux
Time to move zynq clk driver to DM to get these stuff for free.

Thanks,
Michal

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2016-12-20  6:54 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-16 12:38 [U-Boot] [PATCH 1/4] ARM: zynq: Remove CONFIG_BOOTP_SERVERIP Michal Simek
2016-12-16 12:38 ` [U-Boot] [PATCH 2/4] ARM: zynq: Remove spi-max-frequency Michal Simek
2016-12-16 17:28   ` Moritz Fischer
2016-12-20  6:54     ` Michal Simek
2016-12-16 12:38 ` [U-Boot] [PATCH 3/4] ARM: zynq: Setup modeboot variable based on boot mode Michal Simek
2016-12-16 12:38 ` [U-Boot] [PATCH 4/4] ARM: dts: zynq: replace gpio-key, wakeup with wakeup-source property Michal Simek
2016-12-16 13:23   ` Sudeep Holla
2016-12-16 13:30     ` Michal Simek
2016-12-16 13:31       ` Sudeep Holla

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.