Michal Simek | 29 Jun 2012 09:37
Picon

[PATCH 1/5] microblaze: Add gpio.h

Gpio support is not implemented yet. Adding it because of fdtdec.

Signed-off-by: Michal Simek <monstr <at> monstr.eu>
---
 arch/microblaze/include/asm/gpio.h |   41 ++++++++++++++++++++++++++++++++++++
 1 files changed, 41 insertions(+), 0 deletions(-)
 create mode 100644 arch/microblaze/include/asm/gpio.h

diff --git a/arch/microblaze/include/asm/gpio.h b/arch/microblaze/include/asm/gpio.h
new file mode 100644
index 0000000..883f4d4
--- /dev/null
+++ b/arch/microblaze/include/asm/gpio.h
 <at>  <at>  -0,0 +1,41  <at>  <at> 
+#ifndef _ASM_MICROBLAZE_GPIO_H_
+#define _ASM_MICROBLAZE_GPIO_H_
+
+#include <asm/io.h>
+
+static inline int gpio_request(unsigned gpio, const char *label)
+{
+	return 0;
+}
+
+static inline int gpio_free(unsigned gpio)
+{
+	return 0;
+}
+
+static inline int gpio_direction_input(unsigned gpio)
(Continue reading)

Michal Simek | 29 Jun 2012 09:37
Picon

[PATCH 2/5] microblaze: Move individual board linker scripts to common script in cpu tree.

Unification for all microblaze boards.

Signed-off-by: Michal Simek <monstr <at> monstr.eu>
---
 arch/microblaze/config.mk                  |    2 +
 arch/microblaze/cpu/u-boot.lds             |   71 ++++++++++++++++++++++++++++
 board/xilinx/microblaze-generic/u-boot.lds |   71 ----------------------------
 3 files changed, 73 insertions(+), 71 deletions(-)
 create mode 100644 arch/microblaze/cpu/u-boot.lds
 delete mode 100644 board/xilinx/microblaze-generic/u-boot.lds

diff --git a/arch/microblaze/config.mk b/arch/microblaze/config.mk
index abea70b..aca79e2 100644
--- a/arch/microblaze/config.mk
+++ b/arch/microblaze/config.mk
 <at>  <at>  -29,3 +29,5  <at>  <at>  CROSS_COMPILE ?= mb-
 CONFIG_STANDALONE_LOAD_ADDR ?= 0x80F00000

 PLATFORM_CPPFLAGS += -ffixed-r31 -D__microblaze__
+
+LDSCRIPT ?= $(SRCTREE)/$(CPUDIR)/u-boot.lds
diff --git a/arch/microblaze/cpu/u-boot.lds b/arch/microblaze/cpu/u-boot.lds
new file mode 100644
index 0000000..ee41145
--- /dev/null
+++ b/arch/microblaze/cpu/u-boot.lds
 <at>  <at>  -0,0 +1,71  <at>  <at> 
+/*
+ * (C) Copyright 2004 Atmark Techno, Inc.
+ *
(Continue reading)

Michal Simek | 9 Jul 2012 10:39
Picon

Re: [PATCH 2/5] microblaze: Move individual board linker scripts to common script in cpu tree.

2012/6/29 Michal Simek <monstr <at> monstr.eu>:
> Unification for all microblaze boards.
>
> Signed-off-by: Michal Simek <monstr <at> monstr.eu>
> ---
>  arch/microblaze/config.mk                  |    2 +
>  arch/microblaze/cpu/u-boot.lds             |   71 ++++++++++++++++++++++++++++
>  board/xilinx/microblaze-generic/u-boot.lds |   71 ----------------------------
>  3 files changed, 73 insertions(+), 71 deletions(-)
>  create mode 100644 arch/microblaze/cpu/u-boot.lds
>  delete mode 100644 board/xilinx/microblaze-generic/u-boot.lds
>
> diff --git a/arch/microblaze/config.mk b/arch/microblaze/config.mk
> index abea70b..aca79e2 100644
> --- a/arch/microblaze/config.mk
> +++ b/arch/microblaze/config.mk
>  <at>  <at>  -29,3 +29,5  <at>  <at>  CROSS_COMPILE ?= mb-
>  CONFIG_STANDALONE_LOAD_ADDR ?= 0x80F00000
>
>  PLATFORM_CPPFLAGS += -ffixed-r31 -D__microblaze__
> +
> +LDSCRIPT ?= $(SRCTREE)/$(CPUDIR)/u-boot.lds
> diff --git a/arch/microblaze/cpu/u-boot.lds b/arch/microblaze/cpu/u-boot.lds
> new file mode 100644
> index 0000000..ee41145
> --- /dev/null
> +++ b/arch/microblaze/cpu/u-boot.lds
>  <at>  <at>  -0,0 +1,71  <at>  <at> 
> +/*
> + * (C) Copyright 2004 Atmark Techno, Inc.
(Continue reading)

Michal Simek | 29 Jun 2012 09:37
Picon

[PATCH 3/5] microblaze: Add support for device tree driven board configuration

This is minimum code required to be able to use device-tree
for u-boot initialization.
Currently only for device driver initialization.

Linker script change ensures DTB to be aligned
for both options CONFIG_OF_EMBED and CONFIG_OF_SEPARATE.

Signed-off-by: Michal Simek <monstr <at> monstr.eu>
CC: Simon Glass <sjg <at> chromium.org>
---
 arch/microblaze/config.mk                 |    2 ++
 arch/microblaze/cpu/u-boot.lds            |    1 +
 arch/microblaze/include/asm/global_data.h |    1 +
 arch/microblaze/lib/board.c               |   23 +++++++++++++++++++++++
 4 files changed, 27 insertions(+), 0 deletions(-)

diff --git a/arch/microblaze/config.mk b/arch/microblaze/config.mk
index aca79e2..b4935f0 100644
--- a/arch/microblaze/config.mk
+++ b/arch/microblaze/config.mk
 <at>  <at>  -31,3 +31,5  <at>  <at>  CONFIG_STANDALONE_LOAD_ADDR ?= 0x80F00000
 PLATFORM_CPPFLAGS += -ffixed-r31 -D__microblaze__

 LDSCRIPT ?= $(SRCTREE)/$(CPUDIR)/u-boot.lds
+
+CONFIG_ARCH_DEVICE_TREE := microblaze
diff --git a/arch/microblaze/cpu/u-boot.lds b/arch/microblaze/cpu/u-boot.lds
index ee41145..d033a28 100644
--- a/arch/microblaze/cpu/u-boot.lds
+++ b/arch/microblaze/cpu/u-boot.lds
(Continue reading)

Michal Simek | 9 Jul 2012 10:41
Picon

Re: [PATCH 3/5] microblaze: Add support for device tree driven board configuration

2012/6/29 Michal Simek <monstr <at> monstr.eu>:
> This is minimum code required to be able to use device-tree
> for u-boot initialization.
> Currently only for device driver initialization.
>
> Linker script change ensures DTB to be aligned
> for both options CONFIG_OF_EMBED and CONFIG_OF_SEPARATE.
>
> Signed-off-by: Michal Simek <monstr <at> monstr.eu>
> CC: Simon Glass <sjg <at> chromium.org>
> ---
>  arch/microblaze/config.mk                 |    2 ++
>  arch/microblaze/cpu/u-boot.lds            |    1 +
>  arch/microblaze/include/asm/global_data.h |    1 +
>  arch/microblaze/lib/board.c               |   23 +++++++++++++++++++++++
>  4 files changed, 27 insertions(+), 0 deletions(-)
>
> diff --git a/arch/microblaze/config.mk b/arch/microblaze/config.mk
> index aca79e2..b4935f0 100644
> --- a/arch/microblaze/config.mk
> +++ b/arch/microblaze/config.mk
>  <at>  <at>  -31,3 +31,5  <at>  <at>  CONFIG_STANDALONE_LOAD_ADDR ?= 0x80F00000
>  PLATFORM_CPPFLAGS += -ffixed-r31 -D__microblaze__
>
>  LDSCRIPT ?= $(SRCTREE)/$(CPUDIR)/u-boot.lds
> +
> +CONFIG_ARCH_DEVICE_TREE := microblaze
> diff --git a/arch/microblaze/cpu/u-boot.lds b/arch/microblaze/cpu/u-boot.lds
> index ee41145..d033a28 100644
> --- a/arch/microblaze/cpu/u-boot.lds
(Continue reading)

Michal Simek | 29 Jun 2012 09:37
Picon

[PATCH 5/5] microblaze: Wire up fdt emaclite initialization

Call emaclite FDT registration when CONFIG_OF_CONTROL is used.

Signed-off-by: Michal Simek <monstr <at> monstr.eu>
---
 .../xilinx/microblaze-generic/microblaze-generic.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/board/xilinx/microblaze-generic/microblaze-generic.c b/board/xilinx/microblaze-generic/microblaze-generic.c
index a1e2bfe..4a719ba 100644
--- a/board/xilinx/microblaze-generic/microblaze-generic.c
+++ b/board/xilinx/microblaze-generic/microblaze-generic.c
 <at>  <at>  -73,6 +73,9  <at>  <at>  int board_eth_init(bd_t *bis)
 {
 	int ret = 0;

+#ifdef CONFIG_OF_CONTROL
+	ret |= xilinx_emaclite_init(bis);
+#else
 #ifdef CONFIG_XILINX_AXIEMAC
 	ret |= xilinx_axiemac_initialize(bis, XILINX_AXIEMAC_BASEADDR,
 						XILINX_AXIDMA_BASEADDR);
 <at>  <at>  -125,6 +128,6  <at>  <at>  int board_eth_init(bd_t *bis)
 #  endif
 # endif
 #endif
-
+#endif
 	return ret;
 }
--

-- 
(Continue reading)

Stephan Linz | 29 Jun 2012 22:22

Re: [PATCH 5/5] microblaze: Wire up fdt emaclite initialization

Am Freitag, den 29.06.2012, 09:37 +0200 schrieb Michal Simek: 
> Call emaclite FDT registration when CONFIG_OF_CONTROL is used.
> 
> Signed-off-by: Michal Simek <monstr <at> monstr.eu>
> ---
>  .../xilinx/microblaze-generic/microblaze-generic.c |    5 ++++-
>  1 files changed, 4 insertions(+), 1 deletions(-)
> 
> diff --git a/board/xilinx/microblaze-generic/microblaze-generic.c b/board/xilinx/microblaze-generic/microblaze-generic.c
> index a1e2bfe..4a719ba 100644
> --- a/board/xilinx/microblaze-generic/microblaze-generic.c
> +++ b/board/xilinx/microblaze-generic/microblaze-generic.c
>  <at>  <at>  -73,6 +73,9  <at>  <at>  int board_eth_init(bd_t *bis)
>  {
>  	int ret = 0;
>  
> +#ifdef CONFIG_OF_CONTROL
> +	ret |= xilinx_emaclite_init(bis);
> +#else

First of all: I've successful tested on an AXI system on Avnet S6LX9
micro-module.

Now some words to the different configuration strategy. I prefer a
seperation between the ongoing development without device tree support
and the upcoming development with fdt support.

Could you split the development in the context of boards, for example:

OLD: Development w/o fdt in:
(Continue reading)

Michal Simek | 3 Jul 2012 07:23
Picon

Re: [PATCH 5/5] microblaze: Wire up fdt emaclite initialization

On 06/29/2012 10:22 PM, Stephan Linz wrote:
> Am Freitag, den 29.06.2012, 09:37 +0200 schrieb Michal Simek:
>> Call emaclite FDT registration when CONFIG_OF_CONTROL is used.
>>
>> Signed-off-by: Michal Simek<monstr <at> monstr.eu>
>> ---
>>   .../xilinx/microblaze-generic/microblaze-generic.c |    5 ++++-
>>   1 files changed, 4 insertions(+), 1 deletions(-)
>>
>> diff --git a/board/xilinx/microblaze-generic/microblaze-generic.c b/board/xilinx/microblaze-generic/microblaze-generic.c
>> index a1e2bfe..4a719ba 100644
>> --- a/board/xilinx/microblaze-generic/microblaze-generic.c
>> +++ b/board/xilinx/microblaze-generic/microblaze-generic.c
>>  <at>  <at>  -73,6 +73,9  <at>  <at>  int board_eth_init(bd_t *bis)
>>   {
>>   	int ret = 0;
>>
>> +#ifdef CONFIG_OF_CONTROL
>> +	ret |= xilinx_emaclite_init(bis);
>> +#else
>
> First of all: I've successful tested on an AXI system on Avnet S6LX9
> micro-module.
>
> Now some words to the different configuration strategy. I prefer a
> seperation between the ongoing development without device tree support
> and the upcoming development with fdt support.
>
> Could you split the development in the context of boards, for example:
>
(Continue reading)

Michal Simek | 29 Jun 2012 09:37
Picon

[PATCH 4/5] net: emaclite: Support OF initialization

Support new CONFIG_OF_CONTROL option where device
probing is done based on device tree description.

Signed-off-by: Michal Simek <monstr <at> monstr.eu>
CC: Joe Hershberger <joe.hershberger <at> gmail.com>
---
 drivers/net/xilinx_emaclite.c |   30 ++++++++++++++++++++++++++++++
 1 files changed, 30 insertions(+), 0 deletions(-)

diff --git a/drivers/net/xilinx_emaclite.c b/drivers/net/xilinx_emaclite.c
index d5bd737..d890d60 100644
--- a/drivers/net/xilinx_emaclite.c
+++ b/drivers/net/xilinx_emaclite.c
 <at>  <at>  -28,6 +28,9  <at>  <at> 
 #include <config.h>
 #include <malloc.h>
 #include <asm/io.h>
+#include <fdtdec.h>
+
+DECLARE_GLOBAL_DATA_PTR;

 #undef DEBUG

 <at>  <at>  -375,3 +378,30  <at>  <at>  int xilinx_emaclite_initialize(bd_t *bis, unsigned long base_addr,

 	return 1;
 }
+
+#ifdef CONFIG_OF_CONTROL
+int xilinx_emaclite_init(bd_t *bis)
(Continue reading)

Joe Hershberger | 28 Sep 2012 17:52
Picon

Re: [PATCH 4/5] net: emaclite: Support OF initialization

Hi Michal,

On Fri, Jun 29, 2012 at 2:37 AM, Michal Simek <monstr <at> monstr.eu> wrote:
> Support new CONFIG_OF_CONTROL option where device
> probing is done based on device tree description.
>
> Signed-off-by: Michal Simek <monstr <at> monstr.eu>
> CC: Joe Hershberger <joe.hershberger <at> gmail.com>
> ---

Applied, thanks.

-Joe
Michal Simek | 9 Jul 2012 10:38
Picon

Re: [PATCH 1/5] microblaze: Add gpio.h

2012/6/29 Michal Simek <monstr <at> monstr.eu>:
> Gpio support is not implemented yet. Adding it because of fdtdec.
>
> Signed-off-by: Michal Simek <monstr <at> monstr.eu>
> ---
>  arch/microblaze/include/asm/gpio.h |   41 ++++++++++++++++++++++++++++++++++++
>  1 files changed, 41 insertions(+), 0 deletions(-)
>  create mode 100644 arch/microblaze/include/asm/gpio.h
>
> diff --git a/arch/microblaze/include/asm/gpio.h b/arch/microblaze/include/asm/gpio.h
> new file mode 100644
> index 0000000..883f4d4
> --- /dev/null
> +++ b/arch/microblaze/include/asm/gpio.h
>  <at>  <at>  -0,0 +1,41  <at>  <at> 
> +#ifndef _ASM_MICROBLAZE_GPIO_H_
> +#define _ASM_MICROBLAZE_GPIO_H_
> +
> +#include <asm/io.h>
> +
> +static inline int gpio_request(unsigned gpio, const char *label)
> +{
> +       return 0;
> +}
> +
> +static inline int gpio_free(unsigned gpio)
> +{
> +       return 0;
> +}
> +
(Continue reading)


Gmane