Commit 23403d8d authored by Oleg Dzhimiev's avatar Oleg Dzhimiev

merged with jethro branch

parent 4012e57f
This diff is collapsed.
This diff is collapsed.
......@@ -297,7 +297,7 @@
wp-inverted;
} ;
ps7_slcr_0: ps7-slcr@f8000000 {
compatible = "xlnx,ps7-slcr-1.00.a", "xlnx,zynq-slcr";
compatible = "xlnx,ps7-slcr-1.00.a", "xlnx,zynq-slcr","syscon","simple-bus";
reg = <0xf8000000 0x1000>;
clocks {
#address-cells = <1>;
......
......@@ -258,7 +258,7 @@
wp-inverted;
} ;
ps7_slcr_0: ps7-slcr@f8000000 {
compatible = "xlnx,ps7-slcr-1.00.a", "xlnx,zynq-slcr";
compatible = "xlnx,ps7-slcr-1.00.a", "xlnx,zynq-slcr", "syscon", "simple-bus";
reg = <0xf8000000 0x1000>;
clocks {
#address-cells = <1>;
......
......@@ -332,7 +332,7 @@
xlnx,has-wp = <0x1>;
} ;
ps7_slcr_0: ps7-slcr@f8000000 {
compatible = "xlnx,ps7-slcr-1.00.a", "xlnx,zynq-slcr";
compatible = "xlnx,ps7-slcr-1.00.a", "xlnx,zynq-slcr", "syscon", "somple-bus";
reg = <0xf8000000 0x1000>;
clocks {
#address-cells = <1>;
......
......@@ -255,7 +255,7 @@
xlnx,has-wp = <0x1>;
} ;
ps7_slcr_0: ps7-slcr@f8000000 {
compatible = "xlnx,ps7-slcr-1.00.a", "xlnx,zynq-slcr";
compatible = "xlnx,ps7-slcr-1.00.a", "xlnx,zynq-slcr", "syscon", "simple-bus";
reg = <0xf8000000 0x1000>;
clocks {
#address-cells = <1>;
......
......@@ -7,8 +7,8 @@ require include/tune-zynq.inc
require include/machine-xilinx-default.inc
# Corresponding from linux-xlnx and ezynq-u-boot
PREFERRED_VERSION_ezynq-u-boot = "v2013.01%"
PREFERRED_VERSION_linux-xlnx = "3.10%"
PREFERRED_VERSION_ezynq-u-boot = "v2016.01%"
PREFERRED_VERSION_linux-xlnx = "4.%"
# Zedboard machine definition known by ezynq and xilinx u-boot
UBOOT_MACHINE = "elphel393_config"
......@@ -16,4 +16,4 @@ UBOOT_MACHINE = "elphel393_config"
SERIAL_CONSOLE = "115200 ttyPS0"
MACHINE_DEVICETREE := "elphel393/elphel393.dts"
MACHINE_KCONFIG := "common/elphel393_defconfig_${LINUX_VERSION}.cfg"
\ No newline at end of file
MACHINE_KCONFIG := "common/elphel393_defconfig_${LINUX_VERSION}"
\ No newline at end of file
......@@ -7,9 +7,11 @@ IMAGE_CLASSES += "image_types_uboot"
# Kernel Configuration
PREFERRED_PROVIDER_virtual/kernel ?= "linux-xlnx"
PREFERRED_VERSION_linux-xlnx ?= "3.10%"
PREFERRED_VERSION_linux-xlnx ?= "4.%"
# U-Boot Configuration
PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-ezynq"
PREFERRED_PROVIDER_u-boot ?= "u-boot-ezynq"
PREFERRED_VERSION_u-boot-ezynq ?= "v2013.0%"
PREFERRED_VERSION_u-boot-ezynq ?= "v2016.0%"
MACHINE_ESSENTIAL_EXTRA_RDEPENDS_append_zynq += "device-tree"
\ No newline at end of file
DEFAULTTUNE ?= "zynq"
DEFAULTTUNE ?= "cortexa9-neon"
SOC_FAMILY ?= "zynq"
require conf/machine/include/tune-cortexa9.inc
require conf/machine/include/soc-family.inc
TUNEVALID[zynq] = "Zynq"
AVAILTUNES += "zynq"
TUNE_FEATURES_tune-zynq += "${TUNE_FEATURES_tune-armv7a-neon} zynq"
ARMPKGARCH = "${ARMPKGARCH_tune-armv7a-neon}"
PACKAGE_EXTRA_ARCHS_tune-zynq = "${PACKAGE_EXTRA_ARCHS_tune-armv7a-neon} zynq"
# Linux Configuration
KERNEL_IMAGETYPE ?= "uImage"
......@@ -19,4 +12,4 @@ KERNEL_IMAGETYPE ?= "uImage"
KERNEL_EXTRA_ARGS_zynq += "UIMAGE_LOADADDR=0x8000"
# linux-yocto KMACHINE
KMACHINE ?= "zynq-default"
\ No newline at end of file
KMACHINE ?= "zynq"
\ No newline at end of file
......@@ -6,12 +6,19 @@
require include/tune-zynq.inc
require include/machine-xilinx-default.inc
# Corresponding from linux-xlnx and ezynq-u-boot
PREFERRED_VERSION_ezynq-u-boot = "v2016.01%"
PREFERRED_VERSION_linux-xlnx = "4.%"
# microzed machine definition known by ezynq and probably xilinx u-boot
UBOOT_MACHINE = "zynq_microzed_config"
SERIAL_CONSOLE = "115200 ttyPS0"
MACHINE_DEVICETREE := "microzed/microzed.dtsi microzed/microzed.dts"
#KERNEL_DEVICETREE := "${MACHINE_DEVICETREE}"
#Copy of zedboard's defconfig
MACHINE_KCONFIG := "common/microzed_defconfig_${LINUX_VERSION}.cfg"
MACHINE_KCONFIG := "common/microzed_defconfig_${LINUX_VERSION}"
IMAGE_BOOT_FILES += "boot.bin ${MACHINE}.dtb"
\ No newline at end of file
......@@ -8,7 +8,7 @@ require include/machine-xilinx-default.inc
# Corresponding from linux-xlnx and ezynq-u-boot
PREFERRED_VERSION_ezynq-u-boot = "v2013.01%"
PREFERRED_VERSION_linux-xlnx = "3.10%"
PREFERRED_VERSION_linux-xlnx = "4.%"
# ZC706 machine definition known by ezynq and xilinx u-boot
UBOOT_MACHINE = "zynq_zc706_config"
......
......@@ -7,8 +7,8 @@ require include/tune-zynq.inc
require include/machine-xilinx-default.inc
# Corresponding from linux-xlnx and ezynq-u-boot
PREFERRED_VERSION_ezynq-u-boot = "v2013.01%"
PREFERRED_VERSION_linux-xlnx = "3.10%"
PREFERRED_VERSION_ezynq-u-boot = "v2016.01%"
PREFERRED_VERSION_linux-xlnx = "4.%"
# Zedboard machine definition known by ezynq and xilinx u-boot
UBOOT_MACHINE = "zynq_zed_config"
......
Index: git/drivers/Kconfig
===================================================================
--- git.orig/drivers/Kconfig 2013-12-19 21:21:09.941007583 -0700
+++ git/drivers/Kconfig 2013-12-20 22:33:10.105948560 -0700
@@ -170,4 +170,6 @@
diff -Naur a/drivers/Kconfig b/drivers/Kconfig
--- a/drivers/Kconfig 2016-01-25 18:31:43.309779723 -0700
+++ b/drivers/Kconfig 2016-01-25 18:48:17.521798388 -0700
@@ -182,4 +182,6 @@
source "drivers/reset/Kconfig"
source "drivers/android/Kconfig"
+source "drivers/elphel/Kconfig"
+
endmenu
Index: git/drivers/Makefile
===================================================================
--- git.orig/drivers/Makefile 2013-12-19 21:21:09.941007583 -0700
+++ git/drivers/Makefile 2013-12-20 22:32:20.929948050 -0700
@@ -156,3 +156,6 @@
obj-y += xilinx_common/
obj-$(CONFIG_PMODS) += pmods/
diff -Naur a/drivers/Makefile b/drivers/Makefile
--- a/drivers/Makefile 2016-01-25 18:31:43.309779723 -0700
+++ b/drivers/Makefile 2016-01-25 18:50:39.545801055 -0700
@@ -165,3 +165,6 @@
obj-$(CONFIG_THUNDERBOLT) += thunderbolt/
obj-$(CONFIG_CORESIGHT) += coresight/
obj-$(CONFIG_ANDROID) += android/
+
+obj-$(CONFIG_ELPHEL393) += elphel/
+obj-$(CONFIG_ELPHELDRVONMICROZED) += elphel/
Index: git/drivers/misc/Kconfig
===================================================================
--- git.orig/drivers/misc/Kconfig 2013-12-19 20:54:51.004991205 -0700
+++ git/drivers/misc/Kconfig 2013-12-19 21:01:22.152995262 -0700
@@ -517,6 +517,13 @@
To compile this driver as a module, choose M here: the module
will be called si570
diff -Naur a/drivers/clk/Kconfig b/drivers/clk/Kconfig
--- a/drivers/clk/Kconfig 2016-01-25 18:31:43.413779725 -0700
+++ b/drivers/clk/Kconfig 2016-01-25 19:09:12.833821955 -0700
@@ -59,6 +59,16 @@
clocked at 32KHz each. Clkout1 is always on, Clkout2 can off
by control register.
+config SI5338
+config COMMON_CLK_SI5338
+ tristate "Support Silicon Laboratories SI5338 Quad Clock Generator"
+ depends on I2C
+ select REGMAP_I2C
+ select RATIONAL
+ help
+ Say Y here if you have a SI5338 Quad Clock Generator IC on the I2C bus.
+ To compile this driver as a module, choose M here: the
+ module will be called si5338.
+ Say Y here if you have a SI5338 Quad Clock Generator IC on the I2C bus.
+ To compile this driver as a module, choose M here: the
+ module will be called si5338.
+
config LATTICE_ECP3_CONFIG
tristate "Lattice ECP3 FPGA bitstream configuration via SPI"
depends on SPI && SYSFS
@@ -537,6 +544,20 @@
the genalloc API. It is supposed to be used for small on-chip SRAM
areas found on many SoCs.
config COMMON_CLK_SI5351
tristate "Clock driver for SiLabs 5351A/B/C"
depends on I2C
diff -Naur a/drivers/clk/Makefile b/drivers/clk/Makefile
--- a/drivers/clk/Makefile 2016-01-25 18:31:43.413779725 -0700
+++ b/drivers/clk/Makefile 2016-01-25 19:09:46.217822582 -0700
@@ -35,6 +35,7 @@
obj-$(CONFIG_CLK_QORIQ) += clk-qoriq.o
obj-$(CONFIG_COMMON_CLK_RK808) += clk-rk808.o
obj-$(CONFIG_COMMON_CLK_S2MPS11) += clk-s2mps11.o
+obj-$(CONFIG_COMMON_CLK_SI5338) += clk-si5338.o
obj-$(CONFIG_COMMON_CLK_SI5351) += clk-si5351.o
obj-$(CONFIG_COMMON_CLK_SI570) += clk-si570.o
obj-$(CONFIG_CLK_TWL6040) += clk-twl6040.o
diff -Naur a/drivers/misc/Kconfig b/drivers/misc/Kconfig
--- a/drivers/misc/Kconfig 2016-01-25 18:31:44.121779739 -0700
+++ b/drivers/misc/Kconfig 2016-01-25 19:10:54.185823858 -0700
@@ -515,6 +515,13 @@
bus. System Configuration interface is one of the possible means
of generating transactions on this bus.
+config VSC330X
+ tristate "Support VSC330X crosspoint switch"
+ help
+ Say Y here if you have a VSC30X crosspoint switch IC on the I2C bus.
+ To compile this driver as a module, choose M here: the
+ module will be called vsc330x.
+
+config LTC3589
+ tristate "Support LTC3589 voltage regulator"
+ help
+ Say Y here if you have a LTC3589 voltage regulator IC on the I2C bus.
+ To compile this driver as a module, choose M here: the
+ module will be called ltc3589.
+ Say Y here if you have a VSC30X crosspoint switch IC on the I2C bus.
+ To compile this driver as a module, choose M here: the
+ module will be called vsc330x.
+
config XILINX_TRAFGEN
tristate "Xilinx Traffic Generator"
depends on MICROBLAZE
Index: git/drivers/misc/Makefile
===================================================================
--- git.orig/drivers/misc/Makefile 2013-12-19 20:54:51.004991205 -0700
+++ git/drivers/misc/Makefile 2013-12-19 20:59:33.976994140 -0700
@@ -51,7 +51,11 @@
obj-$(CONFIG_ALTERA_STAPL) +=altera-stapl/
obj-$(CONFIG_INTEL_MEI) += mei/
obj-$(CONFIG_SI570) += si570.o
+obj-$(CONFIG_SI5338) += si5338.o
depends on MICROBLAZE || ARCH_ZYNQ
diff -Naur a/drivers/misc/Makefile b/drivers/misc/Makefile
--- a/drivers/misc/Makefile 2016-01-25 18:31:44.121779739 -0700
+++ b/drivers/misc/Makefile 2016-01-25 19:11:41.453824745 -0700
@@ -51,6 +51,7 @@
obj-$(CONFIG_VMWARE_VMCI) += vmw_vmci/
obj-$(CONFIG_LATTICE_ECP3_CONFIG) += lattice-ecp3-config.o
obj-$(CONFIG_SRAM) += sram.o
+obj-$(CONFIG_VSC330X) += vsc330x.o
obj-$(CONFIG_XILINX_TRAFGEN) += xilinx_trafgen.o
+obj-$(CONFIG_VSC330X) += vsc330x.o
+obj-$(CONFIG_LTC3589) += ltc3589.o
+
obj-$(CONFIG_XILINX_JESD204B) += jesd204b/
obj-y += mic/
Index: git/drivers/net/ethernet/xilinx/xilinx_emacps.c
===================================================================
--- git.orig/drivers/net/ethernet/xilinx/xilinx_emacps.c 2013-11-23 16:44:54.262025863 -0700
+++ git/drivers/net/ethernet/xilinx/xilinx_emacps.c 2013-11-23 00:04:25.000000000 -0700
@@ -468,6 +468,11 @@
second */
diff -Naur a/drivers/net/ethernet/xilinx/xilinx_emacps.c b/drivers/net/ethernet/xilinx/xilinx_emacps.c
--- a/drivers/net/ethernet/xilinx/xilinx_emacps.c 2016-01-25 18:34:24.065782741 -0700
+++ b/drivers/net/ethernet/xilinx/xilinx_emacps.c 2016-01-25 19:03:50.781815909 -0700
@@ -479,6 +479,10 @@
#define XEMACPS_PTP_CC_MULT (1 << 31)
#endif
+/* Elphel */
+#define AT803X_PHY_ID 0x004dd072 /*Particular one, AR8035 but we'll use a broad mask */
+#define AT803X_PHY_ID_MASK 0xffffffe0
+
+#define AT803X_PHY_ID 0x004dd072 /*Particular one, AR8035 but we'll use a broad mask */
+#define AT803X_PHY_ID_MASK 0xffffffe0
+
#define xemacps_read(base, reg) \
__raw_readl(((void __iomem *)(base)) + (reg))
readl_relaxed(((void __iomem *)(base)) + (reg))
#define xemacps_write(base, reg, val) \
@@ -566,9 +571,18 @@
static int xemacps_mdio_read(struct mii_bus *bus, int mii_id, int phyreg)
{
struct net_local *lp = bus->priv;
- u32 regval;
+ u32 regval,oldregval;
int value;
volatile u32 ipisr;
+ /* check/wait for idle */
+ if ((xemacps_read(lp->baseaddr, XEMACPS_NWSR_OFFSET) &
+ XEMACPS_NWSR_MDIOIDLE_MASK)==0){
+ oldregval = xemacps_read(lp->baseaddr, XEMACPS_PHYMNTNC_OFFSET);
+ dev_warn(&lp->pdev->dev," ********* %s:%d Should not happen (add spinlock if it does) - MDIO is NOT IDLE, shift register value=0x%08x\n",
+ __func__,__LINE__,(int) value);
+ while ((xemacps_read(lp->baseaddr, XEMACPS_NWSR_OFFSET) &
+ XEMACPS_NWSR_MDIOIDLE_MASK)==0); /* just wait */
+ }
regval = XEMACPS_PHYMNTNC_OP_MASK;
regval |= XEMACPS_PHYMNTNC_OP_R_MASK;
@@ -606,8 +620,17 @@
u16 value)
{
struct net_local *lp = bus->priv;
- u32 regval;
+ u32 regval,oldregval;
volatile u32 ipisr;
+ /* check/wait for idle */
+ if ((xemacps_read(lp->baseaddr, XEMACPS_NWSR_OFFSET) &
+ XEMACPS_NWSR_MDIOIDLE_MASK)==0){
+ oldregval = xemacps_read(lp->baseaddr, XEMACPS_PHYMNTNC_OFFSET);
+ dev_warn(&lp->pdev->dev," ********* %s:%d Should not happen (add spinlock if it does) - MDIO is NOT IDLE, shift register value=0x%08x\n",
+ __func__,__LINE__,(int) value);
+ while ((xemacps_read(lp->baseaddr, XEMACPS_NWSR_OFFSET) &
+ XEMACPS_NWSR_MDIOIDLE_MASK)==0); /* just wait */
+ }
regval = XEMACPS_PHYMNTNC_OP_MASK;
regval |= XEMACPS_PHYMNTNC_OP_W_MASK;
@@ -738,6 +761,50 @@
}
@@ -871,6 +875,49 @@
return 0;
}
+/* http://www.spinics.net/lists/devicetree/msg06322.html */
......@@ -65,8 +24,8 @@ Index: git/drivers/net/ethernet/xilinx/xilinx_emacps.c
+ dev_dbg(&lp->pdev->dev,"fixup start");
+
+ /* Ar803x phy SmartEEE feature cause link status generates glitch,
+ * which cause ethernet link down/up issue, so disable SmartEEE
+ */
+ * which cause ethernet link down/up issue, so disable SmartEEE
+ */
+ phy_write(dev, 0xd, 0x3);
+ phy_write(dev, 0xe, 0x805d);
+ phy_write(dev, 0xd, 0x4003);
......@@ -100,16 +59,15 @@ Index: git/drivers/net/ethernet/xilinx/xilinx_emacps.c
+ return 0;
+}
+
+
static int xemacps_clk_notifier_cb(struct notifier_block *nb, unsigned long
event, void *data)
{
@@ -840,7 +907,7 @@
struct resource res;
/**
* xemacps_mii_init - Initialize and register mii bus to network device
* @lp: local device instance pointer
@@ -883,6 +930,8 @@
struct device_node *np = of_get_parent(lp->phy_node);
struct device_node *npp;
-
+ phy_register_fixup_for_uid(AT803X_PHY_ID, AT803X_PHY_ID_MASK, ar8035_phy_fixup);
lp->mii_bus = mdiobus_alloc();
if (lp->mii_bus == NULL) {
rc = -ENOMEM;
+ phy_register_fixup_for_uid(AT803X_PHY_ID, AT803X_PHY_ID_MASK, ar8035_phy_fixup);
+
lp->mii_bus = of_mdio_find_bus(np);
if (!lp->has_mdio && lp->mii_bus)
return 0;
diff --git a/drivers/mtd/nand/xilinx_nandps.c b/drivers/mtd/nand/xilinx_nandps.c
index bf660d4..775c168 100644
--- a/drivers/mtd/nand/xilinx_nandps.c
+++ b/drivers/mtd/nand/xilinx_nandps.c
@@ -115,6 +115,9 @@ static const struct xnandps_command_format xnandps_commands[] = {
diff -Naur a/drivers/mtd/nand/pl35x_nand.c b/drivers/mtd/nand/pl35x_nand.c
--- a/drivers/mtd/nand/pl35x_nand.c 2016-01-25 18:34:24.065782741 -0700
+++ b/drivers/mtd/nand/pl35x_nand.c 2016-01-25 18:55:51.945806920 -0700
@@ -117,6 +117,9 @@
{NAND_CMD_PARAM, NAND_CMD_NONE, 1, NAND_CMD_NONE},
{NAND_CMD_GET_FEATURES, NAND_CMD_NONE, 1, NAND_CMD_NONE},
{NAND_CMD_SET_FEATURES, NAND_CMD_NONE, 1, NAND_CMD_NONE},
......@@ -11,4 +10,4 @@ index bf660d4..775c168 100644
+ {NAND_CMD_LOCK, NAND_CMD_NONE, 0, NAND_CMD_NONE},
{NAND_CMD_NONE, NAND_CMD_NONE, 0, 0},
/* Add all the flash commands supported by the flash device and Linux */
/* The cache program command is not supported by driver because driver
/*
......@@ -5,23 +5,22 @@ SRC_URI_append += " file://xilinx_emacps.c.patch"
SRC_URI_append += " file://si5338_vsc330x.patch"
SRC_URI_append += " file://drivers-elphel.patch"
# Kernel version and SRCREV correspond to:
# github.com/Xilinx/linux-xlnx.git xilinx-v14.7 tag
SRCREV = "efc27505715e64526653f35274717c0fc56491e3"
linux-elphel_label= "git://github.com/Elphel/linux-elphel.git"
linux-elphel_branch= "master"
linux-elphel_gitdir= "${WORKDIR}/linux-elphel"
# To use the latest leave: "" - (=empty)
linux-elphel_srcrev= ""
#linux-elphel_srcrev= "0ca36687a400fd9a5c4510295ae5be88aac77fa4"
#
DEV_DIR ?= "${TOPDIR}/../linux-elphel"
# set output for Eclipse project setup parser:
#EXTRA_OEMAKE += "-s -w -j1 -B KCFLAGS='-v'"
EXTRA_OEMAKE += "-s -w -j1 -B KCFLAGS='-v'"
# or use a variable:
#export _MAKEFLAGS="-s -w -j1 -B KCFLAGS='-v'"
#export BB_ENV_EXTRAWHITE="$BB_ENV_EXTRAWHITE _MAKEFLAGS"
export _MAKEFLAGS="-s -w -j1 -B KCFLAGS='-v'"
export BB_ENV_EXTRAWHITE="$BB_ENV_EXTRAWHITE _MAKEFLAGS"
EXTRA_OEMAKE = "${_MAKEFLAGS}"
do_fetch_append() {
......@@ -33,7 +32,7 @@ do_fetch_append() {
os.system("cd ${linux-elphel_gitdir};git checkout ${linux-elphel_srcrev}")
}
do_unpack_append() {
python do_link() {
if os.path.isdir("${DEV_DIR}"):
print("DEV_DIR exists - creating links...")
devdir_abspath = os.path.abspath("${DEV_DIR}/src")
......@@ -47,10 +46,12 @@ do_unpack_append() {
file_abspath = os.path.abspath(os.path.join(path, filename))
file_relpath = file_abspath.replace(devdir_abspath+"/", '')
os.system("cd ${S};ln -s "+file_abspath+" "+file_relpath)
os.system("cd ${DEV_DIR}; ln -sf ${S} linux")
os.system("cd ${DEV_DIR}; ln -sf ${TOPDIR}/tmp/sysroots sysroots")
os.system("cd ${DEV_DIR}; ln -sf ${S} linux")
os.system("cd ${DEV_DIR}; ln -sf ${TOPDIR}/tmp/sysroots sysroots")
else:
print("Copying ${linux-elphel_gitdir}/src/ over ${S}\n")
os.system("cp -rfv ${linux-elphel_gitdir}/src/* ${S}")
}
addtask do_link before do_kernel_configme after do_patch
diff --git a/libmysqld/Makefile.am b/libmysqld/Makefile.am
index 7a2c92e..eee501e 100644
--- a/libmysqld/Makefile.am
+++ b/libmysqld/Makefile.am
@@ -92,7 +92,7 @@ INC_LIB= $(top_builddir)/regex/libregex.la \
@ndbcluster_libs@ @NDB_SCI_LIBS@ \
@mysql_embedded_plugin_libs@ \
$(libevent_inc_libs) \
- $(yassl_inc_libs)
+ $(yassl_inc_libs) @LIBDL@
if HAVE_YASSL
yassl_inc_libs= $(top_builddir)/extra/yassl/src/libyassl.la \
# Copied the patch to fix building in Ubuntu 13.10
# link: http://lists.openembedded.org/pipermail/openembedded-devel/2013-December/093379.html
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
SRC_URI_append += "file://fix-link-error-ub1310.patch "
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment