Re: [linux-yocto] [PATCH 1/1] xilinx-zynqmp: add the basic support xilinx-zynqmp

2019-06-06 Thread Nathan Rossi
On Thu, 6 Jun 2019 at 10:16, Zumeng Chen  wrote:
>
>
> On 6/6/19 1:19 AM, Bruce Ashfield wrote:
> > On Wed, Jun 5, 2019 at 4:02 AM Zumeng Chen  
> > wrote:
> >> This patch is to add scc/cfg meta to build and boot zcu102 board with the 
> >> bsp
> >> of xilinx-zynqmp.
> >>
> > See some questions below.
> >
> >> Signed-off-by: Zumeng.Chen 
> >> ---
> >>   bsp/xilinx-zynqmp/xilinx-zynqmp-standard.scc |   8 +
> >>   bsp/xilinx-zynqmp/xilinx-zynqmp.cfg  | 227 
> >> +++
> >>   bsp/xilinx-zynqmp/xilinx-zynqmp.scc  |   7 +
> >>   3 files changed, 242 insertions(+)
> >>   create mode 100644 bsp/xilinx-zynqmp/xilinx-zynqmp-standard.scc
> >>   create mode 100644 bsp/xilinx-zynqmp/xilinx-zynqmp.cfg
> >>   create mode 100644 bsp/xilinx-zynqmp/xilinx-zynqmp.scc
> >>
> >> diff --git a/bsp/xilinx-zynqmp/xilinx-zynqmp-standard.scc 
> >> b/bsp/xilinx-zynqmp/xilinx-zynqmp-standard.scc
> >> new file mode 100644
> >> index 000..23dd874
> >> --- /dev/null
> >> +++ b/bsp/xilinx-zynqmp/xilinx-zynqmp-standard.scc
> >> @@ -0,0 +1,8 @@
> >> +define KMACHINE xilinx-zynqmp
> >> +define KTYPE standard
> >> +define KARCH arm64
> >> +
> >> +include ktypes/standard/standard.scc
> >> +branch xilinx-zynqmp
> >> +
> >> +include xilinx-zynqmp.scc
> >> diff --git a/bsp/xilinx-zynqmp/xilinx-zynqmp.cfg 
> >> b/bsp/xilinx-zynqmp/xilinx-zynqmp.cfg
> >> new file mode 100644
> >> index 000..e292366
> >> --- /dev/null
> >> +++ b/bsp/xilinx-zynqmp/xilinx-zynqmp.cfg
> >> @@ -0,0 +1,227 @@
> >> +#.
> >> +#WARNING
> >> +#
> >> +# This file is a kernel configuration fragment, and not a full kernel
> >> +# configuration file.  The final kernel configuration is made up of
> >> +# an assembly of processed fragments, each of which is designed to
> >> +# capture a specific part of the final configuration (e.g. platform
> >> +# configuration, feature configuration, and board specific hardware
> >> +# configuration).  For more information on kernel configuration, please
> >> +# consult the product documentation.
> >> +#
> >> +#.
>
>
> Forget to remove this part, I'll delete them above.
>
> >> +
> >> +
> >> +CONFIG_ARM64=y
> >> +CONFIG_ARCH_ZYNQMP=y
> >> +CONFIG_ARM64_4K_PAGES=y
> >> +CONFIG_SMP=y
> >> +CONFIG_NR_CPUS=8
> >> +CONFIG_HOTPLUG_CPU=y
> > Since cpu hotplug isn't related to the hardware capabilities of the
> > board, we should really separate this out into another fragment.
> >
> > Both hotplug and smp are defined in: debug-cpu-hotplug-state-control.cfg
>
>
> Sure, and I guess we can include it since it might be useful in some app
> scenario.
>
> >
> > While that is in the debug subdirectory, it really could just be a
> > kernel feature outside of that structure. For now, I'd say just
> > include that fragment, and we can move it around later.
> >
> > We also do have a bsp/xilinx/soc/ subdirectory, and it would make
>
>
> Yes, I checked it, it seems only for zynq 7000 and its special
> interfaces. I bet
>
> the original author didn't mean to share something for both arm64 and 32 :)

When I created the structure I had intended for it to include the
zynqmp related configs. I even had some yocto-kernel-cache patches for
it at the time, but zynqmp has changed quite a bit since those initial
patches. Most of those configs still live in meta-xilinx though (some
are specific to the linux-xlnx kernel).
http://git.yoctoproject.org/cgit/cgit.cgi/meta-xilinx/tree/meta-xilinx-bsp/recipes-kernel/linux/xilinx-kmeta

I would highly recommend keeping the xilinx bsp configs together under
the bsp/xilinx/ directory. And try to reuse the existing configs where
possible or splitting some parts of them out to make common configs
since zynq and zynqmp share a number of common drivers.

Regards,
Nathan

>
> And for those common things, I guess some of them might be included by our
>
> rootfs build system.
>
>
> > sense to locate these fragments there, and to factor out some common
> > configs. I see some of the issues I'm pointing out here are in the
> > existing fragments as well, so there's an opportunity for some low
> > effort fixups.
>
>
> >
> >> +
> >> +CONFIG_PCI=y
> >> +CONFIG_PCI_MSI=y
> >> +CONFIG_PCI_MSI_IRQ_DOMAIN=y
> >> +CONFIG_PCIE_XILINX_NWL=y
> >> +CONFIG_PCIEPORTBUS=y
> >> +CONFIG_PCIE_XDMA_PL=y
> >> +
> >> +#CPU ilde and freq
> >> +CONFIG_CPU_IDLE=y
> >> +CONFIG_ARM_CPUIDLE=y
> >> +CONFIG_CPU_FREQ=y
> >> +CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
> >> +CONFIG_CPU_FREQ_GOV_USERSPACE=y
> >> +CONFIG_CPUFREQ_DT=y
> >> +CONFIG_CPUFREQ_DT_PLATDEV=y
> > These are also not tied to h/w. We already have a
> > features/power/intel.cfg fragment. Can you relocate these to a zynqmp
> > or xilinx fragment and put it along side of the existing ones ?
>
>
> I'll try it with a nice way.
>
> >
> >
> >> +
> >> +# CAN Device Drivers
> >> +#
> >> +CONFIG_CAN=y

Re: [linux-yocto] [kernel-cache][PATCH] features/wifi: Add WiFi driver fragments for various vendors/interfaces

2018-03-22 Thread Nathan Rossi
On 22 March 2018 at 15:33, Bruce Ashfield <bruce.ashfi...@windriver.com> wrote:
> On 03/20/2018 10:10 AM, Nathan Rossi wrote:
>>
>> This change adds WiFi driver configuration fragments. The fragments are
>> split into vendor and interface files to allow for easy selection of
>> drivers for specific interface types (USB, PCI, SDIO) which is useful
>> for BSPs with specific interfaces. The specific vendor/interface config
>> fragments can be included by specific BSPs in its .scc files.
>>
>> However .scc files (wifi-*.scc) are provided to allow enabling interface
>> specific or all interfaces drivers via KERNEL_FEATURES or inclusion via
>> other .scc files. And wifi-common.scc is provided to enable the base
>> config options required for all WiFi drivers, which is done to ensure
>> correct configuration for default no config setups (e.g.
>> linux-yocto-tiny).
>>
>> This patch only enables a limited set of drivers, which is based on what
>> the common-pc-wifi.cfg fragment sets as well as some additional drivers,
>> that primarily appear in USB WiFi devices.
>>
>
> These changes look good to me. I'll let them sit on the list for
> another day or so, and see if anyone else has any comments.
>
>
>> Signed-off-by: Nathan Rossi <nat...@nathanrossi.com>
>> ---
>> These changes are very similar to a set of configuration fragments that
>> were included (?) in minnow branches in ~2013. However they never made
>> it into the current set of configuration fragments.
>>
>>
>> https://lists.yoctoproject.org/pipermail/linux-yocto/2013-November/001393.html
>
>
> Interesting. I'm not sure how they ended up getting dropped or
> lost, but when I merge this, it will go into the versioned
> branches and master, so it can't be lost again.
>
>>
>> Also whilst not in this patch, if accepted these fragments could replace
>> the common-pc-wifi.cfg to reduce duplication.
>
>
> Indeed. We can look at that in follow up commits.
>
>>
>> For completeness I have tested these fragments on linux-yocto version
>> v4.14 and v4.15 for qemux86, qemux86-64 and qemuarm builds as well as
>> for the beaglebone-yocto target. For v4.12 compatibility, due to the
>> iwlwifi fragments adding patches (which do not apply correctly to
>> standard/base) the fragments would need to be modified.
>
>
> What configuration were you building to trigger those errors ? Just
> qemux86-64 ? something else ? The patches should have been ignored,
> as long as the fragment wasn't directly on the SRC_URI.

Just adding iwlwifi.scc to KERNEL_FEATURES either directly or via the
include in one of the .scc files of this patch causes the iwlwifi
patches to apply.

KERNEL_FEATURES_append = " features/iwlwifi/iwlwifi.scc"

| DEBUG: Executing shell function do_patch
| (1/310) iwlwifi-mvm-support-getting-nvm-data-from-firmware.patch
| [INFO]: check of
.kernel-meta//patches//features/iwlwifi/iwlwifi-mvm-support-getting-nvm-data-from-firmware.patch
with "git am" did not pass, trying reduced context.
| [INFO]: Context reduced git-am of
.kernel-meta//patches//features/iwlwifi/iwlwifi-mvm-support-getting-nvm-data-from-firmware.patch
with "git am" did not work, trying "apply".
| 
/storage/nathan/build/test-wifi/tmp-glibc/work-shared/qemux86-64/kernel-source/.git/rebase-apply/patch:26:
indent with spaces.
|  * struct iwl_nvm_get_info - request to get NVM data
| 
/storage/nathan/build/test-wifi/tmp-glibc/work-shared/qemux86-64/kernel-source/.git/rebase-apply/patch:27:
indent with spaces.
|  */
| 
/storage/nathan/build/test-wifi/tmp-glibc/work-shared/qemux86-64/kernel-source/.git/rebase-apply/patch:33:
indent with spaces.
|  * struct iwl_nvm_get_info_general - general NVM data
| 
/storage/nathan/build/test-wifi/tmp-glibc/work-shared/qemux86-64/kernel-source/.git/rebase-apply/patch:34:
indent with spaces.
|  * @flags: 1 - empty, 0 - valid
| 
/storage/nathan/build/test-wifi/tmp-glibc/work-shared/qemux86-64/kernel-source/.git/rebase-apply/patch:35:
indent with spaces.
|  * @nvm_version: nvm version
| error: patch failed: drivers/net/wireless/intel/iwlwifi/mvm/fw-api.h:345
| error: drivers/net/wireless/intel/iwlwifi/mvm/fw-api.h: patch does not apply
| error: patch failed: drivers/net/wireless/intel/iwlwifi/mvm/fw.c:738
| error: drivers/net/wireless/intel/iwlwifi/mvm/fw.c: patch does not apply
| error: patch failed: drivers/net/wireless/intel/iwlwifi/mvm/mvm.h:1390
| error: drivers/net/wireless/intel/iwlwifi/mvm/mvm.h: patch does not apply
| error: patch failed: drivers/net/wireless/intel/iwlwifi/mvm/nvm.c:374
| error: drivers/net/wireless/intel/iwlwifi/mvm/nvm.c: patch does not apply
| error: patch failed: drivers/net/wireless/intel/iwlwifi/mvm/ops.c:483
| error: dr

[linux-yocto] [kernel-cache][PATCH] features/wifi: Add WiFi driver fragments for various vendors/interfaces

2018-03-20 Thread Nathan Rossi
This change adds WiFi driver configuration fragments. The fragments are
split into vendor and interface files to allow for easy selection of
drivers for specific interface types (USB, PCI, SDIO) which is useful
for BSPs with specific interfaces. The specific vendor/interface config
fragments can be included by specific BSPs in its .scc files.

However .scc files (wifi-*.scc) are provided to allow enabling interface
specific or all interfaces drivers via KERNEL_FEATURES or inclusion via
other .scc files. And wifi-common.scc is provided to enable the base
config options required for all WiFi drivers, which is done to ensure
correct configuration for default no config setups (e.g.
linux-yocto-tiny).

This patch only enables a limited set of drivers, which is based on what
the common-pc-wifi.cfg fragment sets as well as some additional drivers,
that primarily appear in USB WiFi devices.

Signed-off-by: Nathan Rossi <nat...@nathanrossi.com>
---
These changes are very similar to a set of configuration fragments that
were included (?) in minnow branches in ~2013. However they never made
it into the current set of configuration fragments.

https://lists.yoctoproject.org/pipermail/linux-yocto/2013-November/001393.html

Also whilst not in this patch, if accepted these fragments could replace
the common-pc-wifi.cfg to reduce duplication.

For completeness I have tested these fragments on linux-yocto version
v4.14 and v4.15 for qemux86, qemux86-64 and qemuarm builds as well as
for the beaglebone-yocto target. For v4.12 compatibility, due to the
iwlwifi fragments adding patches (which do not apply correctly to
standard/base) the fragments would need to be modified.
---
 features/wifi/atheros-pci.cfg   | 11 +++
 features/wifi/atheros-usb.cfg   |  8 
 features/wifi/broadcom-pci.cfg  | 11 +++
 features/wifi/broadcom-sdio.cfg | 11 +++
 features/wifi/broadcom-usb.cfg  |  7 +++
 features/wifi/mediatek-pci.cfg  |  3 +++
 features/wifi/mediatek-usb.cfg  |  3 +++
 features/wifi/ralink-pci.cfg| 15 +++
 features/wifi/ralink-usb.cfg| 12 
 features/wifi/realtek-pci.cfg   | 18 ++
 features/wifi/realtek-usb.cfg   | 11 +++
 features/wifi/wifi-all.scc  |  7 +++
 features/wifi/wifi-common.cfg   |  4 
 features/wifi/wifi-common.scc   |  7 +++
 features/wifi/wifi-pci.scc  | 14 ++
 features/wifi/wifi-sdio.scc |  7 +++
 features/wifi/wifi-usb.scc  | 11 +++
 17 files changed, 160 insertions(+)
 create mode 100644 features/wifi/atheros-pci.cfg
 create mode 100644 features/wifi/atheros-usb.cfg
 create mode 100644 features/wifi/broadcom-pci.cfg
 create mode 100644 features/wifi/broadcom-sdio.cfg
 create mode 100644 features/wifi/broadcom-usb.cfg
 create mode 100644 features/wifi/mediatek-pci.cfg
 create mode 100644 features/wifi/mediatek-usb.cfg
 create mode 100644 features/wifi/ralink-pci.cfg
 create mode 100644 features/wifi/ralink-usb.cfg
 create mode 100644 features/wifi/realtek-pci.cfg
 create mode 100644 features/wifi/realtek-usb.cfg
 create mode 100644 features/wifi/wifi-all.scc
 create mode 100644 features/wifi/wifi-common.cfg
 create mode 100644 features/wifi/wifi-common.scc
 create mode 100644 features/wifi/wifi-pci.scc
 create mode 100644 features/wifi/wifi-sdio.scc
 create mode 100644 features/wifi/wifi-usb.scc

diff --git a/features/wifi/atheros-pci.cfg b/features/wifi/atheros-pci.cfg
new file mode 100644
index 00..1c48a0528a
--- /dev/null
+++ b/features/wifi/atheros-pci.cfg
@@ -0,0 +1,11 @@
+CONFIG_WLAN_VENDOR_ATH=y
+
+# ath5k
+CONFIG_ATH5K=m
+
+# ath9k
+CONFIG_ATH9K=m
+CONFIG_ATH9K_RFKILL=y
+CONFIG_ATH9K_PCOEM=y
+CONFIG_ATH9K_PCI=y
+
diff --git a/features/wifi/atheros-usb.cfg b/features/wifi/atheros-usb.cfg
new file mode 100644
index 00..b9767dc164
--- /dev/null
+++ b/features/wifi/atheros-usb.cfg
@@ -0,0 +1,8 @@
+CONFIG_WLAN_VENDOR_ATH=y
+
+# ath9k
+CONFIG_ATH9K=m
+CONFIG_ATH9K_RFKILL=y
+CONFIG_ATH9K_PCOEM=y
+CONFIG_ATH9K_HTC=y
+
diff --git a/features/wifi/broadcom-pci.cfg b/features/wifi/broadcom-pci.cfg
new file mode 100644
index 00..2b5abe5842
--- /dev/null
+++ b/features/wifi/broadcom-pci.cfg
@@ -0,0 +1,11 @@
+CONFIG_WLAN_VENDOR_BROADCOM=y
+
+# brcm80211
+CONFIG_BRCMUTIL=m
+CONFIG_BRCMSMAC=m
+CONFIG_BRCMFMAC=m
+CONFIG_BRCMFMAC_PCIE=y
+
+# b43
+CONFIG_B43=m
+
diff --git a/features/wifi/broadcom-sdio.cfg b/features/wifi/broadcom-sdio.cfg
new file mode 100644
index 00..7762ccc61c
--- /dev/null
+++ b/features/wifi/broadcom-sdio.cfg
@@ -0,0 +1,11 @@
+CONFIG_WLAN_VENDOR_BROADCOM=y
+
+# brcm80211
+CONFIG_BRCMUTIL=m
+CONFIG_BRCMFMAC=m
+CONFIG_BRCMFMAC_SDIO=y
+
+# b43
+CONFIG_B43=m
+CONFIG_B43_SDIO=y
+
diff --git a/features/wifi/broadcom-usb.cfg b/features/wifi/broadcom-usb.cfg
new file mode 100644
index 00..098933788d
--- /dev/null
+++ b/features/wifi/broadcom-usb.cfg
@@ -0,0 +1,7 @@
+CONFIG_WLAN_VENDOR_BROADCOM=y
+
+# brcm80211
+CONFIG_BRCM

Re: [linux-yocto] [kernel-cache][PATCH] bsp/xilinx/soc/zynq.cfg: Ensure ARM_THUMB is enabled

2017-07-18 Thread Nathan Rossi
On 18 July 2017 at 05:43, Bruce Ashfield <bruce.ashfi...@windriver.com> wrote:
> On 2017-07-15 11:25 AM, Nathan Rossi wrote:
>>
>> Enable ARM_THUMB which is normally enabled in arch/arm/arm.cfg, however
>> this config (specifically the .cfg, as the .scc is included via
>> standard) is not included by the tiny kernel type. This ensures code
>> built for Zynq targets which might use THUMB instructions (e.g. OE
>> builds which target 'cortexa9thf-neon') work correctly when using the
>> tiny kernel type.
>
>
> good catch/fix!
>
> merged.

Thanks, this change should also be applied to the 4.9 and 4.10
branches as well since they are affected by the same missed config.

Thanks,
Nathan

>
> Bruce
>
>
>>
>> Signed-off-by: Nathan Rossi <nat...@nathanrossi.com>
>> ---
>>   bsp/xilinx/soc/zynq.cfg | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/bsp/xilinx/soc/zynq.cfg b/bsp/xilinx/soc/zynq.cfg
>> index 3678f4a6f5..c427135eca 100644
>> --- a/bsp/xilinx/soc/zynq.cfg
>> +++ b/bsp/xilinx/soc/zynq.cfg
>> @@ -4,6 +4,7 @@ CONFIG_MMU=y
>>   CONFIG_ARCH_MULTI_V7=y
>>   CONFIG_ARCH_VEXPRESS=y
>>   CONFIG_ARCH_ZYNQ=y
>> +CONFIG_ARM_THUMB=y
>>   CONFIG_VFP=y
>>   CONFIG_NEON=y
>>   CONFIG_AEABI=y
>>
>
-- 
___
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto


Re: [linux-yocto] [kernel-cache][RFC PATCH 5/7] bsp/qemumicroblazeeb: Add BSP configs for qemumicroblazeeb

2017-07-15 Thread Nathan Rossi
On 15 July 2017 at 05:39, Bruce Ashfield <bruce.ashfi...@windriver.com> wrote:
> On 2017-07-13 1:56 PM, Nathan Rossi wrote:
>>
>> On 13 July 2017 at 05:22, Bruce Ashfield <bruce.ashfi...@windriver.com>
>> wrote:
>>>
>>> On 2017-07-04 11:29 AM, Nathan Rossi wrote:
>>>>
>>>>
>>>> Create configs for the qemumicroblazeeb machine. This includes both
>>>> -standard and -tiny configs.
>>>>
>>>> Signed-off-by: Nathan Rossi <nat...@nathanrossi.com>
>>>> ---
>>>>bsp/qemumicroblaze/qemumicroblazeeb-standard.scc | 15 +++
>>>>bsp/qemumicroblaze/qemumicroblazeeb-tiny.scc | 12 
>>>>bsp/qemumicroblaze/qemumicroblazeeb.cfg  | 15 +++
>>>>3 files changed, 42 insertions(+)
>>>>create mode 100644 bsp/qemumicroblaze/qemumicroblazeeb-standard.scc
>>>>create mode 100644 bsp/qemumicroblaze/qemumicroblazeeb-tiny.scc
>>>>create mode 100644 bsp/qemumicroblaze/qemumicroblazeeb.cfg
>>>>
>>>> diff --git a/bsp/qemumicroblaze/qemumicroblazeeb-standard.scc
>>>> b/bsp/qemumicroblaze/qemumicroblazeeb-standard.scc
>>>> new file mode 100644
>>>> index 00..ae93b49a11
>>>> --- /dev/null
>>>> +++ b/bsp/qemumicroblaze/qemumicroblazeeb-standard.scc
>>>> @@ -0,0 +1,15 @@
>>>> +define KMACHINE qemumicroblazeeb
>>>> +define KTYPE standard
>>>> +define KARCH microblaze
>>>> +
>>>> +include ktypes/standard/standard.scc
>>>> +
>>>> +include arch/microblaze/microblaze.scc
>>>> +kconf hardware qemumicroblazeeb.cfg
>>>> +
>>>> +include bsp/xilinx/soc/drivers-softip.scc
>>>> +include bsp/xilinx/board-common.scc
>>>> +
>>>> +# default policy for standard kernels
>>>> +include features/latencytop/latencytop.scc
>>>> +include features/profiling/profiling.scc
>>>> diff --git a/bsp/qemumicroblaze/qemumicroblazeeb-tiny.scc
>>>> b/bsp/qemumicroblaze/qemumicroblazeeb-tiny.scc
>>>> new file mode 100644
>>>> index 00..2d1bb74132
>>>> --- /dev/null
>>>> +++ b/bsp/qemumicroblaze/qemumicroblazeeb-tiny.scc
>>>> @@ -0,0 +1,12 @@
>>>> +define KMACHINE qemumicroblazeeb
>>>> +define KTYPE tiny
>>>> +define KARCH microblaze
>>>> +
>>>> +include ktypes/tiny/tiny.scc
>>>> +
>>>> +include arch/microblaze/microblaze.scc
>>>> +kconf hardware qemumicroblazeeb.cfg
>>>> +
>>>> +include bsp/xilinx/soc/drivers-softip.scc
>>>> +include bsp/xilinx/board-common.scc
>>>> +
>>>> diff --git a/bsp/qemumicroblaze/qemumicroblazeeb.cfg
>>>> b/bsp/qemumicroblaze/qemumicroblazeeb.cfg
>>>> new file mode 100644
>>>> index 00..0f635c1652
>>>> --- /dev/null
>>>> +++ b/bsp/qemumicroblaze/qemumicroblazeeb.cfg
>>>> @@ -0,0 +1,15 @@
>>>> +
>>>> +CONFIG_XILINX_MICROBLAZE0_FAMILY="spartan3"
>>>
>>>
>>>
>>> Out curiosity, is it this config that actually dictates
>>> the endianess ?
>>
>>
>> This config just populates the fpga family. It does control some
>> instruction flags for very old microblaze cpu versions [0]. But
>> otherwise just embeds a string that can be read at run time.
>>
>>>
>>> I ask, because I didn't see anything else obvious that would
>>> trigger this to build BE.
>>
>>
>> There is no kernel config to switch endianess, it is defined by the
>> toolchain used. You can see how the arch picks based on compiler
>> defines e.g. [1], [2].
>
>
> Aha. So the naming convention of 'eb' isn't significant from the
> point of view of endianess.

Yep the "eb" naming is just to make it clear that it is big endian, as
previously (CPU v7 and earlier) MicroBlaze did not support little
endian. But since little endian support was added, it has been the
default (mainly due to the switch from CoreConnect-PLB buses/devices
to AMBA-AXI buses/devices).

>
> If so, what is the delta between the kernel configs of the el and
> eb machine ?

So the only delta between the machines is in the qemumicroblazee*.cfg
files. From a kernel config standpoint this is only cpu feature flags
for the compiler and the kernel base memory address. Everything else
for the targets is run-time configured via device trees (for the
qemumicroblaze machines the device trees are provided by QEMU).

Regards,
Nathan
-- 
___
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto


Re: [linux-yocto] [kernel-cache][RFC PATCH 0/7] MicroBlaze and Zynq BSP configuration

2017-07-15 Thread Nathan Rossi
On 15 July 2017 at 05:42, Bruce Ashfield <bruce.ashfi...@windriver.com> wrote:
> On 2017-07-13 1:55 PM, Nathan Rossi wrote:
>>
>> On 13 July 2017 at 05:25, Bruce Ashfield <bruce.ashfi...@windriver.com>
>> wrote:
>>>
>>> On 2017-07-04 11:29 AM, Nathan Rossi wrote:
>>>>
>>>>
>>>> Most of this configuration has existed in the meta-xilinx layer for
>>>> quite some time for use with linux-yocto and Xilinx's vendor tree
>>>> kernel, linux-xlnx.
>>>>
>>>> The goal is to enable the use of the MicroBlaze architecture in OE-Core
>>>> including the addition of QEMU machines (qemumicroblazeel,
>>>> qemumicroblazeeb), this relies on having configuration for the BSPs in
>>>> linux-yocto. This series adds the BSP configs for these machines
>>>> including both standard and tiny kernel types, as well as fragments for
>>>> configuring Xilinx Soft IP drivers.
>>>>
>>>> Also included are Zynq SoC configuration fragments and a generalised
>>>> machine config (targeting the SoC for both standard and tiny kernel
>>>> types).
>>>>
>>>> Support for MicroBlaze and Zynq has been available in upstream and
>>>> linux-yocto for a number of releases. This series does not require any
>>>> patching of the kernel source to enable any functionality of the target
>>>> BSPs and is purely kernel configuration.
>>>>
>>>> Additionally included in this series is a fragment for debug purposes
>>>> that enables the kernels DEBUG_DYNAMIC feature.
>>>>
>>>
>>> These are really clean, and self documenting. I wouldn't have a problem
>>> carrying these along with the main kernel-cache branches.
>>>
>>> I don't have the h/w .. so obviously you'd control all the updates (and
>>> any necessary fixes) that weren't clear to me (i.e. options that have
>>> disappeared, or dependency issues, I can handle).
>>
>>
>> With the qemumicroblaze* targets in the future once all changes have
>> been applied to oe-core you should be able to test them with just qemu
>> if needed.
>
>
> Right. I do recall you mentioning that. That will indeed be
> helpful if I run into something and I want to try a closed loop
> fix for it.
>
>>
>> But I am good to keep a look out on changes to the linux-yocto kernel
>> and test/validate for these configs.
>>
>>>
>>> I had one question about the BE machine, but that is mostly for my
>>> information only.
>>>
>>> I'll queue these up for my 4.10 and master branch (which is now 4.12+
>>> for linux-yocto-dev).
>>
>>
>> I had not yet tested these with 4.10 (which is reason why RFC), though
>> just tested against v4.10/-dev and all looks good.
>
>
> ok, cool.
>
> So if I stage them for 4.9, 4.10 and master (aka 4.12+), that can
> form a baseline.
>
> They'll be pushed shortly, and you can follow up with a tweak for
> master for 4.12.
>

I noticed a missing config for zynq related to tiny kernel type after
doing some more testing with the 4.12 updates. Due to how tiny.scc
includes standard.scc (which includes arm.scc), however it ignores the
.cfg files, which meant CONFIG_ARM_THUMB was not enabled for tiny
kernels. I've sent a patch to add this for the 4.9,4.10,master
branches.

Otherwise all looks good, and I have sent a patch for the 4.12 changes as well.

Thanks,
Nathan
-- 
___
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto


[linux-yocto] [kernel-cache][PATCH] bsp/xilinx/soc/zynq.cfg: Ensure ARM_THUMB is enabled

2017-07-15 Thread Nathan Rossi
Enable ARM_THUMB which is normally enabled in arch/arm/arm.cfg, however
this config (specifically the .cfg, as the .scc is included via
standard) is not included by the tiny kernel type. This ensures code
built for Zynq targets which might use THUMB instructions (e.g. OE
builds which target 'cortexa9thf-neon') work correctly when using the
tiny kernel type.

Signed-off-by: Nathan Rossi <nat...@nathanrossi.com>
---
 bsp/xilinx/soc/zynq.cfg | 1 +
 1 file changed, 1 insertion(+)

diff --git a/bsp/xilinx/soc/zynq.cfg b/bsp/xilinx/soc/zynq.cfg
index 3678f4a6f5..c427135eca 100644
--- a/bsp/xilinx/soc/zynq.cfg
+++ b/bsp/xilinx/soc/zynq.cfg
@@ -4,6 +4,7 @@ CONFIG_MMU=y
 CONFIG_ARCH_MULTI_V7=y
 CONFIG_ARCH_VEXPRESS=y
 CONFIG_ARCH_ZYNQ=y
+CONFIG_ARM_THUMB=y
 CONFIG_VFP=y
 CONFIG_NEON=y
 CONFIG_AEABI=y
-- 
2.13.2

-- 
___
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto


Re: [linux-yocto] [kernel-cache][RFC PATCH 5/7] bsp/qemumicroblazeeb: Add BSP configs for qemumicroblazeeb

2017-07-13 Thread Nathan Rossi
On 13 July 2017 at 05:22, Bruce Ashfield <bruce.ashfi...@windriver.com> wrote:
> On 2017-07-04 11:29 AM, Nathan Rossi wrote:
>>
>> Create configs for the qemumicroblazeeb machine. This includes both
>> -standard and -tiny configs.
>>
>> Signed-off-by: Nathan Rossi <nat...@nathanrossi.com>
>> ---
>>   bsp/qemumicroblaze/qemumicroblazeeb-standard.scc | 15 +++
>>   bsp/qemumicroblaze/qemumicroblazeeb-tiny.scc | 12 
>>   bsp/qemumicroblaze/qemumicroblazeeb.cfg  | 15 +++
>>   3 files changed, 42 insertions(+)
>>   create mode 100644 bsp/qemumicroblaze/qemumicroblazeeb-standard.scc
>>   create mode 100644 bsp/qemumicroblaze/qemumicroblazeeb-tiny.scc
>>   create mode 100644 bsp/qemumicroblaze/qemumicroblazeeb.cfg
>>
>> diff --git a/bsp/qemumicroblaze/qemumicroblazeeb-standard.scc
>> b/bsp/qemumicroblaze/qemumicroblazeeb-standard.scc
>> new file mode 100644
>> index 00..ae93b49a11
>> --- /dev/null
>> +++ b/bsp/qemumicroblaze/qemumicroblazeeb-standard.scc
>> @@ -0,0 +1,15 @@
>> +define KMACHINE qemumicroblazeeb
>> +define KTYPE standard
>> +define KARCH microblaze
>> +
>> +include ktypes/standard/standard.scc
>> +
>> +include arch/microblaze/microblaze.scc
>> +kconf hardware qemumicroblazeeb.cfg
>> +
>> +include bsp/xilinx/soc/drivers-softip.scc
>> +include bsp/xilinx/board-common.scc
>> +
>> +# default policy for standard kernels
>> +include features/latencytop/latencytop.scc
>> +include features/profiling/profiling.scc
>> diff --git a/bsp/qemumicroblaze/qemumicroblazeeb-tiny.scc
>> b/bsp/qemumicroblaze/qemumicroblazeeb-tiny.scc
>> new file mode 100644
>> index 00..2d1bb74132
>> --- /dev/null
>> +++ b/bsp/qemumicroblaze/qemumicroblazeeb-tiny.scc
>> @@ -0,0 +1,12 @@
>> +define KMACHINE qemumicroblazeeb
>> +define KTYPE tiny
>> +define KARCH microblaze
>> +
>> +include ktypes/tiny/tiny.scc
>> +
>> +include arch/microblaze/microblaze.scc
>> +kconf hardware qemumicroblazeeb.cfg
>> +
>> +include bsp/xilinx/soc/drivers-softip.scc
>> +include bsp/xilinx/board-common.scc
>> +
>> diff --git a/bsp/qemumicroblaze/qemumicroblazeeb.cfg
>> b/bsp/qemumicroblaze/qemumicroblazeeb.cfg
>> new file mode 100644
>> index 00..0f635c1652
>> --- /dev/null
>> +++ b/bsp/qemumicroblaze/qemumicroblazeeb.cfg
>> @@ -0,0 +1,15 @@
>> +
>> +CONFIG_XILINX_MICROBLAZE0_FAMILY="spartan3"
>
>
> Out curiosity, is it this config that actually dictates
> the endianess ?

This config just populates the fpga family. It does control some
instruction flags for very old microblaze cpu versions [0]. But
otherwise just embeds a string that can be read at run time.

>
> I ask, because I didn't see anything else obvious that would
> trigger this to build BE.

There is no kernel config to switch endianess, it is defined by the
toolchain used. You can see how the arch picks based on compiler
defines e.g. [1], [2].

The compiler defines are gcc specific [3].

[0] - 
http://elixir.free-electrons.com/linux/latest/source/arch/microblaze/Makefile#L26
[1] - 
http://elixir.free-electrons.com/linux/latest/source/arch/microblaze/include/uapi/asm/byteorder.h#L4
[2] - 
http://elixir.free-electrons.com/linux/latest/source/arch/microblaze/lib/libgcc.h#L17
[3] - 
https://github.com/gcc-mirror/gcc/blob/master/gcc/config/microblaze/microblaze-c.c#L45

Regards,
Nathan
-- 
___
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto


Re: [linux-yocto] [kernel-cache][RFC PATCH 0/7] MicroBlaze and Zynq BSP configuration

2017-07-13 Thread Nathan Rossi
On 13 July 2017 at 05:25, Bruce Ashfield <bruce.ashfi...@windriver.com> wrote:
> On 2017-07-04 11:29 AM, Nathan Rossi wrote:
>>
>> Most of this configuration has existed in the meta-xilinx layer for
>> quite some time for use with linux-yocto and Xilinx's vendor tree
>> kernel, linux-xlnx.
>>
>> The goal is to enable the use of the MicroBlaze architecture in OE-Core
>> including the addition of QEMU machines (qemumicroblazeel,
>> qemumicroblazeeb), this relies on having configuration for the BSPs in
>> linux-yocto. This series adds the BSP configs for these machines
>> including both standard and tiny kernel types, as well as fragments for
>> configuring Xilinx Soft IP drivers.
>>
>> Also included are Zynq SoC configuration fragments and a generalised
>> machine config (targeting the SoC for both standard and tiny kernel
>> types).
>>
>> Support for MicroBlaze and Zynq has been available in upstream and
>> linux-yocto for a number of releases. This series does not require any
>> patching of the kernel source to enable any functionality of the target
>> BSPs and is purely kernel configuration.
>>
>> Additionally included in this series is a fragment for debug purposes
>> that enables the kernels DEBUG_DYNAMIC feature.
>>
>
> These are really clean, and self documenting. I wouldn't have a problem
> carrying these along with the main kernel-cache branches.
>
> I don't have the h/w .. so obviously you'd control all the updates (and
> any necessary fixes) that weren't clear to me (i.e. options that have
> disappeared, or dependency issues, I can handle).

With the qemumicroblaze* targets in the future once all changes have
been applied to oe-core you should be able to test them with just qemu
if needed.

But I am good to keep a look out on changes to the linux-yocto kernel
and test/validate for these configs.

>
> I had one question about the BE machine, but that is mostly for my
> information only.
>
> I'll queue these up for my 4.10 and master branch (which is now 4.12+
> for linux-yocto-dev).

I had not yet tested these with 4.10 (which is reason why RFC), though
just tested against v4.10/-dev and all looks good.

However there are some minor changes that are needed for 4.12 as these
cfgs were targeting 4.11 and earlier. I will send a follow up patch
once sorted to handle the 4.12 differences.

Thanks,
Nathan
-- 
___
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto


[linux-yocto] [kernel-cache][RFC PATCH 7/7] features/debug/debug-dyndbg: Add feature to enable dynamic debug

2017-07-04 Thread Nathan Rossi
Add a feature to enable the kernel DYNAMIC_DEBUG config which allows for
dynamic printing of debug messages. Kernel debug messages are normally
not enabled in the kernel unless manually defining DEBUG in code files.
Dynamic debug allows for the messages to be embedded but toggled
dynamically during run time (via boot parameters or from a sysfs
interface).

Enabling this option is useful when debugging multiple parts of the
kernel as well as to allow for enabling of debug messages without
needing to modify the source.

Signed-off-by: Nathan Rossi <nat...@nathanrossi.com>
---
 features/debug/debug-dyndbg.cfg | 1 +
 features/debug/debug-dyndbg.scc | 4 
 2 files changed, 5 insertions(+)
 create mode 100644 features/debug/debug-dyndbg.cfg
 create mode 100644 features/debug/debug-dyndbg.scc

diff --git a/features/debug/debug-dyndbg.cfg b/features/debug/debug-dyndbg.cfg
new file mode 100644
index 00..5698f5ebf6
--- /dev/null
+++ b/features/debug/debug-dyndbg.cfg
@@ -0,0 +1 @@
+CONFIG_DYNAMIC_DEBUG=y
diff --git a/features/debug/debug-dyndbg.scc b/features/debug/debug-dyndbg.scc
new file mode 100644
index 00..b48de2d32b
--- /dev/null
+++ b/features/debug/debug-dyndbg.scc
@@ -0,0 +1,4 @@
+define KFEATURE_DESCRIPTION "Enable dynamic debug printk"
+define KFEATURE_COMPATIBILITY all
+
+kconf non-hardware debug-dyndbg.cfg
-- 
2.13.2

-- 
___
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto


[linux-yocto] [kernel-cache][RFC PATCH 5/7] bsp/qemumicroblazeeb: Add BSP configs for qemumicroblazeeb

2017-07-04 Thread Nathan Rossi
Create configs for the qemumicroblazeeb machine. This includes both
-standard and -tiny configs.

Signed-off-by: Nathan Rossi <nat...@nathanrossi.com>
---
 bsp/qemumicroblaze/qemumicroblazeeb-standard.scc | 15 +++
 bsp/qemumicroblaze/qemumicroblazeeb-tiny.scc | 12 
 bsp/qemumicroblaze/qemumicroblazeeb.cfg  | 15 +++
 3 files changed, 42 insertions(+)
 create mode 100644 bsp/qemumicroblaze/qemumicroblazeeb-standard.scc
 create mode 100644 bsp/qemumicroblaze/qemumicroblazeeb-tiny.scc
 create mode 100644 bsp/qemumicroblaze/qemumicroblazeeb.cfg

diff --git a/bsp/qemumicroblaze/qemumicroblazeeb-standard.scc 
b/bsp/qemumicroblaze/qemumicroblazeeb-standard.scc
new file mode 100644
index 00..ae93b49a11
--- /dev/null
+++ b/bsp/qemumicroblaze/qemumicroblazeeb-standard.scc
@@ -0,0 +1,15 @@
+define KMACHINE qemumicroblazeeb
+define KTYPE standard
+define KARCH microblaze
+
+include ktypes/standard/standard.scc
+
+include arch/microblaze/microblaze.scc
+kconf hardware qemumicroblazeeb.cfg
+
+include bsp/xilinx/soc/drivers-softip.scc
+include bsp/xilinx/board-common.scc
+
+# default policy for standard kernels
+include features/latencytop/latencytop.scc
+include features/profiling/profiling.scc
diff --git a/bsp/qemumicroblaze/qemumicroblazeeb-tiny.scc 
b/bsp/qemumicroblaze/qemumicroblazeeb-tiny.scc
new file mode 100644
index 00..2d1bb74132
--- /dev/null
+++ b/bsp/qemumicroblaze/qemumicroblazeeb-tiny.scc
@@ -0,0 +1,12 @@
+define KMACHINE qemumicroblazeeb
+define KTYPE tiny
+define KARCH microblaze
+
+include ktypes/tiny/tiny.scc
+
+include arch/microblaze/microblaze.scc
+kconf hardware qemumicroblazeeb.cfg
+
+include bsp/xilinx/soc/drivers-softip.scc
+include bsp/xilinx/board-common.scc
+
diff --git a/bsp/qemumicroblaze/qemumicroblazeeb.cfg 
b/bsp/qemumicroblaze/qemumicroblazeeb.cfg
new file mode 100644
index 00..0f635c1652
--- /dev/null
+++ b/bsp/qemumicroblaze/qemumicroblazeeb.cfg
@@ -0,0 +1,15 @@
+
+CONFIG_XILINX_MICROBLAZE0_FAMILY="spartan3"
+
+# CPU ISA Config
+CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR=1
+CONFIG_XILINX_MICROBLAZE0_USE_PCMP_INSTR=1
+CONFIG_XILINX_MICROBLAZE0_USE_BARREL=1
+CONFIG_XILINX_MICROBLAZE0_USE_DIV=0
+CONFIG_XILINX_MICROBLAZE0_USE_HW_MUL=1
+CONFIG_XILINX_MICROBLAZE0_USE_FPU=0
+CONFIG_XILINX_MICROBLAZE0_HW_VER="7.10.d"
+
+# Memory Base Address
+CONFIG_KERNEL_BASE_ADDR=0x9000
+
-- 
2.13.2

-- 
___
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto


[linux-yocto] [kernel-cache][RFC PATCH 6/7] bsp/xilinx/zynq: Add a general purpose KMACHINE for Zynq targets

2017-07-04 Thread Nathan Rossi
Add a general purpose KMACHINE that can be used for general purpose Zynq
BSPs. The main configuration of the Zynq SoC can be configured via
device tree, allowing for a common kernel config. This allows for a
single KMACHINE to target multiple BSPs without needing to be directly
configured for the platform/soc.

This adds configs for -standard and -tiny.

Signed-off-by: Nathan Rossi <nat...@nathanrossi.com>
---
 bsp/xilinx/soc/drivers-zynq.cfg | 75 +
 bsp/xilinx/soc/zynq.cfg | 43 +++
 bsp/xilinx/soc/zynq.scc | 10 ++
 bsp/xilinx/zynq-standard.scc| 15 +
 bsp/xilinx/zynq-tiny.scc|  9 +
 5 files changed, 152 insertions(+)
 create mode 100644 bsp/xilinx/soc/drivers-zynq.cfg
 create mode 100644 bsp/xilinx/soc/zynq.cfg
 create mode 100644 bsp/xilinx/soc/zynq.scc
 create mode 100644 bsp/xilinx/zynq-standard.scc
 create mode 100644 bsp/xilinx/zynq-tiny.scc

diff --git a/bsp/xilinx/soc/drivers-zynq.cfg b/bsp/xilinx/soc/drivers-zynq.cfg
new file mode 100644
index 00..daffe670b3
--- /dev/null
+++ b/bsp/xilinx/soc/drivers-zynq.cfg
@@ -0,0 +1,75 @@
+
+# UART
+CONFIG_TTY=y
+CONFIG_SERIAL_EARLYCON=y
+CONFIG_SERIAL_XILINX_PS_UART=y
+CONFIG_SERIAL_XILINX_PS_UART_CONSOLE=y
+
+# SRAM
+CONFIG_SRAM=y
+
+# EDAC
+CONFIG_EDAC=y
+CONFIG_EDAC_MM_EDAC=y
+CONFIG_EDAC_SYNOPSYS=y
+
+# DMA
+CONFIG_DMADEVICES=y
+CONFIG_PL330_DMA=y
+
+# PL310
+CONFIG_CACHE_L2X0=y
+CONFIG_PL310_ERRATA_588369=y
+CONFIG_PL310_ERRATA_727915=y
+CONFIG_PL310_ERRATA_769419=y
+
+# Watchdog
+CONFIG_WATCHDOG=y
+CONFIG_CADENCE_WATCHDOG=y
+
+# Ethernet
+CONFIG_NET_CADENCE=y
+CONFIG_MACB=y
+
+# GPIO
+CONFIG_GPIO_SYSFS=y
+CONFIG_GPIO_ZYNQ=y
+
+# I2C
+CONFIG_I2C=y
+CONFIG_I2C_CADENCE=y
+
+# SPI
+CONFIG_SPI=y
+CONFIG_SPI_CADENCE=y
+
+# CAN
+CONFIG_CAN=y
+CONFIG_CAN_DEV=y
+CONFIG_CAN_XILINXCAN=y
+
+# MMC/SD
+CONFIG_MMC=y
+CONFIG_MMC_BLOCK=y
+CONFIG_MMC_SDHCI=y
+CONFIG_MMC_SDHCI_PLTFM=y
+CONFIG_MMC_SDHCI_OF_ARASAN=y
+
+# USB
+CONFIG_USB_SUPPORT=y
+CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_CHIPIDEA=y
+CONFIG_USB_CHIPIDEA_UDC=y
+CONFIG_USB_CHIPIDEA_HOST=y
+CONFIG_USB_ULPI=y
+CONFIG_NOP_USB_XCEIV=y
+CONFIG_USB_OTG=y
+CONFIG_USB_GADGET=y
+
+# FPGA
+CONFIG_FPGA=y
+CONFIG_FPGA_MGR_ZYNQ_FPGA=y
+CONFIG_FPGA_REGION=y
+CONFIG_FPGA_BRIDGE=y
+
diff --git a/bsp/xilinx/soc/zynq.cfg b/bsp/xilinx/soc/zynq.cfg
new file mode 100644
index 00..bfc74460fb
--- /dev/null
+++ b/bsp/xilinx/soc/zynq.cfg
@@ -0,0 +1,43 @@
+
+# Arch Feature Selections
+CONFIG_MMU=y
+CONFIG_ARCH_MULTI_V7=y
+CONFIG_ARCH_VEXPRESS=y
+CONFIG_ARCH_ZYNQ=y
+CONFIG_VFP=y
+CONFIG_NEON=y
+CONFIG_AEABI=y
+
+# CPU Erratas
+CONFIG_ARM_ERRATA_754322=y
+CONFIG_ARM_ERRATA_754327=y
+CONFIG_ARM_ERRATA_764369=y
+CONFIG_ARM_ERRATA_775420=y
+
+# SMP
+CONFIG_SMP=y
+CONFIG_ARM_CPU_TOPOLOGY=y
+CONFIG_SCHED_MC=y
+CONFIG_SCHED_SMT=y
+
+# Memory
+CONFIG_HIGHMEM=y
+
+# Thermal
+CONFIG_THERMAL=y
+CONFIG_THERMAL_OF=y
+CONFIG_CPU_THERMAL=y
+
+# CPU Frequency
+CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_STAT=y
+CONFIG_CPU_FREQ_STAT_DETAILS=y
+CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
+CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
+CONFIG_CPU_FREQ_GOV_POWERSAVE=y
+CONFIG_CPU_FREQ_GOV_ONDEMAND=y
+CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
+CONFIG_CPUFREQ_DT=y
+CONFIG_CPU_IDLE=y
+CONFIG_ARM_ZYNQ_CPUIDLE=y
+
diff --git a/bsp/xilinx/soc/zynq.scc b/bsp/xilinx/soc/zynq.scc
new file mode 100644
index 00..9a0e88b903
--- /dev/null
+++ b/bsp/xilinx/soc/zynq.scc
@@ -0,0 +1,10 @@
+define KFEATURE_DESCRIPTION "Xilinx Zynq 7000 SoC"
+define KFEATURE_COMPATIBILITY board
+
+include features/net/net.scc
+include cfg/timer/no_hz.scc
+
+kconf hardware zynq.cfg
+kconf hardware drivers-zynq.cfg
+include bsp/xilinx/soc/drivers-softip.scc
+
diff --git a/bsp/xilinx/zynq-standard.scc b/bsp/xilinx/zynq-standard.scc
new file mode 100644
index 00..b58461ae86
--- /dev/null
+++ b/bsp/xilinx/zynq-standard.scc
@@ -0,0 +1,15 @@
+define KMACHINE zynq
+define KTYPE standard
+define KARCH arm
+
+include ktypes/standard/standard.scc
+
+include bsp/xilinx/soc/zynq.scc
+include bsp/xilinx/board-common.scc
+
+include features/input/input.scc
+include cfg/usb-mass-storage.scc
+
+# default policy for standard kernels
+include features/latencytop/latencytop.scc
+include features/profiling/profiling.scc
diff --git a/bsp/xilinx/zynq-tiny.scc b/bsp/xilinx/zynq-tiny.scc
new file mode 100644
index 00..eeb7db1ebe
--- /dev/null
+++ b/bsp/xilinx/zynq-tiny.scc
@@ -0,0 +1,9 @@
+define KMACHINE zynq
+define KTYPE tiny
+define KARCH arm
+
+include ktypes/tiny/tiny.scc
+
+include bsp/xilinx/soc/zynq.scc
+include bsp/xilinx/board-common.scc
+
-- 
2.13.2

-- 
___
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto


[linux-yocto] [kernel-cache][RFC PATCH 4/7] bsp/qemumicroblazeel: Add BSP configs for qemumicroblazeel

2017-07-04 Thread Nathan Rossi
Create configs for the qemumicroblazeel machine. This includes both
-standard and -tiny configs.

Signed-off-by: Nathan Rossi <nat...@nathanrossi.com>
---
 bsp/qemumicroblaze/qemumicroblazeel-standard.scc | 15 +++
 bsp/qemumicroblaze/qemumicroblazeel-tiny.scc | 12 
 bsp/qemumicroblaze/qemumicroblazeel.cfg  | 15 +++
 3 files changed, 42 insertions(+)
 create mode 100644 bsp/qemumicroblaze/qemumicroblazeel-standard.scc
 create mode 100644 bsp/qemumicroblaze/qemumicroblazeel-tiny.scc
 create mode 100644 bsp/qemumicroblaze/qemumicroblazeel.cfg

diff --git a/bsp/qemumicroblaze/qemumicroblazeel-standard.scc 
b/bsp/qemumicroblaze/qemumicroblazeel-standard.scc
new file mode 100644
index 00..f992d9a5e1
--- /dev/null
+++ b/bsp/qemumicroblaze/qemumicroblazeel-standard.scc
@@ -0,0 +1,15 @@
+define KMACHINE qemumicroblazeel
+define KTYPE standard
+define KARCH microblaze
+
+include ktypes/standard/standard.scc
+
+include arch/microblaze/microblaze.scc
+kconf hardware qemumicroblazeel.cfg
+
+include bsp/xilinx/soc/drivers-softip.scc
+include bsp/xilinx/board-common.scc
+
+# default policy for standard kernels
+include features/latencytop/latencytop.scc
+include features/profiling/profiling.scc
diff --git a/bsp/qemumicroblaze/qemumicroblazeel-tiny.scc 
b/bsp/qemumicroblaze/qemumicroblazeel-tiny.scc
new file mode 100644
index 00..199e62cf7f
--- /dev/null
+++ b/bsp/qemumicroblaze/qemumicroblazeel-tiny.scc
@@ -0,0 +1,12 @@
+define KMACHINE qemumicroblazeel
+define KTYPE tiny
+define KARCH microblaze
+
+include ktypes/tiny/tiny.scc
+include arch/microblaze/microblaze.scc
+
+kconf hardware qemumicroblazeel.cfg
+
+include bsp/xilinx/soc/drivers-softip.scc
+include bsp/xilinx/board-common.scc
+
diff --git a/bsp/qemumicroblaze/qemumicroblazeel.cfg 
b/bsp/qemumicroblaze/qemumicroblazeel.cfg
new file mode 100644
index 00..771aec069c
--- /dev/null
+++ b/bsp/qemumicroblaze/qemumicroblazeel.cfg
@@ -0,0 +1,15 @@
+
+CONFIG_XILINX_MICROBLAZE0_FAMILY="virtex6"
+
+# CPU ISA Config
+CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR=1
+CONFIG_XILINX_MICROBLAZE0_USE_PCMP_INSTR=1
+CONFIG_XILINX_MICROBLAZE0_USE_BARREL=1
+CONFIG_XILINX_MICROBLAZE0_USE_DIV=1
+CONFIG_XILINX_MICROBLAZE0_USE_HW_MUL=2
+CONFIG_XILINX_MICROBLAZE0_USE_FPU=1
+CONFIG_XILINX_MICROBLAZE0_HW_VER="8.50.a"
+
+# Memory Base Address
+CONFIG_KERNEL_BASE_ADDR=0x5000
+
-- 
2.13.2

-- 
___
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto


[linux-yocto] [kernel-cache][RFC PATCH 3/7] bsp/xilinx/soc/drivers: Add Xilinx Soft IP drivers fragment

2017-07-04 Thread Nathan Rossi
Add a fragment to enable drivers for Xilinx Soft IP (FPGA devices) which
are used in a number of BSPs including custom MicroBlaze designs.

This fragment has two .cfg files, one is specific to MicroBlaze (kernel
configs have dependency on CONFIG_MICROBLAZE).

Signed-off-by: Nathan Rossi <nat...@nathanrossi.com>
---
 bsp/xilinx/soc/drivers-softip-microblaze.cfg |  8 +
 bsp/xilinx/soc/drivers-softip.cfg| 45 
 bsp/xilinx/soc/drivers-softip.scc| 12 
 3 files changed, 65 insertions(+)
 create mode 100644 bsp/xilinx/soc/drivers-softip-microblaze.cfg
 create mode 100644 bsp/xilinx/soc/drivers-softip.cfg
 create mode 100644 bsp/xilinx/soc/drivers-softip.scc

diff --git a/bsp/xilinx/soc/drivers-softip-microblaze.cfg 
b/bsp/xilinx/soc/drivers-softip-microblaze.cfg
new file mode 100644
index 00..f671f7d516
--- /dev/null
+++ b/bsp/xilinx/soc/drivers-softip-microblaze.cfg
@@ -0,0 +1,8 @@
+# MicroBlaze only Xilinx Soft IP drivers
+
+# Xilinx SYSACE
+CONFIG_XILINX_SYSACE=y
+
+# Xilinx HW-ICAP
+CONFIG_XILINX_HWICAP=y
+
diff --git a/bsp/xilinx/soc/drivers-softip.cfg 
b/bsp/xilinx/soc/drivers-softip.cfg
new file mode 100644
index 00..5098d9b2b9
--- /dev/null
+++ b/bsp/xilinx/soc/drivers-softip.cfg
@@ -0,0 +1,45 @@
+# Serial/UART
+CONFIG_TTY=y
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_UARTLITE=y
+CONFIG_SERIAL_UARTLITE_CONSOLE=y
+CONFIG_SERIAL_OF_PLATFORM=y
+
+# DMA
+CONFIG_DMADEVICES=y
+CONFIG_XILINX_DMA=y
+CONFIG_XILINX_VDMA=y
+
+# Watchdog
+CONFIG_WATCHDOG=y
+CONFIG_XILINX_WATCHDOG=y
+
+# Ethernet
+CONFIG_NET_VENDOR_XILINX=y
+CONFIG_XILINX_EMACLITE=y
+CONFIG_XILINX_AXI_EMAC=y
+
+# GPIO
+CONFIG_GPIOLIB=y
+CONFIG_OF_GPIO=y
+CONFIG_GPIO_SYSFS=y
+CONFIG_GPIO_XILINX=y
+
+# I2C
+CONFIG_I2C=y
+CONFIG_I2C_XILINX=y
+
+# SPI
+CONFIG_SPI=y
+CONFIG_SPI_XILINX=y
+
+# Xilinx XADC
+CONFIG_IIO=y
+CONFIG_XILINX_XADC=y
+
+# Xilinx AXI USB2 Device
+CONFIG_USB_SUPPORT=y
+CONFIG_USB_GADGET=y
+CONFIG_USB_GADGET_XILINX=y
+
diff --git a/bsp/xilinx/soc/drivers-softip.scc 
b/bsp/xilinx/soc/drivers-softip.scc
new file mode 100644
index 00..cd6475650f
--- /dev/null
+++ b/bsp/xilinx/soc/drivers-softip.scc
@@ -0,0 +1,12 @@
+define KFEATURE_DESCRIPTION "Xilinx Soft IP Core Drivers"
+define KFEATURE_COMPATIBILITY board
+
+include features/net/net.scc
+
+kconf hardware drivers-softip.cfg
+
+# MicroBlaze only Soft IP drivers
+if [ "$KARCH" = "microblaze" ]; then
+   kconf hardware drivers-softip-microblaze.cfg
+fi
+
-- 
2.13.2

-- 
___
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto


[linux-yocto] [kernel-cache][RFC PATCH 2/7] bsp/xilinx/board-common: Add Xilinx common board fragment for BSPs

2017-07-04 Thread Nathan Rossi
Add a config fragment that enables commonly used configs for Xilinx
boards and systems. This includes a number of board level devices (e.g.
I2C, MTD, Ethernet PHYs, etc.)

Signed-off-by: Nathan Rossi <nat...@nathanrossi.com>
---
 bsp/xilinx/board-common.cfg | 71 +
 bsp/xilinx/board-common.scc |  7 +
 2 files changed, 78 insertions(+)
 create mode 100644 bsp/xilinx/board-common.cfg
 create mode 100644 bsp/xilinx/board-common.scc

diff --git a/bsp/xilinx/board-common.cfg b/bsp/xilinx/board-common.cfg
new file mode 100644
index 00..935f8ff7bf
--- /dev/null
+++ b/bsp/xilinx/board-common.cfg
@@ -0,0 +1,71 @@
+# Common Board Drivers
+
+# Ethernet PHYs
+CONFIG_PHYLIB=y
+CONFIG_AMD_PHY=y
+CONFIG_AT803X_PHY=y
+CONFIG_BCM7XXX_PHY=y
+CONFIG_BCM87XX_PHY=y
+CONFIG_BROADCOM_PHY=y
+CONFIG_CICADA_PHY=y
+CONFIG_DAVICOM_PHY=y
+CONFIG_DP83867_PHY=y
+CONFIG_FIXED_PHY=y
+CONFIG_ICPLUS_PHY=y
+CONFIG_LSI_ET1011C_PHY=y
+CONFIG_LXT_PHY=y
+CONFIG_MARVELL_PHY=y
+CONFIG_MICREL_PHY=y
+CONFIG_NATIONAL_PHY=y
+CONFIG_QSEMI_PHY=y
+CONFIG_REALTEK_PHY=y
+CONFIG_SMSC_PHY=y
+CONFIG_VITESSE_PHY=y
+
+# I2C
+CONFIG_I2C=y
+CONFIG_I2C_CHARDEV=y
+CONFIG_I2C_MUX=y
+CONFIG_I2C_MUX_PCA954x=y
+CONFIG_I2C_MUX_PCA9541=y
+CONFIG_GPIO_PCA953X=y
+CONFIG_GPIO_PCA953X_IRQ=y
+
+# EEPROM
+CONFIG_EEPROM_AT24=y
+CONFIG_EEPROM_AT25=y
+
+# MTD
+CONFIG_MTD=y
+CONFIG_MTD_SPI_NOR=y
+# CONFIG_MTD_SPI_NOR_USE_4K_SECTORS is not set
+CONFIG_MTD_M25P80=y
+CONFIG_MTD_CFI=y
+CONFIG_MTD_CFI_AMDSTD=y
+
+# Hardware monitors
+CONFIG_HWMON=y
+CONFIG_PMBUS=y
+CONFIG_SENSORS_PMBUS=y
+# Power
+CONFIG_SENSORS_UCD9000=y
+CONFIG_SENSORS_UCD9200=y
+CONFIG_SENSORS_INA2XX=y
+CONFIG_SENSORS_MAX20751=y
+
+# Regulators
+CONFIG_REGULATOR=y
+CONFIG_REGULATOR_GPIO=y
+CONFIG_REGULATOR_FIXED_VOLTAGE=y
+
+# Reset/power-off GPIO
+CONFIG_POWER_RESET=y
+CONFIG_POWER_RESET_LTC2952=y
+
+# RTC drivers
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_DRV_PCF8563=y
+
+# SI570 I2C Device
+CONFIG_COMMON_CLK_SI570=y
+
diff --git a/bsp/xilinx/board-common.scc b/bsp/xilinx/board-common.scc
new file mode 100644
index 00..589b1dab7b
--- /dev/null
+++ b/bsp/xilinx/board-common.scc
@@ -0,0 +1,7 @@
+define KFEATURE_DESCRIPTION "Devices/drivers commonly used on Xilinx 
systems/boards"
+define KFEATURE_COMPATIBILITY board
+
+kconf hardware board-common.cfg
+
+include features/leds/leds.scc
+
-- 
2.13.2

-- 
___
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto


[linux-yocto] [kernel-cache][RFC PATCH 1/7] arch/microblaze: Add config fragments for the MicroBlaze architecture

2017-07-04 Thread Nathan Rossi
Add the baseline configuration for the MicroBlaze architecture. This
only enables two configs, and sets up the default tick as 100 hz.

MicroBlaze is available in the mainline kernel and requires no
additional patches.

Signed-off-by: Nathan Rossi <nat...@nathanrossi.com>
---
 arch/microblaze/microblaze.cfg | 18 ++
 arch/microblaze/microblaze.scc |  6 ++
 2 files changed, 24 insertions(+)
 create mode 100644 arch/microblaze/microblaze.cfg
 create mode 100644 arch/microblaze/microblaze.scc

diff --git a/arch/microblaze/microblaze.cfg b/arch/microblaze/microblaze.cfg
new file mode 100644
index 00..c4dd6bf58c
--- /dev/null
+++ b/arch/microblaze/microblaze.cfg
@@ -0,0 +1,18 @@
+
+CONFIG_MICROBLAZE=y
+
+# Memory
+CONFIG_MMU=y
+CONFIG_HIGHMEM=y
+
+# Default Arch Configuration
+CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR=1
+CONFIG_XILINX_MICROBLAZE0_USE_PCMP_INSTR=1
+CONFIG_XILINX_MICROBLAZE0_USE_BARREL=1
+CONFIG_XILINX_MICROBLAZE0_USE_DIV=0
+CONFIG_XILINX_MICROBLAZE0_USE_HW_MUL=0
+CONFIG_XILINX_MICROBLAZE0_USE_FPU=0
+
+# Disable FTRACE, does not work with MicroBlaze
+# CONFIG_FTRACE is not set
+
diff --git a/arch/microblaze/microblaze.scc b/arch/microblaze/microblaze.scc
new file mode 100644
index 00..2b3aba2c08
--- /dev/null
+++ b/arch/microblaze/microblaze.scc
@@ -0,0 +1,6 @@
+
+if [ "$KARCH" = "microblaze" ]; then
+   kconf hardware microblaze.cfg
+   include cfg/timer/hz_100.scc
+fi
+
-- 
2.13.2

-- 
___
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto


[linux-yocto] [kernel-cache][RFC PATCH 0/7] MicroBlaze and Zynq BSP configuration

2017-07-04 Thread Nathan Rossi
Most of this configuration has existed in the meta-xilinx layer for
quite some time for use with linux-yocto and Xilinx's vendor tree
kernel, linux-xlnx.

The goal is to enable the use of the MicroBlaze architecture in OE-Core
including the addition of QEMU machines (qemumicroblazeel,
qemumicroblazeeb), this relies on having configuration for the BSPs in
linux-yocto. This series adds the BSP configs for these machines
including both standard and tiny kernel types, as well as fragments for
configuring Xilinx Soft IP drivers.

Also included are Zynq SoC configuration fragments and a generalised
machine config (targeting the SoC for both standard and tiny kernel
types).

Support for MicroBlaze and Zynq has been available in upstream and
linux-yocto for a number of releases. This series does not require any
patching of the kernel source to enable any functionality of the target
BSPs and is purely kernel configuration.

Additionally included in this series is a fragment for debug purposes
that enables the kernels DEBUG_DYNAMIC feature.

Nathan Rossi (7):
  arch/microblaze: Add config fragments for the MicroBlaze architecture
  bsp/xilinx/board-common: Add Xilinx common board fragment for BSPs
  bsp/xilinx/soc/drivers: Add Xilinx Soft IP drivers fragment
  bsp/qemumicroblazeel: Add BSP configs for qemumicroblazeel
  bsp/qemumicroblazeeb: Add BSP configs for qemumicroblazeeb
  bsp/xilinx/zynq: Add a general purpose KMACHINE for Zynq targets
  features/debug/debug-dyndbg: Add feature to enable dynamic debug

 arch/microblaze/microblaze.cfg   | 18 ++
 arch/microblaze/microblaze.scc   |  6 ++
 bsp/qemumicroblaze/qemumicroblazeeb-standard.scc | 15 +
 bsp/qemumicroblaze/qemumicroblazeeb-tiny.scc | 12 
 bsp/qemumicroblaze/qemumicroblazeeb.cfg  | 15 +
 bsp/qemumicroblaze/qemumicroblazeel-standard.scc | 15 +
 bsp/qemumicroblaze/qemumicroblazeel-tiny.scc | 12 
 bsp/qemumicroblaze/qemumicroblazeel.cfg  | 15 +
 bsp/xilinx/board-common.cfg  | 71 ++
 bsp/xilinx/board-common.scc  |  7 +++
 bsp/xilinx/soc/drivers-softip-microblaze.cfg |  8 +++
 bsp/xilinx/soc/drivers-softip.cfg| 45 ++
 bsp/xilinx/soc/drivers-softip.scc| 12 
 bsp/xilinx/soc/drivers-zynq.cfg  | 75 
 bsp/xilinx/soc/zynq.cfg  | 43 ++
 bsp/xilinx/soc/zynq.scc  | 10 
 bsp/xilinx/zynq-standard.scc | 15 +
 bsp/xilinx/zynq-tiny.scc |  9 +++
 features/debug/debug-dyndbg.cfg  |  1 +
 features/debug/debug-dyndbg.scc  |  4 ++
 20 files changed, 408 insertions(+)
 create mode 100644 arch/microblaze/microblaze.cfg
 create mode 100644 arch/microblaze/microblaze.scc
 create mode 100644 bsp/qemumicroblaze/qemumicroblazeeb-standard.scc
 create mode 100644 bsp/qemumicroblaze/qemumicroblazeeb-tiny.scc
 create mode 100644 bsp/qemumicroblaze/qemumicroblazeeb.cfg
 create mode 100644 bsp/qemumicroblaze/qemumicroblazeel-standard.scc
 create mode 100644 bsp/qemumicroblaze/qemumicroblazeel-tiny.scc
 create mode 100644 bsp/qemumicroblaze/qemumicroblazeel.cfg
 create mode 100644 bsp/xilinx/board-common.cfg
 create mode 100644 bsp/xilinx/board-common.scc
 create mode 100644 bsp/xilinx/soc/drivers-softip-microblaze.cfg
 create mode 100644 bsp/xilinx/soc/drivers-softip.cfg
 create mode 100644 bsp/xilinx/soc/drivers-softip.scc
 create mode 100644 bsp/xilinx/soc/drivers-zynq.cfg
 create mode 100644 bsp/xilinx/soc/zynq.cfg
 create mode 100644 bsp/xilinx/soc/zynq.scc
 create mode 100644 bsp/xilinx/zynq-standard.scc
 create mode 100644 bsp/xilinx/zynq-tiny.scc
 create mode 100644 features/debug/debug-dyndbg.cfg
 create mode 100644 features/debug/debug-dyndbg.scc

-- 
2.13.2
-- 
___
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto