Re: [U-Boot] [PATCH v3 09/18] malta: support for coreFPGA6 boards

2013-11-11 Thread Daniel Schwierzeck
2013/11/11 Paul Burton :
>
>
> On 10/11/13 20:07, Marek Vasut wrote:
>>
>> Dear Paul Burton,
>>
>>> This patch adds support for running on Malta boards using coreFPGA6
>>> core cards, including support for the msc01 system controller used
>>> with them. The system controller is detected at runtime allowing one
>>> U-boot binary to run on a Malta with either.
>>>
>>> Due to the PCI I/O base differing between Maltas using gt64120 & msc01
>>> system controllers, the UART setup is modified slightly. A second UART
>>> is added so that there is one pointing at the correct address for each
>>> system controller. The Malta board then defines its own
>>> default_serial_console function to select the correct one at runtime.
>>> The incorrect UART will simply not function.
>>>
>>> Tested on:
>>>- A coreFPGA6 Malta running interAptiv and proAptiv bitstreams, both
>>>  with and without an L2 cache.
>>>- QEMU.
>>>
>>> Signed-off-by: Paul Burton 
>>> ---
>>> Changes in v3:
>>>- rebase atop master
>>>- remove commit message note about not working in QEMU, this does work
>>>  in older QEMU versions as noted by Gabor Juhos
>>>
>>> Changes in v2:
>>>- rebased after malta moved to board/imgtec/malta
>>>- removed unused status variable from msc01_config_access
>>> ---
>>>   arch/mips/include/asm/malta.h  |  35 ++--
>>>   board/imgtec/malta/lowlevel_init.S | 164
>>> - board/imgtec/malta/malta.c
>>> |
>>> 126 ++-- drivers/pci/Makefile   |   1
>>> +
>>>   drivers/pci/pci_msc01.c| 125 
>>>   include/configs/malta.h|   4 +-
>>>   include/msc01.h| 135 ++
>>>   include/pci_ids.h  |   3 +
>>>   include/pci_msc01.h|  17 
>>>   9 files changed, 594 insertions(+), 16 deletions(-)
>>>   create mode 100644 drivers/pci/pci_msc01.c
>>>   create mode 100644 include/msc01.h
>>>   create mode 100644 include/pci_msc01.h
>>>
>>> diff --git a/arch/mips/include/asm/malta.h
>>> b/arch/mips/include/asm/malta.h
>>> index d4d44a2..0b50a66 100644
>>> --- a/arch/mips/include/asm/malta.h
>>> +++ b/arch/mips/include/asm/malta.h
>>
>>
>> You are missing license in some files.
>>
>> Best regards,
>> Marek Vasut
>>
>
> Which files? The only files this patch adds are:
>
>   drivers/pci/pci_msc01.c
>   include/msc01.h
>   include/pci_msc01.h
>
> ...and all 3 of them contain GPL-2.0+ SPDX tags.
>
> Thanks,
> Paul
>

only arch/mips/include/asm/malta.h is missing the SPDX tag.

Paul, could you send a patch? Maybe you want to add your copyright,
because you modified parts of that file.

-- 
- Daniel
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v3 09/18] malta: support for coreFPGA6 boards

2013-11-11 Thread Paul Burton



On 10/11/13 20:07, Marek Vasut wrote:

Dear Paul Burton,


This patch adds support for running on Malta boards using coreFPGA6
core cards, including support for the msc01 system controller used
with them. The system controller is detected at runtime allowing one
U-boot binary to run on a Malta with either.

Due to the PCI I/O base differing between Maltas using gt64120 & msc01
system controllers, the UART setup is modified slightly. A second UART
is added so that there is one pointing at the correct address for each
system controller. The Malta board then defines its own
default_serial_console function to select the correct one at runtime.
The incorrect UART will simply not function.

Tested on:
   - A coreFPGA6 Malta running interAptiv and proAptiv bitstreams, both
 with and without an L2 cache.
   - QEMU.

Signed-off-by: Paul Burton 
---
Changes in v3:
   - rebase atop master
   - remove commit message note about not working in QEMU, this does work
 in older QEMU versions as noted by Gabor Juhos

Changes in v2:
   - rebased after malta moved to board/imgtec/malta
   - removed unused status variable from msc01_config_access
---
  arch/mips/include/asm/malta.h  |  35 ++--
  board/imgtec/malta/lowlevel_init.S | 164
- board/imgtec/malta/malta.c |
126 ++-- drivers/pci/Makefile   |   1
+
  drivers/pci/pci_msc01.c| 125 
  include/configs/malta.h|   4 +-
  include/msc01.h| 135 ++
  include/pci_ids.h  |   3 +
  include/pci_msc01.h|  17 
  9 files changed, 594 insertions(+), 16 deletions(-)
  create mode 100644 drivers/pci/pci_msc01.c
  create mode 100644 include/msc01.h
  create mode 100644 include/pci_msc01.h

diff --git a/arch/mips/include/asm/malta.h b/arch/mips/include/asm/malta.h
index d4d44a2..0b50a66 100644
--- a/arch/mips/include/asm/malta.h
+++ b/arch/mips/include/asm/malta.h


You are missing license in some files.

Best regards,
Marek Vasut



Which files? The only files this patch adds are:

  drivers/pci/pci_msc01.c
  include/msc01.h
  include/pci_msc01.h

...and all 3 of them contain GPL-2.0+ SPDX tags.

Thanks,
Paul

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v3 09/18] malta: support for coreFPGA6 boards

2013-11-10 Thread Marek Vasut
Dear Paul Burton,

> This patch adds support for running on Malta boards using coreFPGA6
> core cards, including support for the msc01 system controller used
> with them. The system controller is detected at runtime allowing one
> U-boot binary to run on a Malta with either.
> 
> Due to the PCI I/O base differing between Maltas using gt64120 & msc01
> system controllers, the UART setup is modified slightly. A second UART
> is added so that there is one pointing at the correct address for each
> system controller. The Malta board then defines its own
> default_serial_console function to select the correct one at runtime.
> The incorrect UART will simply not function.
> 
> Tested on:
>   - A coreFPGA6 Malta running interAptiv and proAptiv bitstreams, both
> with and without an L2 cache.
>   - QEMU.
> 
> Signed-off-by: Paul Burton 
> ---
> Changes in v3:
>   - rebase atop master
>   - remove commit message note about not working in QEMU, this does work
> in older QEMU versions as noted by Gabor Juhos
> 
> Changes in v2:
>   - rebased after malta moved to board/imgtec/malta
>   - removed unused status variable from msc01_config_access
> ---
>  arch/mips/include/asm/malta.h  |  35 ++--
>  board/imgtec/malta/lowlevel_init.S | 164
> - board/imgtec/malta/malta.c |
> 126 ++-- drivers/pci/Makefile   |   1
> +
>  drivers/pci/pci_msc01.c| 125 
>  include/configs/malta.h|   4 +-
>  include/msc01.h| 135 ++
>  include/pci_ids.h  |   3 +
>  include/pci_msc01.h|  17 
>  9 files changed, 594 insertions(+), 16 deletions(-)
>  create mode 100644 drivers/pci/pci_msc01.c
>  create mode 100644 include/msc01.h
>  create mode 100644 include/pci_msc01.h
> 
> diff --git a/arch/mips/include/asm/malta.h b/arch/mips/include/asm/malta.h
> index d4d44a2..0b50a66 100644
> --- a/arch/mips/include/asm/malta.h
> +++ b/arch/mips/include/asm/malta.h

You are missing license in some files.

Best regards,
Marek Vasut
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v3 09/18] malta: support for coreFPGA6 boards

2013-11-08 Thread Paul Burton
This patch adds support for running on Malta boards using coreFPGA6
core cards, including support for the msc01 system controller used
with them. The system controller is detected at runtime allowing one
U-boot binary to run on a Malta with either.

Due to the PCI I/O base differing between Maltas using gt64120 & msc01
system controllers, the UART setup is modified slightly. A second UART
is added so that there is one pointing at the correct address for each
system controller. The Malta board then defines its own
default_serial_console function to select the correct one at runtime.
The incorrect UART will simply not function.

Tested on:
  - A coreFPGA6 Malta running interAptiv and proAptiv bitstreams, both
with and without an L2 cache.
  - QEMU.

Signed-off-by: Paul Burton 
---
Changes in v3:
  - rebase atop master
  - remove commit message note about not working in QEMU, this does work
in older QEMU versions as noted by Gabor Juhos

Changes in v2:
  - rebased after malta moved to board/imgtec/malta
  - removed unused status variable from msc01_config_access
---
 arch/mips/include/asm/malta.h  |  35 ++--
 board/imgtec/malta/lowlevel_init.S | 164 -
 board/imgtec/malta/malta.c | 126 ++--
 drivers/pci/Makefile   |   1 +
 drivers/pci/pci_msc01.c| 125 
 include/configs/malta.h|   4 +-
 include/msc01.h| 135 ++
 include/pci_ids.h  |   3 +
 include/pci_msc01.h|  17 
 9 files changed, 594 insertions(+), 16 deletions(-)
 create mode 100644 drivers/pci/pci_msc01.c
 create mode 100644 include/msc01.h
 create mode 100644 include/pci_msc01.h

diff --git a/arch/mips/include/asm/malta.h b/arch/mips/include/asm/malta.h
index d4d44a2..0b50a66 100644
--- a/arch/mips/include/asm/malta.h
+++ b/arch/mips/include/asm/malta.h
@@ -9,15 +9,38 @@
 #ifndef _MIPS_ASM_MALTA_H
 #define _MIPS_ASM_MALTA_H
 
-#define MALTA_IO_PORT_BASE 0x1800
+#define MALTA_GT_BASE  0x1be0
+#define MALTA_GT_PCIIO_BASE0x1800
+#define MALTA_GT_UART0_BASE(MALTA_GT_PCIIO_BASE + 0x3f8)
 
-#define MALTA_UART_BASE(MALTA_IO_PORT_BASE + 0x3f8)
+#define MALTA_MSC01_BIU_BASE   0x1bc8
+#define MALTA_MSC01_PCI_BASE   0x1bd0
+#define MALTA_MSC01_PBC_BASE   0x1bd4
+#define MALTA_MSC01_IP1_BASE   0x1bc0
+#define MALTA_MSC01_IP1_SIZE   0x0040
+#define MALTA_MSC01_IP2_BASE1  0x1000
+#define MALTA_MSC01_IP2_SIZE1  0x0800
+#define MALTA_MSC01_IP2_BASE2  0x1800
+#define MALTA_MSC01_IP2_SIZE2  0x0400
+#define MALTA_MSC01_IP3_BASE   0x1c00
+#define MALTA_MSC01_IP3_SIZE   0x0400
+#define MALTA_MSC01_PCIMEM_BASE0x1000
+#define MALTA_MSC01_PCIMEM_SIZE0x1000
+#define MALTA_MSC01_PCIMEM_MAP 0x1000
+#define MALTA_MSC01_PCIIO_BASE 0x1b00
+#define MALTA_MSC01_PCIIO_SIZE 0x0080
+#define MALTA_MSC01_PCIIO_MAP  0x
+#define MALTA_MSC01_UART0_BASE (MALTA_MSC01_PCIIO_BASE + 0x3f8)
 
-#define MALTA_GT_BASE  0x1be0
+#define MALTA_RESET_BASE   0x1f000500
+#define GORESET0x42
 
-#define MALTA_RESET_BASE   0x1f000500
-#define GORESET0x42
+#define MALTA_FLASH_BASE   0x1fc0
 
-#define MALTA_FLASH_BASE   0x1fc0
+#define MALTA_REVISION 0x1fc00010
+#define MALTA_REVISION_CORID_SHF   10
+#define MALTA_REVISION_CORID_MSK   (0x3f << MALTA_REVISION_CORID_SHF)
+#define MALTA_REVISION_CORID_CORE_LV   1
+#define MALTA_REVISION_CORID_CORE_FPGA614
 
 #endif /* _MIPS_ASM_MALTA_H */
diff --git a/board/imgtec/malta/lowlevel_init.S 
b/board/imgtec/malta/lowlevel_init.S
index fa0b6a7..1af34f1 100644
--- a/board/imgtec/malta/lowlevel_init.S
+++ b/board/imgtec/malta/lowlevel_init.S
@@ -6,6 +6,8 @@
 
 #include 
 #include 
+#include 
+#include 
 
 #include 
 #include 
@@ -25,6 +27,25 @@
 
.globl  lowlevel_init
 lowlevel_init:
+   /* detect the core card */
+   li  t0, KSEG1ADDR(MALTA_REVISION)
+   lw  t0, 0(t0)
+   srl t0, t0, MALTA_REVISION_CORID_SHF
+   andit0, t0, (MALTA_REVISION_CORID_MSK >> \
+MALTA_REVISION_CORID_SHF)
+
+   /* core cards using the gt64120 system controller */
+   li  t1, MALTA_REVISION_CORID_CORE_LV
+   beq t0, t1, _gt64120
+
+   /* core cards using the MSC01 system controller */
+li t1, MALTA_REVISION_CORID_CORE_FPGA6
+   beq t0, t1, _msc01
+nop
+
+   /* unknown system controller */
+   b   .
+nop
 
/*
 * Load BAR registers of GT64120 as done by YAMON
@@ -39,7 +60