mirror of
https://github.com/Telecominfraproject/OpenNetworkLinux.git
synced 2025-12-25 17:27:01 +00:00
The 3.18.25 kernel for ARM64 is no longer in user. All ARM64 platforms have moved to 4.9 LTS.
This commit is contained in:
4
packages/base/any/kernels/3.18.25/.gitignore
vendored
4
packages/base/any/kernels/3.18.25/.gitignore
vendored
@@ -1,4 +0,0 @@
|
||||
linux-3.18.25
|
||||
linux-3.18.25-mbuild
|
||||
linux-3.18.25-dtbs
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
kernel-*
|
||||
@@ -1,28 +0,0 @@
|
||||
############################################################
|
||||
#
|
||||
# Default 3.18.25 configuration for arm64 platforms.
|
||||
#
|
||||
############################################################
|
||||
THIS_DIR := $(abspath $(dir $(lastword $(MAKEFILE_LIST))))
|
||||
include $(ONL)/make/config.mk
|
||||
|
||||
ifndef K_TARGET_DIR
|
||||
K_TARGET_DIR := $(THIS_DIR)
|
||||
endif
|
||||
|
||||
MODSYNCLIST_EXTRA = arch/arm64/include arch/arm64/Makefile arch/arm64/lib
|
||||
K_PATCH_SERIES=series.arm64
|
||||
|
||||
include ../../kconfig.mk
|
||||
K_CONFIG := arm64-all.config
|
||||
K_BUILD_TARGET := Image Image.gz arm64-nxp-ls2080ardb-r0.dtb arm64-nxp-ls2088ardb-r1.dtb
|
||||
K_COPY_SRC := arch/arm64/boot/Image
|
||||
K_COPY_GZIP := 1
|
||||
ifndef K_COPY_DST
|
||||
K_COPY_DST := kernel-3.18.25-arm64-all.bin.gz
|
||||
endif
|
||||
|
||||
export ARCH=arm64
|
||||
DTS_LIST := arm64-nxp-ls2080ardb-r0
|
||||
|
||||
include $(ONL)/make/kbuild.mk
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1 +0,0 @@
|
||||
kernel-3.18-x86_64-all
|
||||
@@ -1,42 +0,0 @@
|
||||
############################################################
|
||||
# <bsn.cl fy=2015 v=onl>
|
||||
#
|
||||
# Copyright 2015 Big Switch Networks, Inc.
|
||||
#
|
||||
# Licensed under the Eclipse Public License, Version 1.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.eclipse.org/legal/epl-v10.html
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
|
||||
# either express or implied. See the License for the specific
|
||||
# language governing permissions and limitations under the
|
||||
# License.
|
||||
#
|
||||
# </bsn.cl>
|
||||
############################################################
|
||||
#
|
||||
# Default 3.18.25 configuration for x86_64 platforms.
|
||||
#
|
||||
############################################################
|
||||
THIS_DIR := $(abspath $(dir $(lastword $(MAKEFILE_LIST))))
|
||||
include $(ONL)/make/config.mk
|
||||
|
||||
export ARCH := x86_64
|
||||
ifndef K_TARGET_DIR
|
||||
K_TARGET_DIR := $(THIS_DIR)
|
||||
endif
|
||||
|
||||
include ../../kconfig.mk
|
||||
K_CONFIG := x86_64-all.config
|
||||
K_BUILD_TARGET := bzImage
|
||||
K_COPY_SRC := arch/x86/boot/bzImage
|
||||
ifndef K_COPY_DST
|
||||
K_COPY_DST := kernel-3.18-x86_64-all
|
||||
endif
|
||||
|
||||
include $(ONL)/make/kbuild.mk
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
31
packages/base/any/kernels/3.18.25/kconfig.mk
vendored
31
packages/base/any/kernels/3.18.25/kconfig.mk
vendored
@@ -1,31 +0,0 @@
|
||||
############################################################
|
||||
# <bsn.cl fy=2015 v=onl>
|
||||
#
|
||||
# Copyright 2015 Big Switch Networks, Inc.
|
||||
#
|
||||
# Licensed under the Eclipse Public License, Version 1.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.eclipse.org/legal/epl-v10.html
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
|
||||
# either express or implied. See the License for the specific
|
||||
# language governing permissions and limitations under the
|
||||
# License.
|
||||
#
|
||||
# </bsn.cl>
|
||||
############################################################
|
||||
#
|
||||
# 3.18.25 Kernel Builds
|
||||
#
|
||||
############################################################
|
||||
THIS_DIR := $(abspath $(dir $(lastword $(MAKEFILE_LIST))))
|
||||
K_MAJOR_VERSION := 3
|
||||
K_PATCH_LEVEL := 18
|
||||
K_SUB_LEVEL := 25
|
||||
K_SUFFIX :=
|
||||
K_PATCH_DIR := $(THIS_DIR)/patches
|
||||
K_ARCHIVE_URL := http://opennetlinux.org/tarballs/linux-3.18.25.tar.xz
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
33877
packages/base/any/kernels/3.18.25/patches/aufs.patch
vendored
33877
packages/base/any/kernels/3.18.25/patches/aufs.patch
vendored
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,67 +0,0 @@
|
||||
diff --git a/drivers/net/ethernet/intel/igb/e1000_82575.c b/drivers/net/ethernet/intel/igb/e1000_82575.c
|
||||
index 051ea94..2a04baa 100644
|
||||
--- a/drivers/net/ethernet/intel/igb/e1000_82575.c
|
||||
+++ b/drivers/net/ethernet/intel/igb/e1000_82575.c
|
||||
@@ -286,6 +286,9 @@ static s32 igb_init_phy_params_82575(struct e1000_hw *hw)
|
||||
phy->ops.set_d3_lplu_state = igb_set_d3_lplu_state_82580;
|
||||
phy->ops.force_speed_duplex = igb_phy_force_speed_duplex_m88;
|
||||
break;
|
||||
+ case BCM54616_E_PHY_ID:
|
||||
+ phy->type = e1000_phy_bcm54616;
|
||||
+ break;
|
||||
default:
|
||||
ret_val = -E1000_ERR_PHY;
|
||||
goto out;
|
||||
@@ -1550,6 +1553,7 @@ static s32 igb_setup_copper_link_82575(struct e1000_hw *hw)
|
||||
case e1000_i350:
|
||||
case e1000_i210:
|
||||
case e1000_i211:
|
||||
+ case e1000_i354:
|
||||
phpm_reg = rd32(E1000_82580_PHY_POWER_MGMT);
|
||||
phpm_reg &= ~E1000_82580_PM_GO_LINKD;
|
||||
wr32(E1000_82580_PHY_POWER_MGMT, phpm_reg);
|
||||
@@ -1593,6 +1597,8 @@ static s32 igb_setup_copper_link_82575(struct e1000_hw *hw)
|
||||
case e1000_phy_82580:
|
||||
ret_val = igb_copper_link_setup_82580(hw);
|
||||
break;
|
||||
+ case e1000_phy_bcm54616:
|
||||
+ break;
|
||||
default:
|
||||
ret_val = -E1000_ERR_PHY;
|
||||
break;
|
||||
diff --git a/drivers/net/ethernet/intel/igb/e1000_defines.h b/drivers/net/ethernet/intel/igb/e1000_defines.h
|
||||
index 217f813..5322fbf 100644
|
||||
--- a/drivers/net/ethernet/intel/igb/e1000_defines.h
|
||||
+++ b/drivers/net/ethernet/intel/igb/e1000_defines.h
|
||||
@@ -860,6 +860,7 @@
|
||||
#define M88_VENDOR 0x0141
|
||||
#define I210_I_PHY_ID 0x01410C00
|
||||
#define M88E1543_E_PHY_ID 0x01410EA0
|
||||
+#define BCM54616_E_PHY_ID 0x3625D10
|
||||
|
||||
/* M88E1000 Specific Registers */
|
||||
#define M88E1000_PHY_SPEC_CTRL 0x10 /* PHY Specific Control Register */
|
||||
diff --git a/drivers/net/ethernet/intel/igb/e1000_hw.h b/drivers/net/ethernet/intel/igb/e1000_hw.h
|
||||
index 2003b37..d82c96b 100644
|
||||
--- a/drivers/net/ethernet/intel/igb/e1000_hw.h
|
||||
+++ b/drivers/net/ethernet/intel/igb/e1000_hw.h
|
||||
@@ -128,6 +128,7 @@ enum e1000_phy_type {
|
||||
e1000_phy_ife,
|
||||
e1000_phy_82580,
|
||||
e1000_phy_i210,
|
||||
+ e1000_phy_bcm54616,
|
||||
};
|
||||
|
||||
enum e1000_bus_type {
|
||||
diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
|
||||
index e0f3664..013c1f1 100644
|
||||
--- a/drivers/net/ethernet/intel/igb/igb_main.c
|
||||
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
|
||||
@@ -108,6 +108,7 @@ static const struct pci_device_id igb_pci_tbl[] = {
|
||||
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82575EB_COPPER), board_82575 },
|
||||
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82575EB_FIBER_SERDES), board_82575 },
|
||||
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82575GB_QUAD_COPPER), board_82575 },
|
||||
+ { PCI_VDEVICE(INTEL, E1000_DEV_ID_I354_SGMII), board_82575 },
|
||||
/* required last entry */
|
||||
{0, }
|
||||
};
|
||||
@@ -1,327 +0,0 @@
|
||||
diff -uNr a/drivers/soc/fsl/Kconfig.arm b/drivers/soc/fsl/Kconfig.arm
|
||||
--- a/drivers/soc/fsl/Kconfig.arm 2017-06-05 17:37:14.530348991 +0530
|
||||
+++ b/drivers/soc/fsl/Kconfig.arm 2017-06-05 17:32:18.630348990 +0530
|
||||
@@ -23,3 +23,7 @@
|
||||
if LS1_SOC_DRIVERS
|
||||
source "drivers/soc/fsl/ls1/Kconfig"
|
||||
endif
|
||||
+
|
||||
+if LS_SOC_DRIVERS
|
||||
+ source "drivers/soc/fsl/ls2-console/Kconfig"
|
||||
+endif
|
||||
diff -uNr a/drivers/soc/fsl/ls2-console/Kconfig b/drivers/soc/fsl/ls2-console/Kconfig
|
||||
--- a/drivers/soc/fsl/ls2-console/Kconfig 1970-01-01 05:30:00.000000000 +0530
|
||||
+++ b/drivers/soc/fsl/ls2-console/Kconfig 2017-06-05 17:32:52.582348990 +0530
|
||||
@@ -0,0 +1,4 @@
|
||||
+config FSL_LS2_CONSOLE
|
||||
+ tristate "Layerscape MC and AIOP console support"
|
||||
+ depends on ARCH_LAYERSCAPE
|
||||
+ default y
|
||||
diff -uNr a/drivers/soc/fsl/ls2-console/ls2-console.c b/drivers/soc/fsl/ls2-console/ls2-console.c
|
||||
--- a/drivers/soc/fsl/ls2-console/ls2-console.c 1970-01-01 05:30:00.000000000 +0530
|
||||
+++ b/drivers/soc/fsl/ls2-console/ls2-console.c 2017-06-05 17:50:42.494348990 +0530
|
||||
@@ -0,0 +1,291 @@
|
||||
+/* Copyright 2015-2016 Freescale Semiconductor Inc.
|
||||
+ *
|
||||
+ * Redistribution and use in source and binary forms, with or without
|
||||
+ * modification, are permitted provided that the following conditions are met:
|
||||
+ * * Redistributions of source code must retain the above copyright
|
||||
+ * notice, this list of conditions and the following disclaimer.
|
||||
+ * * Redistributions in binary form must reproduce the above copyright
|
||||
+ * notice, this list of conditions and the following disclaimer in the
|
||||
+ * documentation and/or other materials provided with the distribution.
|
||||
+ * * Neither the name of the above-listed copyright holders nor the
|
||||
+ * names of any contributors may be used to endorse or promote products
|
||||
+ * derived from this software without specific prior written permission.
|
||||
+ *
|
||||
+ *
|
||||
+ * ALTERNATIVELY, this software may be distributed under the terms of the
|
||||
+ * GNU General Public License ("GPL") as published by the Free Software
|
||||
+ * Foundation, either version 2 of that License or (at your option) any
|
||||
+ * later version.
|
||||
+ *
|
||||
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
|
||||
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
+ * POSSIBILITY OF SUCH DAMAGE.
|
||||
+ */
|
||||
+
|
||||
+#include <linux/miscdevice.h>
|
||||
+#include <linux/uaccess.h>
|
||||
+#include <linux/poll.h>
|
||||
+#include <linux/compat.h>
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/slab.h>
|
||||
+#include <linux/io.h>
|
||||
+
|
||||
+/* SoC address for the MC firmware base low/high registers */
|
||||
+#define SOC_CCSR_MC_FW_BASE_ADDR_REGS 0x8340020
|
||||
+#define SOC_CCSR_MC_FW_BASE_ADDR_REGS_SIZE 2
|
||||
+/* MC firmware base low/high registers indexes */
|
||||
+#define MCFBALR_OFFSET 0
|
||||
+#define MCFBAHR_OFFSET 1
|
||||
+
|
||||
+/* Bit mask used to obtain the most significant part of the MC base address */
|
||||
+#define MC_FW_HIGH_ADDR_MASK 0x1FFFF
|
||||
+/* Bit mask used to obtain the least significant part of the MC base address */
|
||||
+#define MC_FW_LOW_ADDR_MASK 0xE0000000
|
||||
+
|
||||
+#define MC_BUFFER_OFFSET 0x01000000
|
||||
+#define MC_BUFFER_SIZE (1024*1024*16)
|
||||
+#define MC_OFFSET_DELTA (MC_BUFFER_OFFSET)
|
||||
+
|
||||
+#define AIOP_BUFFER_OFFSET 0x06000000
|
||||
+#define AIOP_BUFFER_SIZE (1024*1024*16)
|
||||
+#define AIOP_OFFSET_DELTA (0)
|
||||
+
|
||||
+struct log_header {
|
||||
+ char magic_word[8]; /* magic word */
|
||||
+ uint32_t buf_start; /* holds the 32-bit little-endian
|
||||
+ offset of the start of the buffer */
|
||||
+ uint32_t buf_length; /* holds the 32-bit little-endian
|
||||
+ length of the buffer */
|
||||
+ uint32_t last_byte; /* holds the 32-bit little-endian offset
|
||||
+ of the byte after the last byte that was written */
|
||||
+ char reserved[44];
|
||||
+};
|
||||
+
|
||||
+#define LOG_HEADER_FLAG_BUFFER_WRAPAROUND 0x80000000
|
||||
+#define LOG_VERSION_MAJOR 1
|
||||
+#define LOG_VERSION_MINOR 0
|
||||
+
|
||||
+
|
||||
+#define invalidate(p) { asm volatile("dc ivac, %0" : : "r" (p) : "memory"); }
|
||||
+
|
||||
+struct console_data {
|
||||
+ char *map_addr;
|
||||
+ struct log_header *hdr;
|
||||
+ char *start_addr; /* Start of buffer */
|
||||
+ char *end_addr; /* End of buffer */
|
||||
+ char *end_of_data; /* Current end of data */
|
||||
+ char *cur_ptr; /* Last data sent to console */
|
||||
+};
|
||||
+
|
||||
+#define LAST_BYTE(a) ((a) & ~(LOG_HEADER_FLAG_BUFFER_WRAPAROUND))
|
||||
+
|
||||
+static inline void __adjust_end(struct console_data *cd)
|
||||
+{
|
||||
+ cd->end_of_data = cd->start_addr
|
||||
+ + LAST_BYTE(le32_to_cpu(cd->hdr->last_byte));
|
||||
+}
|
||||
+
|
||||
+static inline void adjust_end(struct console_data *cd)
|
||||
+{
|
||||
+ invalidate(cd->hdr);
|
||||
+ __adjust_end(cd);
|
||||
+}
|
||||
+
|
||||
+static inline uint64_t get_mc_fw_base_address(void) {
|
||||
+ uint32_t* mcfbaregs = (uint32_t*) ioremap(SOC_CCSR_MC_FW_BASE_ADDR_REGS,
|
||||
+ SOC_CCSR_MC_FW_BASE_ADDR_REGS_SIZE);
|
||||
+ uint64_t mcfwbase = 0ULL;
|
||||
+ mcfwbase = readl(mcfbaregs + MCFBAHR_OFFSET) & MC_FW_HIGH_ADDR_MASK;
|
||||
+ mcfwbase <<= 32;
|
||||
+ mcfwbase |= readl(mcfbaregs + MCFBALR_OFFSET) & MC_FW_LOW_ADDR_MASK;
|
||||
+ iounmap(mcfbaregs);
|
||||
+ pr_info("fsl-ls2-console: MC base address at 0x%016llx\n", mcfwbase);
|
||||
+ return mcfwbase;
|
||||
+}
|
||||
+
|
||||
+static int fsl_ls2_generic_console_open(struct inode *node, struct file *fp,
|
||||
+ u64 offset, u64 size,
|
||||
+ uint8_t *emagic, uint8_t magic_len,
|
||||
+ u32 offset_delta)
|
||||
+{
|
||||
+ struct console_data *cd;
|
||||
+ uint8_t *magic;
|
||||
+ uint32_t wrapped;
|
||||
+
|
||||
+ cd = kmalloc(sizeof(*cd), GFP_KERNEL);
|
||||
+ if (cd == NULL)
|
||||
+ return -ENOMEM;
|
||||
+ fp->private_data = cd;
|
||||
+ cd->map_addr = ioremap(get_mc_fw_base_address() + offset, size);
|
||||
+
|
||||
+ cd->hdr = (struct log_header *) cd->map_addr;
|
||||
+ invalidate(cd->hdr);
|
||||
+
|
||||
+ magic = cd->hdr->magic_word;
|
||||
+ if (memcmp(magic, emagic, magic_len)) {
|
||||
+ pr_info("magic didn't match!\n");
|
||||
+ pr_info("expected: %02x %02x %02x %02x %02x %02x %02x %02x\n",
|
||||
+ emagic[0], emagic[1], emagic[2], emagic[3],
|
||||
+ emagic[4], emagic[5], emagic[6], emagic[7]);
|
||||
+ pr_info(" seen: %02x %02x %02x %02x %02x %02x %02x %02x\n",
|
||||
+ magic[0], magic[1], magic[2], magic[3],
|
||||
+ magic[4], magic[5], magic[6], magic[7]);
|
||||
+ kfree(cd);
|
||||
+ iounmap(cd->map_addr);
|
||||
+ return -EIO;
|
||||
+ }
|
||||
+
|
||||
+ cd->start_addr = cd->map_addr
|
||||
+ + le32_to_cpu(cd->hdr->buf_start) - offset_delta;
|
||||
+ cd->end_addr = cd->start_addr + le32_to_cpu(cd->hdr->buf_length);
|
||||
+
|
||||
+ wrapped = le32_to_cpu(cd->hdr->last_byte)
|
||||
+ & LOG_HEADER_FLAG_BUFFER_WRAPAROUND;
|
||||
+
|
||||
+ __adjust_end(cd);
|
||||
+ if (wrapped && (cd->end_of_data != cd->end_addr))
|
||||
+ cd->cur_ptr = cd->end_of_data+1;
|
||||
+ else
|
||||
+ cd->cur_ptr = cd->start_addr;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int fsl_ls2_mc_console_open(struct inode *node, struct file *fp)
|
||||
+{
|
||||
+ uint8_t magic_word[] = { 0, 1, 'C', 'M' };
|
||||
+
|
||||
+ return fsl_ls2_generic_console_open(node, fp,
|
||||
+ MC_BUFFER_OFFSET, MC_BUFFER_SIZE,
|
||||
+ magic_word, sizeof(magic_word),
|
||||
+ MC_OFFSET_DELTA);
|
||||
+}
|
||||
+
|
||||
+static int fsl_ls2_aiop_console_open(struct inode *node, struct file *fp)
|
||||
+{
|
||||
+ uint8_t magic_word[] = { 'P', 'O', 'I', 'A' };
|
||||
+
|
||||
+ return fsl_ls2_generic_console_open(node, fp,
|
||||
+ AIOP_BUFFER_OFFSET, AIOP_BUFFER_SIZE,
|
||||
+ magic_word, sizeof(magic_word),
|
||||
+ AIOP_OFFSET_DELTA);
|
||||
+}
|
||||
+
|
||||
+static int fsl_ls2_console_close(struct inode *node, struct file *fp)
|
||||
+{
|
||||
+ struct console_data *cd = fp->private_data;
|
||||
+
|
||||
+ iounmap(cd->map_addr);
|
||||
+ kfree(cd);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+ssize_t fsl_ls2_console_read(struct file *fp, char __user *buf, size_t count,
|
||||
+ loff_t *f_pos)
|
||||
+{
|
||||
+ struct console_data *cd = fp->private_data;
|
||||
+ size_t bytes = 0;
|
||||
+ char data;
|
||||
+
|
||||
+ /* Check if we need to adjust the end of data addr */
|
||||
+ adjust_end(cd);
|
||||
+
|
||||
+ while ((count != bytes) && (cd->end_of_data != cd->cur_ptr)) {
|
||||
+ if (((u64)cd->cur_ptr) % 64 == 0)
|
||||
+ invalidate(cd->cur_ptr);
|
||||
+
|
||||
+ data = *(cd->cur_ptr);
|
||||
+ if (copy_to_user(&buf[bytes], &data, 1))
|
||||
+ return -EFAULT;
|
||||
+ cd->cur_ptr++;
|
||||
+ if (cd->cur_ptr >= cd->end_addr)
|
||||
+ cd->cur_ptr = cd->start_addr;
|
||||
+ ++bytes;
|
||||
+ }
|
||||
+ return bytes;
|
||||
+}
|
||||
+
|
||||
+static const struct file_operations fsl_ls2_mc_console_fops = {
|
||||
+ .owner = THIS_MODULE,
|
||||
+ .open = fsl_ls2_mc_console_open,
|
||||
+ .release = fsl_ls2_console_close,
|
||||
+ .read = fsl_ls2_console_read,
|
||||
+};
|
||||
+
|
||||
+static struct miscdevice fsl_ls2_mc_console_dev = {
|
||||
+ .minor = MISC_DYNAMIC_MINOR,
|
||||
+ .name = "fsl_mc_console",
|
||||
+ .fops = &fsl_ls2_mc_console_fops
|
||||
+};
|
||||
+
|
||||
+static const struct file_operations fsl_ls2_aiop_console_fops = {
|
||||
+ .owner = THIS_MODULE,
|
||||
+ .open = fsl_ls2_aiop_console_open,
|
||||
+ .release = fsl_ls2_console_close,
|
||||
+ .read = fsl_ls2_console_read,
|
||||
+};
|
||||
+
|
||||
+static struct miscdevice fsl_ls2_aiop_console_dev = {
|
||||
+ .minor = MISC_DYNAMIC_MINOR,
|
||||
+ .name = "fsl_aiop_console",
|
||||
+ .fops = &fsl_ls2_aiop_console_fops
|
||||
+};
|
||||
+
|
||||
+static int __init fsl_ls2_console_init(void)
|
||||
+{
|
||||
+ int err = 0;
|
||||
+
|
||||
+ pr_info("Freescale LS2 console driver\n");
|
||||
+ err = misc_register(&fsl_ls2_mc_console_dev);
|
||||
+ if (err) {
|
||||
+ pr_err("fsl_mc_console: cannot register device\n");
|
||||
+ return err;
|
||||
+ }
|
||||
+ pr_info("fsl-ls2-console: device %s registered\n",
|
||||
+ fsl_ls2_mc_console_dev.name);
|
||||
+
|
||||
+ err = misc_register(&fsl_ls2_aiop_console_dev);
|
||||
+ if (err) {
|
||||
+ pr_err("fsl_aiop_console: cannot register device\n");
|
||||
+ return err;
|
||||
+ }
|
||||
+ pr_info("fsl-ls2-console: device %s registered\n",
|
||||
+ fsl_ls2_aiop_console_dev.name);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static void __exit fsl_ls2_console_exit(void)
|
||||
+{
|
||||
+ int err = misc_deregister(&fsl_ls2_mc_console_dev);
|
||||
+
|
||||
+ if (err)
|
||||
+ pr_err("Failed to deregister device %s code %d\n",
|
||||
+ fsl_ls2_mc_console_dev.name, err);
|
||||
+ else
|
||||
+ pr_info("device %s deregistered\n",
|
||||
+ fsl_ls2_mc_console_dev.name);
|
||||
+
|
||||
+ err = misc_deregister(&fsl_ls2_aiop_console_dev);
|
||||
+ if (err)
|
||||
+ pr_err("Failed to deregister device %s code %d\n",
|
||||
+ fsl_ls2_aiop_console_dev.name, err);
|
||||
+ else
|
||||
+ pr_info("device %s deregistered\n",
|
||||
+ fsl_ls2_aiop_console_dev.name);
|
||||
+}
|
||||
+
|
||||
+module_init(fsl_ls2_console_init);
|
||||
+module_exit(fsl_ls2_console_exit);
|
||||
+
|
||||
+MODULE_AUTHOR("Roy Pledge <roy.pledge@freescale.com>");
|
||||
+MODULE_LICENSE("Dual BSD/GPL");
|
||||
+MODULE_DESCRIPTION("Freescale LS2 console driver");
|
||||
diff -uNr a/drivers/soc/fsl/ls2-console/Makefile b/drivers/soc/fsl/ls2-console/Makefile
|
||||
--- a/drivers/soc/fsl/ls2-console/Makefile 1970-01-01 05:30:00.000000000 +0530
|
||||
+++ b/drivers/soc/fsl/ls2-console/Makefile 2017-06-05 17:32:52.582348990 +0530
|
||||
@@ -0,0 +1 @@
|
||||
+obj-$(CONFIG_FSL_LS2_CONSOLE) += ls2-console.o
|
||||
diff -uNr a/drivers/soc/fsl/Makefile b/drivers/soc/fsl/Makefile
|
||||
--- a/drivers/soc/fsl/Makefile 2017-06-05 17:37:14.530348991 +0530
|
||||
+++ b/drivers/soc/fsl/Makefile 2017-06-05 17:33:54.022348991 +0530
|
||||
@@ -4,3 +4,4 @@
|
||||
|
||||
obj-$(CONFIG_LS1_SOC_DRIVERS) += ls1/
|
||||
obj-$(CONFIG_FSL_GUTS) += guts.o
|
||||
+obj-$(CONFIG_LS_SOC_DRIVERS) += ls2-console/
|
||||
@@ -1,3 +0,0 @@
|
||||
aufs.patch
|
||||
driver-support-intel-igb-bcm54616-phy.patch
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
0001-Patch-set-for-booting-ls2088rdb-with-vfio.patch
|
||||
ls2_mc_console.patch
|
||||
Reference in New Issue
Block a user