diff options
42 files changed, 0 insertions, 4864 deletions
diff --git a/meta-steppeeagle/.gitignore b/meta-steppeeagle/.gitignore deleted file mode 100644 index e69de29b..00000000 --- a/meta-steppeeagle/.gitignore +++ /dev/null diff --git a/meta-steppeeagle/COPYING.MIT b/meta-steppeeagle/COPYING.MIT deleted file mode 100644 index 89de3547..00000000 --- a/meta-steppeeagle/COPYING.MIT +++ /dev/null @@ -1,17 +0,0 @@ -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/meta-steppeeagle/README.md b/meta-steppeeagle/README.md deleted file mode 100644 index ff6498fa..00000000 --- a/meta-steppeeagle/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# meta-amd/meta-steppeeagle - -This is the location for AMD Steppe Eagle BSP. - -Please see the README file contained in the root meta-amd directory -for general information and usage details. - -## Dependencies - -This layer depends on: - -[bitbake](https://github.com/openembedded/bitbake) layer, -[oe-core](https://github.com/openembedded/openembedded-core) layer, -[meta-oe](https://github.com/openembedded/meta-openembedded) layer, -[meta-python](https://github.com/openembedded/meta-openembedded/meta-python) layer, -meta-amd/common layer diff --git a/meta-steppeeagle/binary/.gitignore b/meta-steppeeagle/binary/.gitignore deleted file mode 100644 index e69de29b..00000000 --- a/meta-steppeeagle/binary/.gitignore +++ /dev/null diff --git a/meta-steppeeagle/conf/layer.conf b/meta-steppeeagle/conf/layer.conf deleted file mode 100644 index 93c2fadf..00000000 --- a/meta-steppeeagle/conf/layer.conf +++ /dev/null @@ -1,13 +0,0 @@ -# We have a conf and classes directory, add to BBPATH -BBPATH .= ":${LAYERDIR}" - -# We have a recipes-* directories, add to BBFILES -BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ - ${LAYERDIR}/recipes-*/*/*.bbappend" - -BBFILE_COLLECTIONS += "steppeeagle" -BBFILE_PATTERN_steppeeagle = "^${LAYERDIR}/" -BBFILE_PRIORITY_steppeeagle = "14" -LAYERSERIES_COMPAT_steppeeagle = "warrior" - -LAYERDEPENDS_steppeeagle = "amd openembedded-layer meta-python" diff --git a/meta-steppeeagle/conf/local.conf.append.steppeeagle b/meta-steppeeagle/conf/local.conf.append.steppeeagle deleted file mode 100644 index 9ed86ffe..00000000 --- a/meta-steppeeagle/conf/local.conf.append.steppeeagle +++ /dev/null @@ -1,40 +0,0 @@ - -# MEL provides the functionality to build packages with license-restricted -# algorithms or software. Their configuration variables can be set to -# "yes" or "no" in the local.conf file to enable or disable the -# functionality to include them in the build. The option to build these -# packages is NOT enabled in the default configuration. After enabling the -# option to build, when you build your target image, the BitBake utility -# fetches package sources from the canonical upstream location. If you do -# not have an active network connection, your build with these packages -# will fail. -# -# Building packages with license-restricted algorithms or software may add -# proprietary IP or functionality with other restrictions to your output. -# Mentor Graphics has no connection with or responsibility for such -# license-restricted algorithms or software, and failure to abide by the -# relevant license terms may have legal consequences. -# -# Mentor Graphics does not distribute or endorse sources for license- -# restricted algorithms or software, and disclaims any liability for their -# use. - -# Using mpv requires the use of license-restricted algorithms -# or software. -INCLUDE_MPV ??= "no" - -COMMERCIAL_LIC_FLAGS_MPV = "commercial_mpv commercial_ffmpeg commercial_x264" -LICENSE_FLAGS_WHITELIST .= "${@' ${COMMERCIAL_LIC_FLAGS_MPV}' if bb.utils.to_boolean('${INCLUDE_MPV}') else ''}" -CORE_IMAGE_EXTRA_INSTALL .= "${@' mpv' if bb.utils.to_boolean('${INCLUDE_MPV}') else ''}" - -# Certain multimedia formats also require license restricted codecs and -# software components which are not included in MEL build by default. -INCLUDE_COMMERCIAL_MULTIMEDIA ??= "no" - -COMMERCIAL_LIC_FLAGS_MULTIMEDIA = "commercial_gstreamer1.0-plugins-ugly \ - commercial_lame \ - commercial_mpeg2dec \ - commercial_gstreamer1.0-libav \ - commercial_mpg123" -LICENSE_FLAGS_WHITELIST .= "${@' ${COMMERCIAL_LIC_FLAGS_MULTIMEDIA}' if bb.utils.to_boolean('${INCLUDE_COMMERCIAL_MULTIMEDIA}') else ''}" -CORE_IMAGE_EXTRA_INSTALL .= "${@' packagegroup-multimedia-risky' if bb.utils.to_boolean('${INCLUDE_COMMERCIAL_MULTIMEDIA}') else ''}" diff --git a/meta-steppeeagle/conf/machine/include/tune-steppeeagle.inc b/meta-steppeeagle/conf/machine/include/tune-steppeeagle.inc deleted file mode 100644 index 21fecbb1..00000000 --- a/meta-steppeeagle/conf/machine/include/tune-steppeeagle.inc +++ /dev/null @@ -1,16 +0,0 @@ -DEFAULTTUNE ?= "dbft3b" - -require conf/machine/include/x86/arch-x86.inc -require conf/machine/include/x86-base.inc - -# AMD DB-FT3b 64bit (SteppeEagle) -TUNEVALID[dbft3b] = "Enable AMD DB-FT3b (64 bit) specific processor optimizations" -TUNECONFLICTS[dbft3b] = "m32 mx32" -TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "dbft3b", " -march=btver2", "", d)}" - -# Extra tune selections -AVAILTUNES += "dbft3b" -TUNE_FEATURES_tune-dbft3b = "m64 dbft3b" -BASE_LIB_tune-dbft3b = "lib64" -TUNE_PKGARCH_tune-dbft3b = "dbft3b" -PACKAGE_EXTRA_ARCHS_tune-dbft3b = "${TUNE_PKGARCH_tune-dbft3b}" diff --git a/meta-steppeeagle/conf/machine/steppeeagle.conf b/meta-steppeeagle/conf/machine/steppeeagle.conf deleted file mode 100644 index d6fdab1b..00000000 --- a/meta-steppeeagle/conf/machine/steppeeagle.conf +++ /dev/null @@ -1,37 +0,0 @@ -#@TYPE: Machine -#@NAME: steppeeagle - -#@DESCRIPTION: Machine configuration for steppeeagle systems - -PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto" - -require conf/machine/include/tune-steppeeagle.inc - -include conf/machine/include/amd-common-configurations.inc -include conf/machine/include/amd-customer-configurations.inc - -XSERVER_X86_GPU = "xf86-video-amd \ - ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'mesa-driver-radeon', '', d)}" - -XSERVER ?= "${XSERVER_X86_BASE} \ - ${XSERVER_X86_EXT} \ - ${XSERVER_X86_FBDEV} \ - ${XSERVER_X86_MODESETTING} \ - ${XSERVER_X86_GPU} \ - " - -MACHINE_EXTRA_RRECOMMENDS += "radeon-firmware" -MACHINE_EXTRA_RRECOMMENDS += "amd-gpio" - -# Setup a gettys on all serial ports -SERIAL_CONSOLES = "115200;ttyUSB0" - -# Make sure the kernel messages go to the VGA console and to the serial ports. -KERNEL_SERIAL_CONSOLE = "console=ttyUSB0,115200n8" - -APPEND += "radeon.dpm=1" - -MACHINEOVERRIDES =. "amd:amdx86:radeon:" - -# Metadata used by CodeBench for the ADE -ADE_CB_CPU = "general.cpu.puma" diff --git a/meta-steppeeagle/recipes-applications/gpio-test/files/gpio-test.c b/meta-steppeeagle/recipes-applications/gpio-test/files/gpio-test.c deleted file mode 100644 index 9fc646b1..00000000 --- a/meta-steppeeagle/recipes-applications/gpio-test/files/gpio-test.c +++ /dev/null @@ -1,575 +0,0 @@ -/***************************************************************************** -* -* Copyright (c) 2014, Advanced Micro Devices, Inc. -* All rights reserved. -* -* 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 Advanced Micro Devices, Inc. nor the names of -* its contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* 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 ADVANCED MICRO DEVICES, INC. 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 <unistd.h> -#include <stdio.h> -#include <stdlib.h> -#include <fcntl.h> -#include <signal.h> -#include <errno.h> -#include <string.h> - -#include <readline/readline.h> -#include <sys/types.h> -#include <sys/wait.h> -#include <sys/ioctl.h> - -#include "gpio-test.h" - -#define GPIO_APP_VERSION "0.1" -#define AMD_GPIO_NUM_PINS 184 -static int gpio_in_use[AMD_GPIO_NUM_PINS]; - -char *show_prompt(void) -{ - return "$ "; -} - -void sighandler(int sig) -{ - printf("\n%s", show_prompt()); -} - -void show_license(void) -{ - printf("/*****************************************************************************\n" - "*\n" - "* Copyright (c) 2014, Advanced Micro Devices, Inc.\n" - "* All rights reserved.\n" - "*\n" - "* Redistribution and use in source and binary forms, with or without\n" - "* modification, are permitted provided that the following conditions are met:\n" - "* * Redistributions of source code must retain the above copyright\n" - "* notice, this list of conditions and the following disclaimer.\n" - "* * Redistributions in binary form must reproduce the above copyright\n" - "* notice, this list of conditions and the following disclaimer in the\n" - "* documentation and/or other materials provided with the distribution.\n" - "* * Neither the name of Advanced Micro Devices, Inc. nor the names of\n" - "* its contributors may be used to endorse or promote products derived\n" - "* from this software without specific prior written permission.\n" - "*\n" - "* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n" - "* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n" - "* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n" - "* DISCLAIMED. IN NO EVENT SHALL ADVANCED MICRO DEVICES, INC. BE LIABLE FOR ANY\n" - "* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n" - "* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n" - "* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n" - "* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n" - "* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n" - "* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n" - "*\n" - "*\n" - "***************************************************************************/\n"); -} - -void print_usage() -{ - printf("\nCommands Supported ->\n"); - printf(" getgpiomode <gpio> : Gets the mode of GPIO pin\n"); - printf(" setgpiomode <gpio> <in/out/high/low> : Sets the mode of GPIO pin to input or output(high/low)\n"); - printf(" getgpiovalue <gpio> : Gets the value of GPIO pin\n"); - printf(" setgpiovalue <gpio> <high/low> : Sets the value of GPO pin to high or low\n"); - printf(" getnumgpio : Gets the number of GPIO pins supported\n"); - printf(" getgpiobase : Gets the number of first GPIO pin\n"); - printf(" getgpioname : Gets the name of GPIO driver currently in use\n"); - printf(" dmesg : Displays the kernel log messages related to GPIO\n"); - printf(" license : Displays the terms of LICENSE for this application\n"); - printf(" help : Displays help text\n"); - printf(" exit : Exits the application\n\n"); -} - -void parse_cmd(const char *cmdline) -{ - int fd; - - if ((cmdline == NULL) || (strncmp(cmdline, "exit", 4) == 0)) { - int i; - int ret; - char gpio[3 + 1]; - - printf("\nExiting...\n"); - - /* We need to unexport all the GPIO pins exported earlier */ - for (i = 0; i < AMD_GPIO_NUM_PINS; i++) { - if (gpio_in_use[i]) { - int fd; - - fd = open("/sys/class/gpio/unexport", O_WRONLY); - if (fd < 0) { - printf("\nPlease make sure AMD GPIO driver is loaded\n"); - exit(EXIT_FAILURE); - } - memset(gpio, '\0', (3 + 1)); - snprintf(gpio, 4, "%d", i); - - ret = write(fd, gpio, strlen(gpio)); - if (ret < 0) - perror("Error writing to /sys/class/gpio/unexport"); - } - } - - exit(EXIT_SUCCESS); - } else if (strncmp(cmdline, "help", 4) == 0) - print_usage(); - else if (strncmp(cmdline, "getnumgpio", 10) == 0) { - int fd; - char ngpio[3 + 1]; - - memset(ngpio, '\0', (3 + 1)); - fd = open("/sys/class/gpio/gpiochip0/ngpio", O_RDONLY); - if (fd < 0) { - printf("\nPlease make sure AMD GPIO driver is loaded\n"); - exit(EXIT_FAILURE); - } - - /* Value read from the file is ASCII text */ - if(read(fd, ngpio, 3) < 0) - perror("Cannot read number of GPIO pins"); - - printf("\nThe maximum number of GPIO pins supported is %d\n", atoi(ngpio)); - close(fd); - } else if (strncmp(cmdline, "getgpiobase", 11) == 0) { - int fd; - char gpiobase[3 + 1]; - - memset(gpiobase, '\0', (3 + 1)); - fd = open("/sys/class/gpio/gpiochip0/base", O_RDONLY); - if (fd < 0) { - printf("\nPlease make sure AMD GPIO driver is loaded\n"); - exit(EXIT_FAILURE); - } - - if(read(fd, gpiobase, 3) < 0) - perror("Cannot read GPIO base"); - - printf("\nGPIO pin numbering starts from %d\n", atoi(gpiobase)); - close(fd); - } else if (strncmp(cmdline, "getgpioname", 11) == 0) { - int fd; - char gpioname[10 + 1]; /* Max 10 characters + NULL character */ - - /* Zero initialize gpioname array */ - memset(gpioname, '\0', sizeof(gpioname)); - - fd = open("/sys/class/gpio/gpiochip0/label", O_RDONLY); - if (fd < 0) { - printf("\nPlease make sure AMD GPIO driver is loaded\n"); - exit(EXIT_FAILURE); - } - - if(read(fd, gpioname, 10) < 0) - perror("Cannot read GPIO driver name"); - - printf("\nGPIO driver loaded is %s\n", gpioname); - close(fd); - } else if (strncmp(cmdline, "getgpiovalue", 12) == 0) { - int fd; - int gpio; - const char *charp = cmdline; - char pathname[80]; - int ret = 0; - - /* Lets point to the end of first token */ - charp += strlen("getgpiovalue"); - /* Skip blank characters */ - while (*charp == ' ' || *charp == '\t' || *charp == '\n') - charp++; - - /* Now we should be pointing to the first 'digit' character */ - gpio = atoi(charp); - - fd = open("/sys/class/gpio/export", O_WRONLY); - if (fd < 0) { - if (errno == EACCES) - printf("\nYou do not have correct permission, please run as root\n"); - else - perror("Eror opening /sys/class/gpio/export"); - - exit(EXIT_FAILURE); - } - - ret = write(fd, charp, strlen(charp)); - /* - * There can be two situations -> - * 1) The GPIO is being exported for the first time. - * 2) The GPIO is being exported again. - * In the first case, the write to file descriptor should - * succeed, and we should still fall into the if clause. - * - * In the second case, write will fail and errno will be - * set to EBUSY, since the GPIO pin is already exported. - * Rest all is error. - */ - if((ret >= 0) || ((ret < 0) && (errno == EBUSY))) { - /* Close the last file descriptor */ - close(fd); - - memset(pathname, '\0', sizeof(pathname)); - sprintf(pathname, "/sys/class/gpio/gpio%d/value", gpio); - - fd = open(pathname, O_RDONLY); - if (fd < 0) - perror("GPIO read error"); - else { - char value[1 + 1]; - - memset(value, '\0', 2); - ret = read(fd, value, 1); - if (ret < 0) - perror("Cannot read GPIO pin"); - - printf("\nGPIO pin %s is at \"%s\"\n", charp, - (strncmp(value, "1", 1) == 0) ? "high" : "low"); - - close(fd); - - /* - * Mark the GPIO as already exported, so that we can use - * unexport them during exit. - */ - gpio_in_use[gpio] = 1; - } - } else { - if (errno == EINVAL) - printf("\nInvalid GPIO number\n"); - else - perror("Error exporting GPIO number"); - - close(fd); - } - } else if (strncmp(cmdline, "getgpiomode", 11) == 0) { - int fd; - int gpio; - const char *charp = cmdline; - char pathname[80]; - int ret = 0; - - /* Lets point to the end of first token */ - charp += strlen("getgpiomode"); - /* Skip blank characters */ - while (*charp == ' ' || *charp == '\t' || *charp == '\n') - charp++; - - /* Now we should be pointing to the first 'digit' character */ - gpio = atoi(charp); - - fd = open("/sys/class/gpio/export", O_WRONLY); - if (fd < 0) { - if (errno == EACCES) - printf("\nYou do not have correct permission, please run as root\n"); - else - perror("Eror opening /sys/class/gpio/export"); - - exit(EXIT_FAILURE); - } - - ret = write(fd, charp, strlen(charp)); - /* - * There can be two situations -> - * 1) The GPIO is being exported for the first time. - * 2) The GPIO is being exported again. - * In the first case, the write to file descriptor should - * succeed, and we should still fall into the if clause. - * - * In the second case, write will fail and errno will be - * set to EBUSY, since the GPIO pin is already exported. - * Rest all is error. - */ - if((ret >= 0) || ((ret < 0) && (errno == EBUSY))) { - FILE *fp; - - /* Close the last file descriptor */ - close(fd); - - memset(pathname, '\0', sizeof(pathname)); - sprintf(pathname, "/sys/class/gpio/gpio%d/direction", gpio); - - fp = fopen(pathname, "r"); - if (fp == NULL) - perror("GPIO read error"); - else { - char mode[3 + 1]; - int c, i = 0; - - memset(mode, '\0', (3 + 1)); - /* - * Since we do not exactly know whether the - * direction will be 'in' or 'out', we need to - * use fgetc() so that we read the input till - * we find terminating '\n', at which point - * we stop reading any further. - */ - while ((c = fgetc(fp)) != '\n') - mode[i++] = c; - - printf("\nGPIO pin %s is in \"%s\" mode\n", charp, - (strncmp(mode, "in", 2) == 0) ? "input" : "output"); - - fclose(fp); - - /* - * Mark the GPIO as already exported, so that we can use - * unexport them during exit. - */ - gpio_in_use[gpio] = 1; - } - } else { - if (errno == EINVAL) - printf("\nInvalid GPIO number\n"); - else - perror("Error exporting GPIO number"); - - close(fd); - } - } else if (strncmp(cmdline, "setgpiomode", 11) == 0) { - int fd; - const char *charp = cmdline; - int i = 0; - char gpio[3 + 1]; - int ngpio; - int ret; - - charp += strlen("setgpiomode"); - while (*charp == ' ' || *charp == '\t' || *charp == '\n') - charp++; - - memset(gpio, '\0', (3 + 1)); - /* - * We are at the start of string which contains the GPIO - * number. We look for the end of this string, copying - * byte by byte into array. We also make sure that we - * do not store more than 3 bytes into the array, since - * a GPIO can have a maximum value of 183, that is, not - * exceeding 3 characters. - */ - while (*charp != ' ' && *charp != '\t' && (i < 3)) { - gpio[i++] = *charp; - charp++; - } - - ngpio = atoi(gpio); - - fd = open("/sys/class/gpio/export", O_WRONLY); - if (fd < 0) { - if (errno == EACCES) - printf("\nYou do not have correct permission, please run as root\n"); - else - perror("Eror opening /sys/class/gpio/export"); - - exit(EXIT_FAILURE); - } - - ret = write(fd, gpio, strlen(gpio)); - if((ret >= 0) || ((ret < 0) && (errno == EBUSY))) { - char pathname[80]; - - /* Close the last file descriptor */ - close(fd); - - memset(pathname, '\0', sizeof(pathname)); - sprintf(pathname, "/sys/class/gpio/gpio%d/direction", ngpio); - - fd = open(pathname, O_WRONLY); - if (fd < 0) - perror("GPIO read error"); - else { - char mode[4 + 1]; - - memset(mode, '\0', (4 + 1)); - - /* Lets skip the blanks till we find a character */ - while (*charp == ' ' || *charp == '\t') - charp++; - - i = 0; - /* - * Mode can be 'in', 'out', 'high' or 'low', - * again a maximum of 4 characters. - */ - while (*charp != ' ' && *charp != '\t' && (i < 4)) { - mode[i++] = *charp; - charp++; - } - - /* Sanity check */ - if ((strncmp(mode, "in", 2) == 0) || - (strncmp(mode, "out", 3) == 0) || - (strncmp(mode, "high", 4) == 0) || - (strncmp(mode, "low", 3) == 0)) { - /* Write mode into /sys/.../direction file */ - ret = write(fd, mode, strlen(mode)); - if (ret < 0) - perror("Error writing GPIO mode"); - } else - printf("\nInvalid GPIO mode, please try again\n"); - - close(fd); - - /* - * Mark the GPIO as exported, so that we can use - * unexport them during exit. - */ - gpio_in_use[ngpio] = 1; - } - } else { - if (errno == EINVAL) - printf("\nInvalid GPIO number\n"); - else - perror("Error exporting GPIO number"); - - close(fd); - } - } else if (strncmp(cmdline, "setgpiovalue", 12) == 0) { - int fd; - const char *charp = cmdline; - int i = 0; - char gpio[3 + 1]; - int ngpio; - int ret; - - charp += strlen("setgpiovalue"); - while (*charp == ' ' || *charp == '\t' || *charp == '\n') - charp++; - - memset(gpio, '\0', (3 + 1)); - /* - * We are at the start of string which contains the GPIO - * number. We look for the end of this string, copying - * byte by byte into array. We also make sure that we - * do not store more than 3 bytes into the array, since - * a GPIO can have a maximum value of 183, that is, not - * exceeding 3 characters. - */ - while (*charp != ' ' && *charp != '\t' && (i < 3)) { - gpio[i++] = *charp; - charp++; - } - - ngpio = atoi(gpio); - - fd = open("/sys/class/gpio/export", O_WRONLY); - if (fd < 0) { - if (errno == EACCES) - printf("\nYou do not have correct permission, please run as root\n"); - else - perror("Eror opening /sys/class/gpio/export"); - - exit(EXIT_FAILURE); - } - - ret = write(fd, gpio, strlen(gpio)); - if((ret >= 0) || ((ret < 0) && (errno == EBUSY))) { - char pathname[80]; - - /* Close the last file descriptor */ - close(fd); - - memset(pathname, '\0', sizeof(pathname)); - sprintf(pathname, "/sys/class/gpio/gpio%d/value", ngpio); - - fd = open(pathname, O_WRONLY); - if (fd < 0) - perror("GPIO read error"); - else { - char value[1 + 1]; - - memset(value, '\0', (1 + 1)); - - /* Lets skip the blanks till we find a character */ - while (*charp == ' ' || *charp == '\t') - charp++; - - i = 0; - - if (strncmp(charp, "high", 4) == 0) - value[0] = '1'; - else if (strncmp(charp, "low", 3) == 0) - value[0] = '0'; - else { - printf("\nInvalid input, please try again...\n"); - goto out; - } - - /* Write mode into /sys/.../direction file */ - ret = write(fd, value, 1); - if (ret < 0) - perror("Error writing GPIO mode"); - -out: - close(fd); - - /* - * Mark the GPIO as exported, so that we can use - * unexport them during exit. - */ - gpio_in_use[ngpio] = 1; - } - } else { - if (errno == EINVAL) - printf("\nInvalid GPIO number\n"); - else - perror("Error exporting GPIO number"); - - close(fd); - } - } else if (strncmp(cmdline, "dmesg", 5) == 0) { - if (system("dmesg | grep GPIO") < 0) - perror("Error executing \'dmesg | grep GPIO\'"); - } else if (strncmp(cmdline, "license", 7) == 0) { - show_license(); - } else { - printf("\nUnknown command\n"); - print_usage(); - } -} - -int main(void) -{ - char *cmdline= NULL; - - printf("GPIO sample application version: %s\n", GPIO_APP_VERSION); - printf("Copyright (c) 2014, Advanced Micro Devices, Inc.\n" - "This sample application comes with ABSOLUTELY NO WARRANTY;\n" - "This is free software, and you are welcome to redistribute it\n" - "under certain conditions; type `license' for details.\n\n"); - - /* Handler for Ctrl+C */ - signal(SIGINT, sighandler); - - while (1) { - cmdline = readline(show_prompt()); - parse_cmd(cmdline); - /* Free the memory malloc'ed by readline */ - free(cmdline); - } - - /* Should never reach here */ - return 0; -} diff --git a/meta-steppeeagle/recipes-applications/gpio-test/files/gpio-test.h b/meta-steppeeagle/recipes-applications/gpio-test/files/gpio-test.h deleted file mode 100644 index af9c3b68..00000000 --- a/meta-steppeeagle/recipes-applications/gpio-test/files/gpio-test.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef _GPIO_TEST_H_ -#define _GPIO_TEST_H_ - - - -/* IOCTL numbers */ - -typedef struct { - int offset; - int value; -}debug_data; - -#define GPIO_TEST_IOC_MAGIC 'k' -#define GPIO_IOC_SWCTRLIN _IOW(GPIO_TEST_IOC_MAGIC, 1, debug_data) -#define GPIO_IOC_SWCTRLEN _IOW(GPIO_TEST_IOC_MAGIC, 2, debug_data) - -#endif /* _GPIO_TEST_H_ */ diff --git a/meta-steppeeagle/recipes-applications/gpio-test/gpio-test_1.0.bb b/meta-steppeeagle/recipes-applications/gpio-test/gpio-test_1.0.bb deleted file mode 100644 index be664e17..00000000 --- a/meta-steppeeagle/recipes-applications/gpio-test/gpio-test_1.0.bb +++ /dev/null @@ -1,22 +0,0 @@ -DESCRIPTION = "Sample application for AMD GPIO driver" -SECTION = "applications" -LICENSE = "BSD" -DEPENDS = "readline" -LIC_FILES_CHKSUM = "file://gpio-test.c;endline=29;md5=8e7a9706367d146e5073510a6e176dc2" - -SRC_URI = "file://gpio-test.c \ - file://gpio-test.h \ - " - -TARGET_CC_ARCH += "${LDFLAGS}" - -S = "${WORKDIR}" - -do_compile() { - ${CC} gpio-test.c -o gpio-test -lreadline -} - -do_install() { - install -d ${D}${bindir} - install -m 0755 gpio-test ${D}${bindir} -} diff --git a/meta-steppeeagle/recipes-applications/spi-test/files/spirom-test.c b/meta-steppeeagle/recipes-applications/spi-test/files/spirom-test.c deleted file mode 100644 index 091ced1a..00000000 --- a/meta-steppeeagle/recipes-applications/spi-test/files/spirom-test.c +++ /dev/null @@ -1,798 +0,0 @@ -/***************************************************************************** -* -* Copyright (c) 2014, Advanced Micro Devices, Inc. -* All rights reserved. -* -* 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 Advanced Micro Devices, Inc. nor the names of -* its contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* 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 ADVANCED MICRO DEVICES, INC. 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 <stdint.h> -#include <unistd.h> -#include <stdio.h> -#include <stdlib.h> -#include <fcntl.h> -#include <string.h> -#include <dirent.h> -#include <signal.h> - -#include <sys/types.h> -#include <sys/ioctl.h> -#include <sys/stat.h> - -#include <readline/readline.h> - -#include "spirom.h" - -#define SPI_APP_VERSION "1.0" - -static int device_opened = 0; -static char filename[20]; -static int fd = -1; - -char *show_prompt(void) -{ - return "$ "; -} - -void sighandler(int sig) -{ - /* Do nothing. That is the idea. */ -} - -void show_license(void) -{ - printf("/*****************************************************************************\n" - "*\n" - "* Copyright (c) 2014, Advanced Micro Devices, Inc.\n" - "* All rights reserved.\n" - "*\n" - "* Redistribution and use in source and binary forms, with or without\n" - "* modification, are permitted provided that the following conditions are met:\n" - "* * Redistributions of source code must retain the above copyright\n" - "* notice, this list of conditions and the following disclaimer.\n" - "* * Redistributions in binary form must reproduce the above copyright\n" - "* notice, this list of conditions and the following disclaimer in the\n" - "* documentation and/or other materials provided with the distribution.\n" - "* * Neither the name of Advanced Micro Devices, Inc. nor the names of\n" - "* its contributors may be used to endorse or promote products derived\n" - "* from this software without specific prior written permission.\n" - "*\n" - "* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n" - "* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n" - "* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n" - "* DISCLAIMED. IN NO EVENT SHALL ADVANCED MICRO DEVICES, INC. BE LIABLE FOR ANY\n" - "* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n" - "* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n" - "* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n" - "* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n" - "* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n" - "* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n" - "*\n" - "*\n" - "***************************************************************************/\n"); -} - -void print_usage(void) -{ - printf("\nCommands Supported ->\n"); - printf(" enumerate : List all SPI device nodes available\n"); - printf(" setdevice <dev_id> : Set the SPI device number to access\n"); - printf(" wren : Enable Write operation on SPI device\n"); - printf(" wrdi : Disable Write operation on SPI device\n"); - printf(" chiperase : Erase entire ROM chip\n"); - printf(" rdsr : Read status register of ROM device\n"); - printf(" rdid : Read device identification string\n"); - printf(" sectorerase <addr> <num_sectors> : Erase a fixed number of sectors starting at the address\n" - " specified\n"); - printf(" blockerase <addr> <num_blocks> : Erase a fixed number of blocks starting at the address\n" - " specified\n"); - printf(" read <addr> <num_bytes> <filename> : Read a fixed number of bytes starting at address\n" - " specified, and output the contents into file\n"); - printf(" write <addr> <num_bytes> <filename> : Read a fixed number of bytes from file and output\n" - " the contents to the device starting at the address\n" - " specified\n"); - printf(" license : Displays the terms of LICENSE for this application\n"); - printf(" help : Displays help text\n"); - printf(" exit : Exits the application\n\n"); -} - -void parse_cmd(const char *cmdline) -{ - struct spi_ioc_transfer tr; - unsigned int bytes_chunks; - unsigned int remaining_bytes; - int addr; - int ret; - - if ((cmdline == NULL) || (strncmp(cmdline, "exit", 4) == 0)) { - printf("\nExiting...\n"); - close(fd); - exit(EXIT_SUCCESS); - } else if (strncmp(cmdline, "enumerate", 9) == 0) { - DIR *dir; - struct dirent *dir_entry; - int device_found = 0; - - /* Get the directory handle */ - if ((dir = opendir("/dev")) == NULL) { - printf("\n\nFailed to open directory /dev. Probably you " - "do not have right privilege!\n\n"); - exit(EXIT_FAILURE); - } - - /* Iterate over all the directory entries */ - while ((dir_entry = readdir(dir)) != NULL) { - /* - * If the file is a character device, and its signature - * matches spirom, then we print the corresponding file. - */ - if ((dir_entry->d_type == DT_CHR) && - (strncmp(dir_entry->d_name, "spirom", 6) == 0)) { - printf("/dev/%s\n", dir_entry->d_name); - device_found = 1; - } - } - - printf("\n"); - - /* - * In case we did not find even a single entry, we print a - * message and exit. - */ - if (!device_found) { - printf("\n\nNo spirom device nodes found, load spirom " - "kernel module and try again\n\n"); - exit(EXIT_FAILURE); - } - } else if (strncmp(cmdline, "setdevice", 9) == 0) { - char input[2 + 1]; - int file_desc; - - cmdline += 10; - memset(input, 0, 3); - if (sscanf(cmdline, "%s", input) < 1) { - printf("\nInvalid inputs, please try again\n\n"); - return; - } - - memset(filename, 0, 20); - snprintf(filename, 19, "/dev/spirom%s", input); - file_desc = open(filename, O_RDWR); - if (file_desc < 0) { - printf("\nError opening file %s\n\n", filename); - return; - } - - /* Once we have validated inputs, we store them into the global - * variables used at other places in the program. - */ - fd = file_desc; - device_opened = 1; - printf("\nSPI device set to /dev/spirom%s\n\n", input); - } else if (strncmp(cmdline, "wren", 4) == 0) { - if (!device_opened) { - printf("\nSPI device needs to be set before you can " - "perform this operation\n\n"); - return; - } - - /* command without data */ - tr.buf[0] = ROM_WREN; - tr.direction = 0; - tr.len = 0; - tr.addr_present = 0; - - ret = ioctl(fd, SPI_IOC_MESSAGE(1), &tr); - if (ret < 1) - printf("\nError executing WREN command\n\n"); - else - printf("\n...WREN completed successfully\n\n"); - } else if (strncmp(cmdline, "wrdi", 4) == 0) { - if (!device_opened) { - printf("\nSPI device needs to be set before you can " - "perform this operation\n\n"); - return; - } - - /* command without data */ - tr.buf[0] = ROM_WRDI; - tr.direction = 0; - tr.len = 0; - tr.addr_present = 0; - - ret = ioctl(fd, SPI_IOC_MESSAGE(1), &tr); - if (ret < 1) - printf("\nError executing WRDI command\n\n"); - else - printf("\n...WRDI completed successfully\n\n"); - } else if (strncmp(cmdline, "chiperase", 9) == 0) { - if (!device_opened) { - printf("\nSPI device needs to be set before you can " - "perform this operation\n\n"); - return; - } - - tr.buf[0] = ROM_RDSR; - tr.direction = RECEIVE; - tr.addr_present = 0; - tr.len = 1; - - ret = ioctl(fd, SPI_IOC_MESSAGE(1), &tr); - if (ret < 1) { - printf("\nError executing RDSR command\n\n");; - return; - } else if ((tr.buf[1] & 0x02) == 0x00) { - printf("\nCannot execute RDSR command, write is disabled\n\n"); - return; - } - - /* Command without data */ - tr.buf[0] = ROM_CHIP_ERASE; - tr.direction = 0; - tr.len = 0; - tr.addr_present = 0; - ret = ioctl(fd, SPI_IOC_MESSAGE(1), &tr); - if (ret < 1) { - printf("\nError executing CHIPERASE command\n\n"); - return; - } - - printf("\n\nCHIPERASE operation in progress, please do not " - " stop in between.\n\n"); - - /* Make sure WIP has been reset */ - while (1) { - memset(&tr, 0, sizeof(struct spi_ioc_transfer)); - tr.buf[0] = ROM_RDSR; - tr.direction = RECEIVE; - tr.addr_present = 0; - tr.len = 1; - - ret = ioctl(fd, SPI_IOC_MESSAGE(1), &tr); - if (ret < 1) { - printf("\nError executing RDSR command\n\n"); - return; - } - - if ((tr.buf[1] & 0x01) == 0x00) - break; - } - - printf("\n\n...CHIPERASE completed successfully\n\n"); - /* Restore signal handler to default */ - } else if (strncmp(cmdline, "rdsr", 4) == 0) { - if (!device_opened) { - printf("\nSPI device needs to be set before you can " - "perform this operation\n\n"); - return; - } - - /* Command with response */ - tr.buf[0] = ROM_RDSR; - tr.direction = RECEIVE; - tr.addr_present = 0; - tr.len = 1; - - ret = ioctl(fd, SPI_IOC_MESSAGE(1), &tr); - if (ret < 1) { - printf("\nError executing RDSR command\n\n"); - return; - } - - /* - * The 1-byte response will be stored in tr.buf, - * so print it out - */ - printf("\nRDSR command returned: 0x%.2x\n\n", tr.buf[1]); - } else if (strncmp(cmdline, "rdid", 4) == 0) { - if (!device_opened) { - printf("\nSPI device needs to be set before you can " - "perform this operation\n\n"); - return; - } - - /* Command with response */ - tr.buf[0] = ROM_RDID; - tr.direction = RECEIVE; - tr.addr_present = 0; - tr.len = 3; - - ret = ioctl(fd, SPI_IOC_MESSAGE(1), &tr); - if (ret < 1) { - printf("\nError executing RDID command\n\n"); - return; - } - - /* - * The 3-bytes response will be stored in tr.buf, - * so print it out - */ - printf("\nRDID command returned: 0x%.2x%.2x%.2x\n", tr.buf[1], - tr.buf[2], tr.buf[3]); - } else if (strncmp(cmdline, "sectorerase", 11) == 0) { - int nsectors; - int i; - - if (!device_opened) { - printf("\nSPI device needs to be set before you can " - "perform this operation\n\n"); - return; - } - - cmdline += 12; - if (sscanf(cmdline, "0x%x 0x%x", &addr, &nsectors) < 2) { - printf("\nInvalid inputs, please try again\n\n"); - return; - } - - tr.buf[0] = ROM_RDSR; - tr.direction = RECEIVE; - tr.addr_present = 0; - tr.len = 1; - - ret = ioctl(fd, SPI_IOC_MESSAGE(1), &tr); - if (ret < 1) { - printf("\nError executing RDSR command\n\n"); - return; - } else if ((tr.buf[1] & 0x02) == 0x00) { - printf("\nCannot execute SECTORERASE command, write is disabled\n\n"); - return; - } - - printf("\n\nSECTORERASE operation in progress, please do not " - " stop in between.\n\n"); - - for (i = 0; i < nsectors; i++) { - /* Write Enable before Sector Erase */ - tr.buf[0] = ROM_WREN; - tr.direction = 0; - tr.len = 0; - tr.addr_present = 0; - ret = ioctl(fd, SPI_IOC_MESSAGE(1), &tr); - if (ret < 1) { - printf("\nError executing WREN command\n\n"); - return; - } - - /* Command with address but no data */ - memset(&tr, 0, sizeof(struct spi_ioc_transfer)); - tr.buf[0] = ROM_SECTOR_ERASE; - tr.buf[3] = addr & 0xff; - tr.buf[2] = (addr >> 8) & 0xff; - tr.buf[1] = (addr >> 16) & 0xff; - tr.addr_present = 1; - tr.direction = 0; - tr.len = 0; - - ret = ioctl(fd, SPI_IOC_MESSAGE(1), &tr); - if (ret < 1) { - printf("\nError executing SECTORERASE command\n\n"); - return; - } - - /* point to the next 4k sector */ - addr += 4 * 1024; - - /* - * Before the next loop, we need to make sure that WIP - * bit in the output of RDSR has been reset. - */ - while (1) { - memset(&tr, 0, sizeof(struct spi_ioc_transfer)); - tr.buf[0] = ROM_RDSR; - tr.direction = RECEIVE; - tr.addr_present = 0; - tr.len = 1; - - ret = ioctl(fd, SPI_IOC_MESSAGE(1), &tr); - if (ret < 1) { - printf("\nError executing RDSR command\n\n"); - return; - } - - if ((tr.buf[1] & 0x01) == 0x00) - break; - } - } - - printf("\n\n...SECTORERASE completed successfully\n\n"); - } else if (strncmp(cmdline, "blockerase", 10) == 0) { - int nblocks; - int i; - - if (!device_opened) { - printf("\nSPI device needs to be set before you can " - "perform this operation\n\n"); - return; - } - - cmdline += 11; - if (sscanf(cmdline, "0x%x 0x%x", &addr, &nblocks) < 2) { - printf("\nInvalid inputs, please try again\n\n"); - return; - } - - tr.buf[0] = ROM_RDSR; - tr.direction = RECEIVE; - tr.addr_present = 0; - tr.len = 1; - - ret = ioctl(fd, SPI_IOC_MESSAGE(1), &tr); - if (ret < 1) { - printf("\nError executing RDSR command\n\n"); - return; - } else if ((tr.buf[1] & 0x02) == 0x00) { - printf("\nError executing BLOCKERASE command, write is disabled\n\n"); - return; - } - - printf("\n\nBLOCKERASE operation in progress, please do not " - " stop in between.\n\n"); - - for (i = 0; i < nblocks; i++) { - /* Write Enable before Block Erase */ - tr.buf[0] = ROM_WREN; - tr.direction = 0; - tr.len = 0; - tr.addr_present = 0; - ret = ioctl(fd, SPI_IOC_MESSAGE(1), &tr); - if (ret < 1) { - printf("\nError executing WREN command\n\n"); - return; - } - - /* Command with address but no data */ - memset(&tr, 0, sizeof(struct spi_ioc_transfer)); - tr.buf[0] = ROM_BLOCK_ERASE; - tr.buf[3] = addr & 0xff; - tr.buf[2] = (addr >> 8) & 0xff; - tr.buf[1] = (addr >> 16) & 0xff; - tr.addr_present = 1; - tr.direction = 0; - tr.len = 0; - - ret = ioctl(fd, SPI_IOC_MESSAGE(1), &tr); - if (ret < 1) { - printf("\nError executing BLOCKERASE command\n\n"); - return; - } - - /* point to the next 64k block */ - addr += 64 * 1024; - - /* - * Before the next loop, we need to make sure that WIP - * bit in the output of RDSR has been reset. - */ - while (1) { - memset(&tr, 0, sizeof(struct spi_ioc_transfer)); - tr.buf[0] = ROM_RDSR; - tr.direction = RECEIVE; - tr.addr_present = 0; - tr.len = 1; - - ret = ioctl(fd, SPI_IOC_MESSAGE(1), &tr); - if (ret < 1) { - printf("\nError executing RDSR command\n\n"); - return; - } - - if ((tr.buf[1] & 0x01) == 0x00) - break; - } - } - - printf("\n\n...BLOCKERASE completed successfully\n\n"); - } else if (strncmp(cmdline, "read", 4) == 0) { - int nbytes; - int outfile_fd; - int i; - - if (!device_opened) { - printf("\nSPI device needs to be set before you can " - "perform this operation\n\n"); - return; - } - - cmdline += 5; - memset(filename, 0, 20); - if (sscanf(cmdline, "0x%x 0x%x %s", &addr, &nbytes, filename) < 3) { - printf("\nInvalid inputs, please try again\n\n"); - return; - } - - /* - * Open the output file for writing. Create a new file if not - * there, and empty the file before writing if file already - * exists. - */ - outfile_fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC, 0644); - if (outfile_fd < 0) { - printf("\nError opening file %s for writing\n\n", filename); - return; - } - - /* - * We will break down the bytes to be received in chunks of - * of 4-bytes. Data might not be a even multiple of 4. So - * in that case, we will have some remaining bytes <4. We - * handle that separately. - */ - bytes_chunks = nbytes / 4; - remaining_bytes = nbytes % 4; - - printf("\n\nREAD operation in progress.\n\n"); - - for (i = 0; i < bytes_chunks; i++) { - /* Command with address and data */ - memset(&tr, 0, sizeof(struct spi_ioc_transfer)); - tr.buf[0] = ROM_READ; - tr.direction = RECEIVE; - /* - * We will store the address into the buffer in little - * endian order. - */ - tr.buf[3] = addr & 0xff; - tr.buf[2] = (addr >> 8) & 0xff; - tr.buf[1] = (addr >> 16) & 0xff; - tr.len = 4; - tr.addr_present = 1; - - ret = ioctl(fd, SPI_IOC_MESSAGE(1), &tr); - if (ret < 1) { - printf("\nError executing READ command\n\n"); - return; - } - - /* Write the data read to output file */ - if (write(outfile_fd, &tr.buf[4], tr.len) < 0) { - printf("\nError writing to file %s\n\n", filename); - return; - } - addr += 4; - } - - if (remaining_bytes) { - memset(&tr, 0, sizeof(struct spi_ioc_transfer)); - tr.buf[0] = ROM_READ; - tr.direction = RECEIVE; - tr.buf[3] = addr & 0xff; - tr.buf[2] = (addr >> 8) & 0xff; - tr.buf[1] = (addr >> 16) & 0xff; - tr.len = remaining_bytes; - tr.addr_present = 1; - - ret = ioctl(fd, SPI_IOC_MESSAGE(1), &tr); - if (ret < 1) { - printf("\nError executing READ command\n\n"); - return; - } - - if (write(outfile_fd, &tr.buf[4], tr.len) < 0) { - printf("\nError writing to file %s\n\n", filename); - return; - } - } - - printf("\n\n...READ completed successfully\n\n"); - close(outfile_fd); - } else if (strncmp(cmdline, "write", 5) == 0) { - int nbytes; - int infile_fd; - int i; - - if (!device_opened) { - printf("\nSPI device needs to be set before you can " - "perform this operation\n\n"); - return; - } - - cmdline += 6; - memset(filename, 0, 20); - if (sscanf(cmdline, "0x%x 0x%x %s", &addr, &nbytes, filename) < 3) { - printf("\nInvalid inputs, please try again\n\n"); - return; - } - - /* Open the input file for reading*/ - infile_fd = open(filename, O_RDONLY); - if (infile_fd < 0) { - printf("\nError opening file %s for reading\n\n", filename); - return; - } - - /* - * We will break down the bytes to be transmitted in chunks of - * of 4-bytes. Like for read, we might not have data in an - * even multiple of 4 bytes. So we will handle the remaining - * bytes in the end. - */ - tr.buf[0] = ROM_RDSR; - tr.direction = RECEIVE; - tr.addr_present = 0; - tr.len = 1; - - ret = ioctl(fd, SPI_IOC_MESSAGE(1), &tr); - if (ret < 1) { - printf("\nError executing RDSR command\n\n"); - return; - } else if ((tr.buf[1] & 0x02) == 0x00) { - printf("\nCannot execute WRITE command, write is disabled\n\n"); - return; - } - - bytes_chunks = nbytes / 4; - remaining_bytes = nbytes % 4; - - printf("\n\nWRITE operation in progress, please do not " - " stop in between.\n\n"); - - for (i = 0; i < bytes_chunks; i++) { - tr.buf[0] = ROM_WREN; - tr.direction = 0; - tr.len = 0; - tr.addr_present = 0; - ret = ioctl(fd, SPI_IOC_MESSAGE(1), &tr); - if (ret < 1) { - printf("\nError executing WREN command\n\n"); - return; - } - - /* Command with data and address */ - memset(&tr, 0, sizeof(struct spi_ioc_transfer)); - tr.buf[0] = ROM_WRITE; - tr.direction = TRANSMIT; - /* - * We will store the address into the buffer in little - * endian order. - */ - tr.buf[3] = addr & 0xff; - tr.buf[2] = (addr >> 8) & 0xff; - tr.buf[1] = (addr >> 16) & 0xff; - tr.len = 4; - tr.addr_present = 1; - - /* Read 4 bytes from input file to buffer */ - if (read(infile_fd, &tr.buf[4], tr.len) < 0) { - printf("\nError reading from file %s\n\n", filename); - return; - } - - ret = ioctl(fd, SPI_IOC_MESSAGE(1), &tr); - if (ret < 1) { - printf("\nError executing WRITE command\n\n"); - return; - } - - addr += 4; - - /* - * Before the next loop, we need to make sure that WIP - * bit in the output of RDSR has been reset. - */ - while (1) { - memset(&tr, 0, sizeof(struct spi_ioc_transfer)); - tr.buf[0] = ROM_RDSR; - tr.direction = RECEIVE; - tr.addr_present = 0; - tr.len = 1; - - ret = ioctl(fd, SPI_IOC_MESSAGE(1), &tr); - if (ret < 1) { - printf("\nError executing RDSR command\n\n"); - return; - } - - if ((tr.buf[1] & 0x01) == 0x00) - break; - } - } - - if (remaining_bytes) { - tr.buf[0] = ROM_WREN; - tr.direction = 0; - tr.len = 0; - tr.addr_present = 0; - ret = ioctl(fd, SPI_IOC_MESSAGE(1), &tr); - if (ret < 1) { - printf("\nError executing WREN command\n\n"); - return; - } - - memset(&tr, 0, sizeof(struct spi_ioc_transfer)); - tr.buf[0] = ROM_WRITE; - tr.direction = TRANSMIT; - tr.buf[3] = addr & 0xff; - tr.buf[2] = (addr >> 8) & 0xff; - tr.buf[1] = (addr >> 16) & 0xff; - tr.len = remaining_bytes; - tr.addr_present = 1; - - if (read(infile_fd, &tr.buf[4], tr.len) < 0) { - printf("\nError reading from file %s\n\n", filename); - return; - } - - ret = ioctl(fd, SPI_IOC_MESSAGE(1), &tr); - if (ret < 1) { - printf("\nError executing WRITE command\n\n"); - return; - } - - while (1) { - memset(&tr, 0, sizeof(struct spi_ioc_transfer)); - tr.buf[0] = ROM_RDSR; - tr.direction = RECEIVE; - tr.addr_present = 0; - tr.len = 1; - - ret = ioctl(fd, SPI_IOC_MESSAGE(1), &tr); - if (ret < 1) { - printf("\nError executing RDSR command\n\n"); - return; - } - - if ((tr.buf[1] & 0x01) == 0x00) - break; - } - } - - printf("\n\n...WRITE completed successfully\n\n"); - close(infile_fd); - } else if (strncmp(cmdline, "license", 7) == 0) { - show_license(); - } else if (strncmp(cmdline, "help", 4) == 0) { - print_usage(); - } else { - printf("\nUnknown command\n"); - print_usage(); - } -} - -int main(void) -{ - char *cmdline= NULL; - - printf("SPI sample application version: %s\n", SPI_APP_VERSION); - printf("Copyright (c) 2014, Advanced Micro Devices, Inc.\n" - "This sample application comes with ABSOLUTELY NO WARRANTY;\n" - "This is free software, and you are welcome to redistribute it\n" - "under certain conditions; type `license` for details.\n\n"); - - /* Set the signal handler */ - signal(SIGINT, sighandler); - - while (1) { - cmdline = readline(show_prompt()); - parse_cmd(cmdline); - /* Free the memory malloc'ed by readline */ - free(cmdline); - } - - /* Restore the default signal handler */ - signal(SIGINT, SIG_DFL); - - /* Should never reach here */ - return 0; -} diff --git a/meta-steppeeagle/recipes-applications/spi-test/files/spirom.h b/meta-steppeeagle/recipes-applications/spi-test/files/spirom.h deleted file mode 100644 index 941b357a..00000000 --- a/meta-steppeeagle/recipes-applications/spi-test/files/spirom.h +++ /dev/null @@ -1,53 +0,0 @@ -#ifndef SPIROM_H -#define SPIROM_H - -#include <linux/types.h> - -/*---------------------------------------------------------------------------*/ - -/* IOCTL commands */ - -#define SPI_IOC_MAGIC 'k' - -#define TRANSMIT 1 -#define RECEIVE 2 - -/* - * struct spi_ioc_transfer - interface structure between application and ioctl - * - * @buf: Buffer to hold 1-byte command, 3-bytes address, and 64-byte data for - * transmit or receive. The internal FIFO of our controller can hold a - * maximum of 70 bytes, including the address. But here we assume the - * maximum data excluding address to be 64-bytes long. - * - * @direction: Direction of data transfer, either TRANSMIT or RECEIVE. - * - * @len: Length of data excluding command and address. - * - * @addr_present: Flag to indicate whether 'buf' above contains an address. - */ -struct spi_ioc_transfer { - __u8 buf[64 + 1 + 3]; - __u8 direction; - __u8 len; - __u8 addr_present; -}; - -/* not all platforms use <asm-generic/ioctl.h> or _IOC_TYPECHECK() ... */ -#define SPI_MSGSIZE(N) \ - ((((N)*(sizeof (struct spi_ioc_transfer))) < (1 << _IOC_SIZEBITS)) \ - ? ((N)*(sizeof (struct spi_ioc_transfer))) : 0) -#define SPI_IOC_MESSAGE(N) _IOW(SPI_IOC_MAGIC, 0, char[SPI_MSGSIZE(N)]) - -/* SPI ROM command codes */ -#define ROM_WREN 0x06 -#define ROM_WRDI 0x04 -#define ROM_RDSR 0x05 -#define ROM_RDID 0x9F -#define ROM_CHIP_ERASE 0x60 -#define ROM_SECTOR_ERASE 0x20 -#define ROM_BLOCK_ERASE 0xD8 -#define ROM_READ 0x03 -#define ROM_WRITE 0x02 - -#endif /* SPIROM_H */ diff --git a/meta-steppeeagle/recipes-applications/spi-test/spi-test_1.0.bb b/meta-steppeeagle/recipes-applications/spi-test/spi-test_1.0.bb deleted file mode 100644 index 764f112a..00000000 --- a/meta-steppeeagle/recipes-applications/spi-test/spi-test_1.0.bb +++ /dev/null @@ -1,22 +0,0 @@ -DESCRIPTION = "Sample application for AMD SPI driver" -SECTION = "applications" -LICENSE = "BSD" -DEPENDS = "readline" -LIC_FILES_CHKSUM = "file://spirom-test.c;endline=29;md5=8e7a9706367d146e5073510a6e176dc2" - -SRC_URI = "file://spirom-test.c \ - file://spirom.h \ - " - -S = "${WORKDIR}" - -TARGET_CC_ARCH += "${LDFLAGS}" - -do_compile() { - ${CC} spirom-test.c -o spirom-test -lreadline -} - -do_install() { - install -d ${D}${bindir} - install -m 0755 spirom-test ${D}${bindir} -} diff --git a/meta-steppeeagle/recipes-kernel/amd-gpio/amd-gpio_1.0.bb b/meta-steppeeagle/recipes-kernel/amd-gpio/amd-gpio_1.0.bb deleted file mode 100644 index cd5dfcde..00000000 --- a/meta-steppeeagle/recipes-kernel/amd-gpio/amd-gpio_1.0.bb +++ /dev/null @@ -1,14 +0,0 @@ -DESCRIPTION = "This kernel module provides support for AMD GPIO driver" -LICENSE = "BSD | GPLv2" -LIC_FILES_CHKSUM = "file://gpio-amd.c;endline=29;md5=cff1a39058f2ba37f8a18768e23e86ab" - -inherit module - -SRC_URI = "file://Makefile \ - file://gpio-amd.c \ - file://gpio-amd.h \ - " - -S = "${WORKDIR}" - -# The inherit of module.bbclass will take care of the rest diff --git a/meta-steppeeagle/recipes-kernel/amd-gpio/files/Makefile b/meta-steppeeagle/recipes-kernel/amd-gpio/files/Makefile deleted file mode 100644 index b9348759..00000000 --- a/meta-steppeeagle/recipes-kernel/amd-gpio/files/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -obj-m := gpio-amd.o - -SRC := $(shell pwd) - -all: - $(MAKE) -C $(KERNEL_SRC) M=$(SRC) - -clean: - rm -f *.o *~ core .depend .*.cmd *.ko *.mod.c - rm -f Module.markers Module.symvers modules.order - rm -rf .tmp_versions Modules.symvers - -modules_install: - $(MAKE) -C $(KERNEL_SRC) M=$(SRC) modules_install
\ No newline at end of file diff --git a/meta-steppeeagle/recipes-kernel/amd-gpio/files/gpio-amd.c b/meta-steppeeagle/recipes-kernel/amd-gpio/files/gpio-amd.c deleted file mode 100644 index 82f250bf..00000000 --- a/meta-steppeeagle/recipes-kernel/amd-gpio/files/gpio-amd.c +++ /dev/null @@ -1,879 +0,0 @@ -/***************************************************************************** -* -* Copyright (c) 2014, Advanced Micro Devices, Inc. -* All rights reserved. -* -* 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 Advanced Micro Devices, Inc. nor the names of -* its contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* 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 ADVANCED MICRO DEVICES, INC. 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/init.h> -#include <linux/module.h> -#include <linux/pci.h> -#include <linux/gpio.h> -#include <linux/pci.h> -#include <linux/ioport.h> -#include <linux/platform_device.h> -#include <linux/uaccess.h> -#include <linux/io.h> - -#include <asm/io.h> - -#include <linux/cdev.h> -#include <linux/fs.h> /* everything... */ -#include <asm/io.h> -#include <linux/ioctl.h> -#include <linux/device.h> - -#include "gpio-amd.h" - -static u32 gpiobase_phys; -static u32 iomuxbase_phys; -static struct pci_dev *amd_gpio_pci; -static struct platform_device *amd_gpio_platform_device; - - -static int dev_major; -static int dev_minor = 0; - -static struct gpio_test_dev{ - struct cdev cdev; - struct class *gpio_class; -}gpio_test_dev; - - -/* The following GPIO pins are reserved as per the specification. 184 max */ -static u8 mask[] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, - 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, - 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, -}; - - -static int gpio_mask[AMD_GPIO_NUM_PINS]; -static unsigned int num_mask; -module_param_array(gpio_mask, int, &num_mask, 0); -MODULE_PARM_DESC(gpio_mask, "GPIO mask which marks them as reserved"); - -static int gpio_mode[AMD_GPIO_NUM_PINS]; -static unsigned int num_modes; -module_param_array(gpio_mode, int, &num_modes, 0); -MODULE_PARM_DESC(gpio_mode, "Specifies whether the GPIO mentioned " - "in gpio_mask is 0-reserved, 1-available, 2-GPI only, " - "3-GPO only"); - -static struct amd_gpio_chip { - struct gpio_chip gpio; - - void __iomem *gpiobase; - void __iomem *iomuxbase; - - struct platform_device *pdev; - spinlock_t lock; -} amd_gpio_chip; - -static int amd_gpio_request(struct gpio_chip *c, unsigned offset) -{ - struct amd_gpio_chip *chip = container_of(c, struct amd_gpio_chip, - gpio); - unsigned long flags; - u8 iomux_reg; - u32 gpio_reg = 0; - - spin_lock_irqsave(&chip->lock, flags); - - /* check if this pin is available */ - if (mask[offset] == AMD_GPIO_MODE_RESV) { - spin_unlock_irqrestore(&chip->lock, flags); - pr_info("GPIO pin %u not available\n", offset); - return -EINVAL; - } - - /* Program the GPIO Wake/Interrupt Switch offset is AMD_GPIO_MSWITCH */ - gpio_reg = ioread32((u32 *)amd_gpio_chip.gpiobase + AMD_GPIO_MSWITCH); - /* to disable all GPIO wake and interrupt*/ - gpio_reg &= (~AMD_GPIO_WAKE_EN & ~AMD_GPIO_INTERRUPT_EN); - iowrite32(gpio_reg, ((u32 *)amd_gpio_chip.gpiobase + AMD_GPIO_MSWITCH)); - - gpio_reg = ioread32((u32 *)amd_gpio_chip.gpiobase + offset); - /* clear wake status and interrupt status */ - gpio_reg |= (AMD_GPIO_INTERPT_STATUS | AMD_GPIO_WAKE_STATUS); - - /* Set disable both Pull Up and Pull Down and disable output */ - gpio_reg &= (~AMD_GPIO_PULLUP_ENABLE & ~AMD_GPIO_PULLDN_ENABLE - & ~AMD_GPIO_DEB_CTRL & ~AMD_GPIO_SWCTRL_IN - & ~AMD_GPIO_WAKECTRL & ~AMD_GPIO_INTERPT_ENABLE); - iowrite32(gpio_reg, ((u32 *)amd_gpio_chip.gpiobase + offset)); - - /* Enable GPIO by writing to the corresponding IOMUX register */ - iomux_reg = ioread8((u8 *)amd_gpio_chip.iomuxbase + offset); - iomux_reg &= ~AMD_IOMUX_GPIO_MASK; - - if(offset == 10 || offset == 72 || offset == 73 ||offset == 76) - iomux_reg |= AMD_IOMUX_ENABLE_FUNC0; - else if(offset == 35 || offset == 64 || offset == 65 ||offset == 66 || - offset == 71 || offset == 93 ||offset == 115 ||offset == 116) - iomux_reg |= AMD_IOMUX_ENABLE_FUNC2; - else if(offset == 67 || offset == 70) - iomux_reg |= AMD_IOMUX_ENABLE_FUNC3; - else - iomux_reg |= AMD_IOMUX_ENABLE_FUNC1; - - iowrite8(iomux_reg, ((u8 *)amd_gpio_chip.iomuxbase + offset)); - - spin_unlock_irqrestore(&chip->lock, flags); - - return 0; -} - - -static int amd_gpio_get(struct gpio_chip *c, unsigned offset) -{ - struct amd_gpio_chip *chip = container_of(c, struct amd_gpio_chip, - gpio); - unsigned long flags; - u32 gpio_reg; - - spin_lock_irqsave(&chip->lock, flags); - - /* Read the GPIO register */ - gpio_reg = ioread32((u32 *)amd_gpio_chip.gpiobase + offset); - - spin_unlock_irqrestore(&chip->lock, flags); - - return (gpio_reg & AMD_GPIO_GET_INPUT) ? 1 : 0; -} - -static void amd_gpio_set(struct gpio_chip *c, unsigned offset, int val) -{ - struct amd_gpio_chip *chip = container_of(c, struct amd_gpio_chip, - gpio); - unsigned long flags; - u32 gpio_reg; - - spin_lock_irqsave(&chip->lock, flags); - - gpio_reg = ioread32((u32 *)amd_gpio_chip.gpiobase + offset); - - /* Set GPIO Output depending on 'val' */ - if (val) - gpio_reg |= AMD_GPIO_SET_OUTPUT; - else - gpio_reg &= ~AMD_GPIO_SET_OUTPUT; - - iowrite32(gpio_reg, ((u32 *)amd_gpio_chip.gpiobase + offset)); - - spin_unlock_irqrestore(&chip->lock, flags); -} - -static int amd_gpio_direction_input(struct gpio_chip *c, unsigned offset) -{ - struct amd_gpio_chip *chip = container_of(c, struct amd_gpio_chip, - gpio); - unsigned long flags; - u32 gpio_reg; - - spin_lock_irqsave(&chip->lock, flags); - - /* If the mask says the pin should be GPO, we return from here */ - if (mask[offset] == AMD_GPIO_MODE_OUTPUT) { - pr_info("GPIO %u can only be set in output mode\n", offset); - spin_unlock_irqrestore(&chip->lock, flags); - return -EINVAL; - } - - gpio_reg = ioread32((u32 *)amd_gpio_chip.gpiobase + offset); - /* Disable output by set the bit to 0 */ - gpio_reg &= ~AMD_GPIO_OUTPUT_ENABLE; - iowrite32(gpio_reg, ((u32 *)amd_gpio_chip.gpiobase + offset)); - - spin_unlock_irqrestore(&chip->lock, flags); - - return 0; -} - -static int amd_gpio_direction_output(struct gpio_chip *c, unsigned offset, - int val) -{ - struct amd_gpio_chip *chip = container_of(c, struct amd_gpio_chip, - gpio); - unsigned long flags; - u32 gpio_reg; - - spin_lock_irqsave(&chip->lock, flags); - - /* If the mask says the pin should be GPI, we return from here */ - if (mask[offset] == AMD_GPIO_MODE_INPUT) { - pr_info("GPIO %u can only be set in input mode\n", offset); - spin_unlock_irqrestore(&chip->lock, flags); - return -EINVAL; - } - - gpio_reg = ioread32((u32 *)amd_gpio_chip.gpiobase + offset); - - - gpio_reg |= AMD_GPIO_DRV_STRENGTH(2); - /* Set disable both Pull Up and Pull Down */ - gpio_reg &= (~AMD_GPIO_PULLUP_ENABLE & ~AMD_GPIO_PULLDN_ENABLE - & ~AMD_GPIO_DEB_CTRL & ~AMD_GPIO_SWCTRL_IN - & ~AMD_GPIO_WAKECTRL & ~AMD_GPIO_INTERPT_ENABLE); - /* Enable output */ - gpio_reg |= AMD_GPIO_OUTPUT_ENABLE; - - /* Set GPIO Output depending on 'val' */ - if (val) - gpio_reg |= AMD_GPIO_SET_OUTPUT; - else - gpio_reg &= ~AMD_GPIO_SET_OUTPUT; - - iowrite32(gpio_reg, ((u32 *)amd_gpio_chip.gpiobase + offset)); - - spin_unlock_irqrestore(&chip->lock, flags); - - return 0; -} - -static struct amd_gpio_chip amd_gpio_chip = { - .gpio = { - .owner = THIS_MODULE, - .label = DRV_NAME, - - .base = 0, - .ngpio = AMD_GPIO_NUM_PINS, - .names = NULL, - .request = amd_gpio_request, - .get = amd_gpio_get, - .set = amd_gpio_set, - .direction_input = amd_gpio_direction_input, - .direction_output = amd_gpio_direction_output, - }, -}; - -/* -* The PCI Device ID table below is used to identify the platform -* the driver is supposed to work for. Since this is a platform -* driver, we need a way for us to be able to find the correct -* platform when the driver gets loaded, otherwise we should -* bail out. -*/ -static DEFINE_PCI_DEVICE_TABLE(amd_gpio_pci_tbl) = { - { PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_HUDSON2_SMBUS, PCI_ANY_ID, - PCI_ANY_ID, }, - { 0, }, -}; - -MODULE_DEVICE_TABLE(pci, amd_gpio_pci_tbl); - -static void amd_update_gpio_mask(void) -{ - u8 iomux_reg; - - /* - * Some of the GPIO pins have an alternate function assigned to - * them. That will be reflected in the corresponding IOMUX - * registers. If so, we mark these GPIO pins as reserved. - */ - - /* AGPIO10 */ - iomux_reg = ioread8((u8 *)amd_gpio_chip.iomuxbase + 0x0A); - if (((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC1) || - ((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC2) || - ((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC3)) - mask[10] = AMD_GPIO_MODE_RESV; - - /* EGPIO19 */ - iomux_reg = ioread8((u8 *)amd_gpio_chip.iomuxbase + 0x13); - if (((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC0) || - ((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC2) || - ((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC3)) - mask[19] = AMD_GPIO_MODE_RESV; - - /* EGPIO20 */ - iomux_reg = ioread8((u8 *)amd_gpio_chip.iomuxbase + 0x14); - if (((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC0) || - ((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC2) || - ((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC3)) - mask[20] = AMD_GPIO_MODE_RESV; - - /* EGPIO26 */ - iomux_reg = ioread8((u8 *)amd_gpio_chip.iomuxbase + 0x1A); - if (((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC0) || - ((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC2) || - ((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC3)) - mask[26] = AMD_GPIO_MODE_RESV; - - /* EGPIO27 */ - iomux_reg = ioread8((u8 *)amd_gpio_chip.iomuxbase + 0x1B); - if (((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC0) || - ((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC2) || - ((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC3)) - mask[27] = AMD_GPIO_MODE_RESV; - - /* EGPIO28 */ - iomux_reg = ioread8((u8 *)amd_gpio_chip.iomuxbase + 0x1C); - if (((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC0) || - ((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC2) || - ((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC3)) - mask[28] = AMD_GPIO_MODE_RESV; - - /* EGPIO29 */ - iomux_reg = ioread8((u8 *)amd_gpio_chip.iomuxbase + 0x1D); - if (((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC0) || - ((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC2) || - ((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC3)) - mask[29] = AMD_GPIO_MODE_RESV; - - /* EGPIO30 */ - iomux_reg = ioread8((u8 *)amd_gpio_chip.iomuxbase + 0x1E); - if (((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC0) || - ((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC2) || - ((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC3)) - mask[30] = AMD_GPIO_MODE_RESV; - - /* EGPIO31 */ - iomux_reg = ioread8((u8 *)amd_gpio_chip.iomuxbase + 0x1F); - if (((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC0) || - ((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC2) || - ((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC3)) - mask[31] = AMD_GPIO_MODE_RESV; - - /* EGPIO35 */ - iomux_reg = ioread8((u8 *)amd_gpio_chip.iomuxbase + 0x23); - if (((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC0) || - ((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC1) || - ((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC3)) - mask[35] = AMD_GPIO_MODE_RESV; - - /* AGPIO64 */ - iomux_reg = ioread8((u8 *)amd_gpio_chip.iomuxbase + 0x40); - if (((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC0) || - ((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC1) || - ((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC3)) - mask[64] = AMD_GPIO_MODE_RESV; - - /* AGPIO65 */ - iomux_reg = ioread8((u8 *)amd_gpio_chip.iomuxbase + 0x41); - if (((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC0) || - ((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC1) || - ((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC3)) - mask[65] = AMD_GPIO_MODE_RESV; - - /* AGPIO66 */ - iomux_reg = ioread8((u8 *)amd_gpio_chip.iomuxbase + 0x42); - if (((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC0) || - ((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC1) || - ((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC3)) - mask[66] = AMD_GPIO_MODE_RESV; - - /* AGPIO67 */ - iomux_reg = ioread8((u8 *)amd_gpio_chip.iomuxbase + 0x43); - if (((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC0) || - ((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC1) || - ((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC2)) - mask[67] = AMD_GPIO_MODE_RESV; - - /* AGPIO68 */ - iomux_reg = ioread8((u8 *)amd_gpio_chip.iomuxbase + 0x44); - if (((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC0) || - ((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC2) || - ((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC3)) - mask[68] = AMD_GPIO_MODE_RESV; - - /* AGPIO69 */ - iomux_reg = ioread8((u8 *)amd_gpio_chip.iomuxbase + 0x45); - if (((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC0) || - ((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC2) || - ((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC3)) - mask[68] = AMD_GPIO_MODE_RESV; - - /* AGPIO70 */ - iomux_reg = ioread8((u8 *)amd_gpio_chip.iomuxbase + 0x46); - if (((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC0) || - ((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC1) || - ((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC2)) - mask[70] = AMD_GPIO_MODE_RESV; - - /* AGPIO71 */ - iomux_reg = ioread8((u8 *)amd_gpio_chip.iomuxbase + 0x47); - if (((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC0) || - ((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC1) || - ((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC3)) - mask[71] = AMD_GPIO_MODE_RESV; - - /* AGPIO72 */ - iomux_reg = ioread8((u8 *)amd_gpio_chip.iomuxbase + 0x48); - if (((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC1) || - ((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC2) || - ((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC3)) - mask[72] = AMD_GPIO_MODE_RESV; - - /* AGPIO73 */ - iomux_reg = ioread8((u8 *)amd_gpio_chip.iomuxbase + 0x49); - if (((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC1) || - ((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC2) || - ((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC3)) - mask[73] = AMD_GPIO_MODE_RESV; - - /* AGPIO76 */ - iomux_reg = ioread8((u8 *)amd_gpio_chip.iomuxbase + 0x4C); - if (((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC1) || - ((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC2) || - ((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC3)) - mask[76] = AMD_GPIO_MODE_RESV; - - /* AGPIO77 */ - iomux_reg = ioread8((u8 *)amd_gpio_chip.iomuxbase + 0x4D); - if (((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC1) || - ((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC2) || - ((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC3)) - mask[77] = AMD_GPIO_MODE_RESV; - - /* EGPIO84 */ - iomux_reg = ioread8((u8 *)amd_gpio_chip.iomuxbase + 0x54); - if (((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC0) || - ((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC2) || - ((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC3)) - mask[84] = AMD_GPIO_MODE_RESV; - - /* EGPIO85 */ - iomux_reg = ioread8((u8 *)amd_gpio_chip.iomuxbase + 0x55); - if (((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC0) || - ((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC2) || - ((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC3)) - mask[85] = AMD_GPIO_MODE_RESV; - - /* EGPIO87 */ - iomux_reg = ioread8((u8 *)amd_gpio_chip.iomuxbase + 0x57); - if (((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC0) || - ((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC2) || - ((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC3)) - mask[87] = AMD_GPIO_MODE_RESV; - - /* EGPIO88 */ - iomux_reg = ioread8((u8 *)amd_gpio_chip.iomuxbase + 0x58); - if (((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC0) || - ((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC2) || - ((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC3)) - mask[88] = AMD_GPIO_MODE_RESV; - - /* AGPIO91 */ - iomux_reg = ioread8((u8 *)amd_gpio_chip.iomuxbase + 0x5B); - if (((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC0) || - ((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC2) || - ((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC3)) - mask[91] = AMD_GPIO_MODE_RESV; - - /* EGPIO93 */ - iomux_reg = ioread8((u8 *)amd_gpio_chip.iomuxbase + 0x5D); - if (((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC0) || - ((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC1) || - ((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC3)) - mask[93] = AMD_GPIO_MODE_RESV; - - /* EGPIO115 */ - iomux_reg = ioread8((u8 *)amd_gpio_chip.iomuxbase + 0x73); - if (((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC0) || - ((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC1) || - ((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC3)) - mask[115] = AMD_GPIO_MODE_RESV; - - /* EGPIO116 */ - iomux_reg = ioread8((u8 *)amd_gpio_chip.iomuxbase + 0x74); - if (((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC0) || - ((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC1) || - ((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC3)) - mask[116] = AMD_GPIO_MODE_RESV; - - /* AGPIO130 */ - iomux_reg = ioread8((u8 *)amd_gpio_chip.iomuxbase + 0x82); - if (((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC0) || - ((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC2) || - ((iomux_reg & AMD_IOMUX_GPIO_MASK) == AMD_IOMUX_ENABLE_FUNC3)) - mask[86] = AMD_GPIO_MODE_RESV; -} - -static int amd_gpio_init(struct platform_device *pdev) -{ - struct pci_dev *dev = NULL; - int i; - int err; - - /* Match the PCI device */ - for_each_pci_dev(dev) { - if (pci_match_id(amd_gpio_pci_tbl, dev) != NULL) { - amd_gpio_pci = dev; - break; - } - } - - if (!amd_gpio_pci) - return -ENODEV; - - /* GPIO registers range from AMD_GPIO_ACPIMMIO_BASE+1500h to - AMD_GPIO_ACPIMMIO_BASE+17FFh. */ - if (!request_mem_region_exclusive(AMD_GPIO_ACPIMMIO_BASE - + AMD_GPIO_BANK_OFFSET, AMD_GPIO_MEM_MAP_SIZE, "AMD GPIO")) { - pr_err("mmio address 0x%04x already in use\n", - AMD_GPIO_ACPIMMIO_BASE + AMD_GPIO_BANK_OFFSET ); - goto exit; - } - gpiobase_phys = AMD_GPIO_ACPIMMIO_BASE + AMD_GPIO_BANK_OFFSET; - - amd_gpio_chip.gpiobase = ioremap(gpiobase_phys, AMD_GPIO_MEM_MAP_SIZE); - if (!amd_gpio_chip.gpiobase) { - pr_err("failed to get gpiobase address\n"); - goto unreg_gpio_region; - } - - /* IOMUX Base Address starts from ACPI MMIO Base Address + 0xD00 */ - if (!request_mem_region_exclusive(AMD_GPIO_ACPIMMIO_BASE - + AMD_IOMUX_MEM_MAP_OFFSET, - AMD_IOMUX_MEM_MAP_SIZE, "AMD IOMUX")) { - pr_err("mmio address 0x%04x already in use\n", - AMD_GPIO_ACPIMMIO_BASE + AMD_IOMUX_MEM_MAP_OFFSET); - goto unmap_gpio_region; - } - iomuxbase_phys = AMD_GPIO_ACPIMMIO_BASE + AMD_IOMUX_MEM_MAP_OFFSET; - - amd_gpio_chip.iomuxbase = ioremap(iomuxbase_phys, - AMD_IOMUX_MEM_MAP_SIZE); - if (!amd_gpio_chip.iomuxbase) { - pr_err("failed to get iomuxbase address\n"); - goto unreg_iomux_region; - } - - /* Set up driver specific struct */ - amd_gpio_chip.pdev = pdev; - spin_lock_init(&amd_gpio_chip.lock); - - /* Register ourself with the GPIO core */ - err = gpiochip_add(&amd_gpio_chip.gpio); - if (err) - goto unmap_iomux_region; - - /* - * Lets take care of special GPIO pins, and mark them as reserved - * as appropriate. - */ - amd_update_gpio_mask(); - - /* - * If the number of GPIO pins provided during module loading does - * not match the number of GPIO modes, we fall back to the default - * mask. - */ - if (num_mask == num_modes) { - /* - * If the number of masks or the number of modes specified - * is more than the maximum number of GPIO pins supported - * by the driver, we set the limit to the one supported - * driver. - */ - if (num_mask > AMD_GPIO_NUM_PINS) - num_mask = num_modes = AMD_GPIO_NUM_PINS; - - /* - * The default mask is our de facto standard. The GPIO - * pins marked reserved in the default mask stay reserved - * no matter what the module load parameter says. Also, we - * set the mode of the GPIO pins depending on the value - * of gpio_mode provided. - */ - for (i = 0; i < num_mask; i++) { - if (mask[gpio_mask[i]] != AMD_GPIO_MODE_RESV) { - mask[gpio_mask[i]] = gpio_mode[i]; - - /* - * gpio_request() can fail, in which case we - * won't set the GPIO modes. - */ - if(!gpio_request(gpio_mask[i], DRV_NAME)) { - if (gpio_mode[i] == - AMD_GPIO_MODE_INPUT) - gpio_direction_input(gpio_mask[i]); - else if (gpio_mode[i] == - AMD_GPIO_MODE_OUTPUT) - gpio_direction_output(gpio_mask[i], - 0); - - gpio_free(gpio_mask[i]); - } - } - } - } - - return 0; - -unmap_iomux_region: - iounmap(amd_gpio_chip.iomuxbase); -unreg_iomux_region: - release_mem_region(iomuxbase_phys, AMD_IOMUX_MEM_MAP_SIZE); -unmap_gpio_region: - iounmap(amd_gpio_chip.gpiobase); -unreg_gpio_region: - release_mem_region(gpiobase_phys, AMD_GPIO_MEM_MAP_SIZE); -exit: - return -ENODEV; -} - -static int amd_gpio_remove(struct platform_device *pdev) -{ - gpiochip_remove(&amd_gpio_chip.gpio); - iounmap(amd_gpio_chip.iomuxbase); - release_mem_region(iomuxbase_phys, AMD_IOMUX_MEM_MAP_SIZE); - iounmap(amd_gpio_chip.gpiobase); - release_mem_region(gpiobase_phys, AMD_GPIO_MEM_MAP_SIZE); - - return 0; -} - -static struct platform_driver amd_gpio_driver = { - .probe = amd_gpio_init, - .remove = amd_gpio_remove, - .driver = { - .owner = THIS_MODULE, - .name = GPIO_MODULE_NAME, - }, -}; - -/* interface to debug driver for gpio */ - -static int amd_gpio_swctrlen(int offset, int value) -{ - struct amd_gpio_chip *chip = &amd_gpio_chip; - u32 gpio_reg; - unsigned long flags; - - spin_lock_irqsave(&chip->lock, flags); - - /* If the mask says the pin should be GPO, we return from here */ - if (mask[offset] == AMD_GPIO_MODE_RESV) { - pr_info("GPIO %u is reserved\n", offset); - spin_unlock_irqrestore(&chip->lock, flags); - return -EINVAL; - } - - if (mask[offset] == AMD_GPIO_MODE_OUTPUT) { - pr_info("GPIO %u can only be set in output mode\n", offset); - spin_unlock_irqrestore(&chip->lock, flags); - return -EINVAL; - } - - gpio_reg = ioread32((u32 *)amd_gpio_chip.gpiobase + offset); - /* Disable output by set the bit to 0 */ - gpio_reg &= ~AMD_GPIO_OUTPUT_ENABLE; - /* enable or disable sw input */ - if(value) - gpio_reg |= AMD_GPIO_SWCTRL_EN; - else - gpio_reg &= ~AMD_GPIO_SWCTRL_EN; - - iowrite32(gpio_reg, ((u32 *)amd_gpio_chip.gpiobase + offset)); - - spin_unlock_irqrestore(&chip->lock, flags); - - return 0; -} - -static int amd_gpio_swctrlin(int offset, int value) -{ - struct amd_gpio_chip *chip = &amd_gpio_chip; - u32 gpio_reg; - unsigned long flags; - - spin_lock_irqsave(&chip->lock, flags); - /* If the mask says the pin should be GPO, we return from here */ - if (mask[offset] == AMD_GPIO_MODE_RESV) { - pr_info("GPIO %u is reserved\n", offset); - spin_unlock_irqrestore(&chip->lock, flags); - return -EINVAL; - } - - if (mask[offset] == AMD_GPIO_MODE_OUTPUT) { - pr_info("GPIO %u can only be set in input mode\n", offset); - spin_unlock_irqrestore(&chip->lock, flags); - return -EINVAL; - } - - gpio_reg = ioread32((u32 *)amd_gpio_chip.gpiobase + offset); - /* Disable output by set the bit to 0 */ - gpio_reg &= ~AMD_GPIO_OUTPUT_ENABLE; - /* enable or disable sw input */ - if(value) - gpio_reg |= AMD_GPIO_SWCTRL_IN; - else - gpio_reg &= ~AMD_GPIO_SWCTRL_IN; - - iowrite32(gpio_reg, ((u32 *)amd_gpio_chip.gpiobase + offset)); - spin_unlock_irqrestore(&chip->lock, flags); - - return 0; -} - - -static int gpio_test_open(struct inode *inode, struct file *filp) -{ - struct gpio_test_dev *dev; /* device information */ - - dev = container_of(inode->i_cdev, struct gpio_test_dev, cdev); - filp->private_data = dev; /* for other methods */ - - return 0; /* success */ -} - -static int gpio_test_release(struct inode *inode, struct file *filp) -{ - return 0; -} - -static long gpio_test_ioctl(struct file *filp, - unsigned cmd, unsigned long arg) -{ - - debug_data tmp; - unsigned long retval = 0; - - /* Check type and command number */ - if (_IOC_TYPE(cmd) != GPIO_TEST_IOC_MAGIC) - return -ENOTTY; - - retval = copy_from_user(&tmp, (void __user *)arg, sizeof(debug_data)); - if(retval != 0) - return 0; - - switch(cmd) { - case GPIO_IOC_SWCTRLIN: - retval = amd_gpio_swctrlin(tmp.offset,tmp.value); - break; - case GPIO_IOC_SWCTRLEN: - retval = amd_gpio_swctrlen(tmp.offset,tmp.value); - break; - default: - return -ENOTTY; - } - - return retval; -} - -struct file_operations gpio_test_fops = { - .owner = THIS_MODULE, - .unlocked_ioctl = gpio_test_ioctl, - .open = gpio_test_open, - .release = gpio_test_release, -}; - - -static int __init amd_gpio_init_module(void) -{ - int err; - dev_t dev = 0; - struct device *gpio_device = 0; - - pr_info("AMD GPIO Driver v%s\n", GPIO_VERSION); - - err = platform_driver_register(&amd_gpio_driver); - if (err) - return err; - - err = alloc_chrdev_region(&dev, dev_minor, 1,"gpio_test_driver"); - if (err < 0) { - printk(KERN_WARNING " can't get major %d\n", dev_major); - goto unreg_platform_driver; - } - - gpio_test_dev.gpio_class = class_create(THIS_MODULE, "gpio_test_driver"); - if (IS_ERR(gpio_test_dev.gpio_class)) { - printk(" error in class create \n"); - goto unregister_test_driver; - } - - dev_major = MAJOR(dev); - - gpio_device = device_create(gpio_test_dev.gpio_class, NULL, dev, NULL, - "gpio_test_driver"); - if (IS_ERR(gpio_device)) { - printk(" error in device create \n"); - goto destroy_class; - } - - cdev_init(&gpio_test_dev.cdev, &gpio_test_fops); - err = cdev_add (&gpio_test_dev.cdev, dev, 1); - if(err) - goto destroy_device; - - amd_gpio_platform_device = platform_device_register_simple( - GPIO_MODULE_NAME, -1, NULL, 0); - if (IS_ERR(amd_gpio_platform_device)) { - err = PTR_ERR(amd_gpio_platform_device); - goto cdev_delete; - } - - return 0; - -cdev_delete: - cdev_del(&gpio_test_dev.cdev); -destroy_device: - device_destroy(gpio_test_dev.gpio_class, dev); -destroy_class: - class_destroy(gpio_test_dev.gpio_class); -unregister_test_driver: - unregister_chrdev_region(dev, 1); -unreg_platform_driver: - platform_driver_unregister(&amd_gpio_driver); - return err; -} - -static void __exit amd_gpio_cleanup_module(void) -{ - dev_t dev = MKDEV(dev_major, dev_minor); - - device_destroy(gpio_test_dev.gpio_class, dev); - class_destroy(gpio_test_dev.gpio_class); - cdev_del(&gpio_test_dev.cdev); - unregister_chrdev_region(dev, 1); - platform_device_unregister(amd_gpio_platform_device); - platform_driver_unregister(&amd_gpio_driver); - pr_info("AMD GPIO Module Unloaded\n"); -} - -module_init(amd_gpio_init_module); -module_exit(amd_gpio_cleanup_module); - - - -MODULE_AUTHOR("Sudheesh Mavila <sudheesh.mavila@amd.com>"); -MODULE_DESCRIPTION("GPIO driver for AMD chipsets"); -MODULE_LICENSE("Dual BSD/GPL"); diff --git a/meta-steppeeagle/recipes-kernel/amd-gpio/files/gpio-amd.h b/meta-steppeeagle/recipes-kernel/amd-gpio/files/gpio-amd.h deleted file mode 100644 index 5574ef53..00000000 --- a/meta-steppeeagle/recipes-kernel/amd-gpio/files/gpio-amd.h +++ /dev/null @@ -1,85 +0,0 @@ -#ifndef _AMD_GPIO_H_ -#define _AMD_GPIO_H_ - -#include <linux/types.h> - -/* Module and version information */ -#define GPIO_VERSION "0.1" -#define GPIO_MODULE_NAME "AMD GPIO" -#define GPIO_DRIVER_NAME GPIO_MODULE_NAME ", v" GPIO_VERSION - -#define DRV_NAME "amd-gpio" - -/* GPIO register definitions */ -#define AMD_GPIO_ACPIMMIO_BASE 0xFED80000 -#define AMD_GPIO_BANK_OFFSET 0x1500 -#define AMD_GPIO_MEM_MAP_SIZE 0x300 -#define AMD_GPIO_MSWITCH 63 - -#define AMD_IOMUX_MEM_MAP_OFFSET 0x0D00 -#define AMD_IOMUX_MEM_MAP_SIZE 0x100 - -#define AMD_PM_IOPORTS_SIZE 0x02 - -/* IO port address for indirect access using the ACPI PM registers */ -#define AMD_IO_PM_INDEX_REG 0xCD6 -#define AMD_IO_PM_DATA_REG 0xCD7 - -#define AMD_GPIO_NUM_PINS 184 - -#define AMD_GPIO_DEB_TIMEOUT0 (0) /* debouncing logic disabled */ -#define AMD_GPIO_DEB_TIMEOUT1 (1) -#define AMD_GPIO_DEB_TIMEOUT_MASK (7) -#define AMD_GPIO_DEB_TIMEOUTUNIT (1 << 4) -#define AMD_GPIO_DEB_CTRL (3 << 5) -#define AMD_GPIO_LEVL_TRG (1 << 8) /* 0 - edge , 1 level */ -#define AMD_GPIO_ACTIVE_LEVEL (3 << 9) -#define AMD_GPIO_INTERPT_ENABLE (3 << 11) -#define AMD_GPIO_WAKECTRL (7 << 13) -#define AMD_GPIO_GET_INPUT (1 << 16) -#define AMD_GPIO_DRV_STRENGTH(x) (((x) & 3) << 17) -#define AMD_GPIO_PULLUP_SEL (1 << 19) -#define AMD_GPIO_PULLUP_ENABLE (1 << 20) -#define AMD_GPIO_PULLDN_ENABLE (1 << 21) -#define AMD_GPIO_SET_OUTPUT (1 << 22) -#define AMD_GPIO_OUTPUT_ENABLE (1 << 23) -#define AMD_GPIO_SWCTRL_IN (1 << 24) -#define AMD_GPIO_SWCTRL_EN (1 << 25) -#define AMD_GPIO_INTERPT_STATUS (1 << 28) -#define AMD_GPIO_WAKE_STATUS (1 << 29) - -#define AMD_GPIO_WAKE_EN (1 << 31) -#define AMD_GPIO_INTERRUPT_EN (1 << 30) - -#define AMD_IOMUX_ENABLE_FUNC0 0x0 -#define AMD_IOMUX_ENABLE_FUNC1 0x1 -#define AMD_IOMUX_ENABLE_FUNC2 0x2 -#define AMD_IOMUX_ENABLE_FUNC3 0x3 -#define AMD_IOMUX_GPIO_MASK 0x03 - -#define AMD_PM_GPIO_BASE0 0x24 -#define AMD_PM_GPIO_BASE1 0x25 -#define AMD_PM_GPIO_BASE2 0x26 -#define AMD_PM_GPIO_BASE3 0x27 - - - - -/* GPIO pin mode definitions */ -#define AMD_GPIO_MODE_RESV 0 /* Reserved */ -#define AMD_GPIO_MODE_ANY 1 /* Either input or output */ -#define AMD_GPIO_MODE_INPUT 2 /* GPI */ -#define AMD_GPIO_MODE_OUTPUT 3 /* GPO */ - -/* IOCTL numbers */ - -typedef struct { - int offset; - int value; -}debug_data; - -#define GPIO_TEST_IOC_MAGIC 'k' -#define GPIO_IOC_SWCTRLIN _IOW(GPIO_TEST_IOC_MAGIC, 1, debug_data) -#define GPIO_IOC_SWCTRLEN _IOW(GPIO_TEST_IOC_MAGIC, 2, debug_data) - -#endif /* _AMD_GPIO_H_ */ diff --git a/meta-steppeeagle/recipes-kernel/amd-spi/amd-spi_1.0.bb b/meta-steppeeagle/recipes-kernel/amd-spi/amd-spi_1.0.bb deleted file mode 100644 index 17b299ee..00000000 --- a/meta-steppeeagle/recipes-kernel/amd-spi/amd-spi_1.0.bb +++ /dev/null @@ -1,16 +0,0 @@ -DESCRIPTION = "This kernel module provides support for AMD SPI controller driver" -LICENSE = "BSD | GPLv2" -LIC_FILES_CHKSUM = "file://spi_amd.c;endline=29;md5=8e7a9706367d146e5073510a6e176dc2" - -inherit module - -SRC_URI = "file://Makefile \ - file://spi_amd.c \ - file://spi_amd.h \ - file://spirom.c \ - file://spirom.h \ - " - -S = "${WORKDIR}" - -# The inherit of module.bbclass will take care of the rest diff --git a/meta-steppeeagle/recipes-kernel/amd-spi/files/Makefile b/meta-steppeeagle/recipes-kernel/amd-spi/files/Makefile deleted file mode 100644 index f778a69a..00000000 --- a/meta-steppeeagle/recipes-kernel/amd-spi/files/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -obj-m := spi_amd.o spirom.o - -SRC := $(shell pwd) - -all: - $(MAKE) -C $(KERNEL_SRC) M=$(SRC) - -modules_install: - $(MAKE) -C $(KERNEL_SRC) M=$(SRC) modules_install - -clean: - rm -f *.o *~ core .depend .*.cmd *.ko *.mod.c - rm -f Module.markers Module.symvers modules.order - rm -rf .tmp_versions Modules.symvers diff --git a/meta-steppeeagle/recipes-kernel/amd-spi/files/spi_amd.c b/meta-steppeeagle/recipes-kernel/amd-spi/files/spi_amd.c deleted file mode 100644 index 52e1b1a5..00000000 --- a/meta-steppeeagle/recipes-kernel/amd-spi/files/spi_amd.c +++ /dev/null @@ -1,475 +0,0 @@ -/***************************************************************************** -* -* Copyright (c) 2014, Advanced Micro Devices, Inc. -* All rights reserved. -* -* 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 Advanced Micro Devices, Inc. nor the names of -* its contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* 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 ADVANCED MICRO DEVICES, INC. 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/init.h> -#include <linux/module.h> -#include <linux/pci.h> -#include <linux/spi/spi.h> -#include <linux/kthread.h> - -#include "spi_amd.h" - -struct amd_platform_data { - u8 chip_select; -}; - -struct amd_spi { - void __iomem *io_remap_addr; - unsigned long io_base_addr; - u32 rom_addr; - struct spi_master *master; - struct amd_platform_data controller_data; - struct task_struct *kthread_spi; - struct list_head msg_queue; - wait_queue_head_t wq; -}; - -static struct pci_device_id amd_spi_pci_device_id[] = { - { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_LPC_BRIDGE) }, - {} -}; -MODULE_DEVICE_TABLE(pci, amd_spi_pci_device_id); - -static inline u8 amd_spi_readreg8(struct spi_master *master, int idx) -{ - struct amd_spi *amd_spi = spi_master_get_devdata(master); - - return ioread8((u8 *)amd_spi->io_remap_addr + idx); -} - -static inline void amd_spi_writereg8(struct spi_master *master, int idx, - u8 val) -{ - struct amd_spi *amd_spi = spi_master_get_devdata(master); - - iowrite8(val, ((u8 *)amd_spi->io_remap_addr + idx)); -} - -static inline void amd_spi_setclear_reg8(struct spi_master *master, int idx, - u8 set, u8 clear) -{ - u8 tmp = amd_spi_readreg8(master, idx); - tmp = (tmp & ~clear) | set; - amd_spi_writereg8(master, idx, tmp); -} - -static inline u32 amd_spi_readreg32(struct spi_master *master, int idx) -{ - struct amd_spi *amd_spi = spi_master_get_devdata(master); - - return ioread32((u8 *)amd_spi->io_remap_addr + idx); -} - -static inline void amd_spi_writereg32(struct spi_master *master, int idx, - u32 val) -{ - struct amd_spi *amd_spi = spi_master_get_devdata(master); - - iowrite32(val, ((u8 *)amd_spi->io_remap_addr + idx)); -} - -static inline void amd_spi_setclear_reg32(struct spi_master *master, int idx, - u32 set, u32 clear) -{ - u32 tmp = amd_spi_readreg32(master, idx); - tmp = (tmp & ~clear) | set; - amd_spi_writereg32(master, idx, tmp); -} - -static void amd_spi_select_chip(struct spi_master *master) -{ - struct amd_spi *amd_spi = spi_master_get_devdata(master); - u8 chip_select = amd_spi->controller_data.chip_select; - - amd_spi_setclear_reg8(master, AMD_SPI_ALT_CS_REG, chip_select, - AMD_SPI_ALT_CS_MASK); -} - - -static void amd_spi_clear_fifo_ptr(struct spi_master *master) -{ - amd_spi_setclear_reg32(master, AMD_SPI_CTRL0_REG, AMD_SPI_FIFO_CLEAR, - AMD_SPI_FIFO_CLEAR); -} - -static void amd_spi_set_opcode(struct spi_master *master, u8 cmd_opcode) -{ - amd_spi_setclear_reg32(master, AMD_SPI_CTRL0_REG, cmd_opcode, - AMD_SPI_OPCODE_MASK); -} - -static inline void amd_spi_set_rx_count(struct spi_master *master, - u8 rx_count) -{ - amd_spi_setclear_reg8(master, AMD_SPI_RX_COUNT_REG, rx_count, 0xff); -} - -static inline void amd_spi_set_tx_count(struct spi_master *master, - u8 tx_count) -{ - amd_spi_setclear_reg8(master, AMD_SPI_TX_COUNT_REG, tx_count, 0xff); -} - -static void amd_spi_execute_opcode(struct spi_master *master) -{ - struct amd_spi *amd_spi = spi_master_get_devdata(master); - bool spi_busy; - - /* Set ExecuteOpCode bit in the CTRL0 register */ - amd_spi_setclear_reg32(master, AMD_SPI_CTRL0_REG, AMD_SPI_EXEC_CMD, - AMD_SPI_EXEC_CMD); - - /* poll for SPI bus to become idle */ - spi_busy = (ioread32((u8 *)amd_spi->io_remap_addr + - AMD_SPI_CTRL0_REG) & AMD_SPI_BUSY) == AMD_SPI_BUSY; - while (spi_busy) { - set_current_state(TASK_INTERRUPTIBLE); - schedule(); - set_current_state(TASK_RUNNING); - spi_busy = (ioread32((u8 *)amd_spi->io_remap_addr + - AMD_SPI_CTRL0_REG) & AMD_SPI_BUSY) == AMD_SPI_BUSY; - } -} - -/* Helper function */ -#ifdef CONFIG_SPI_DEBUG -static void amd_spi_dump_reg(struct spi_master *master) -{ - struct amd_spi *amd_spi = spi_master_get_devdata(master); - - printk(KERN_DEBUG DRIVER_NAME ": SPI CTRL 0 registers: 0x%.8x\n", - ioread32((u8 *)amd_spi->io_remap_addr + AMD_SPI_CTRL0_REG)); - /* - * We cannot read CTRL1 register, because reading it would - * inadvertently increment the FIFO pointer. - */ - printk(KERN_DEBUG DRIVER_NAME ": SPI ALT CS registers: 0x%.2x\n", - ioread8((u8 *)amd_spi->io_remap_addr + AMD_SPI_ALT_CS_REG)); - printk(KERN_DEBUG DRIVER_NAME ": SPI Tx Byte Count: 0x%.2x\n", - ioread8((u8 *)amd_spi->io_remap_addr + AMD_SPI_TX_COUNT_REG)); - printk(KERN_DEBUG DRIVER_NAME ": SPI Rx Byte Count: 0x%.2x\n", - ioread8((u8 *)amd_spi->io_remap_addr + AMD_SPI_RX_COUNT_REG)); - printk(KERN_DEBUG DRIVER_NAME ": SPI Status registers: 0x%.8x\n", - ioread32((u8 *)amd_spi->io_remap_addr + AMD_SPI_STATUS_REG)); -} -#else -static void amd_spi_dump_reg(struct spi_master *master) {} -#endif - - -static int amd_spi_master_setup(struct spi_device *spi) -{ - struct spi_master *master = spi->master; - struct amd_spi *amd_spi = spi_master_get_devdata(master); - - amd_spi->controller_data.chip_select = spi->chip_select; - - amd_spi_select_chip(master); - - return 0; -} - -static int amd_spi_master_transfer(struct spi_master *master, - struct spi_message *msg) -{ - struct amd_spi *amd_spi = spi_master_get_devdata(master); - - /* - * Add new message to the queue and let the kernel thread know - * about it. - */ - list_add_tail(&msg->queue, &amd_spi->msg_queue); - wake_up_interruptible(&amd_spi->wq); - - return 0; -} -static int amd_spi_thread(void *t) -{ - struct amd_spi *amd_spi = t; - struct spi_master *master = amd_spi->master; - struct spi_transfer *transfer = NULL; - struct spi_message *message = NULL; - int direction = 0,i = 0,saved_index = 0; - int opcode_found = 0,recv_flag = 0,tx_len = 0,rx_len = 0; - u8 cmd_opcode = 0; - u8 *buffer = NULL; - - /* - * What we do here is actually pretty simple. We pick one message - * at a time from the message queue set up by the controller, and - * then process all the spi_transfers of that spi_message in one go. - * We then remove the message from the queue, and complete the - * transaction. This might not be the best approach, but this is how - * we chose to implement this. Note that out SPI controller has FIFO - * size of 70 bytes, but we consider it to contain a maximum of - * 64-bytes of data and 3-bytes of address. - */ - while (1) { - /* - * Let us wait on a wait queue till the message queue is empty. - */ - wait_event_interruptible(amd_spi->wq, - !list_empty(&amd_spi->msg_queue)); - - /* stop condition */ - if (kthread_should_stop()) { - set_current_state(TASK_RUNNING); - break; - } - - /* - * Else, pull the very first message from the queue and process - * all transfers within that message. And process the messages - * in a pure linear fashion. We also remove the spi_message - * from the queue. - */ - message = list_entry(amd_spi->msg_queue.next, - struct spi_message, queue); - list_del_init(&message->queue); - - /* We store the CS# line to be used for this spi_message */ - amd_spi->controller_data.chip_select = - message->spi->chip_select; - - /* Setting all variables to default value. */ - direction = i = 0; - opcode_found = 0; - recv_flag = tx_len = rx_len = 0; - cmd_opcode = 0; - buffer = NULL; - saved_index = 0; - - amd_spi_select_chip(master); - - /* - * This loop extracts spi_transfers from the spi message, - * programs the command into command register. Pointer variable - * *buffer* points to either tx_buf or rx_buf of spi_transfer - * depending on direction of transfer. Also programs FIFO of - * controller if data has to be transmitted. - */ - list_for_each_entry(transfer, &message->transfers, - transfer_list) - { - if(transfer->rx_buf != NULL) - direction = RECEIVE; - else if(transfer->tx_buf != NULL) - direction = TRANSMIT; - - switch (direction) { - case TRANSMIT: - buffer = (u8 *)transfer->tx_buf; - - if(opcode_found != 1) { - /* Store no. of bytes to be sent into - * FIFO */ - tx_len = transfer->len - 1; - /* Store opcode */ - cmd_opcode = *(u8 *)transfer->tx_buf; - /* Pointing to start of TX data */ - buffer++; - /* Program the command register*/ - amd_spi_set_opcode(master, cmd_opcode); - opcode_found = 1; - } else { - /* Store no. of bytes to be sent into - * FIFO */ - tx_len = transfer->len; - } - - /* Write data into the FIFO. */ - for (i = 0; i < tx_len; i++) { - iowrite8(buffer[i], - ((u8 *)amd_spi->io_remap_addr + - AMD_SPI_FIFO_BASE + - i + saved_index)); - } - - /* Set no. of bytes to be transmitted */ - amd_spi_set_tx_count(master, - tx_len + saved_index); - - /* - * Saving the index, from where next - * spi_transfer's data will be stored in FIFO. - */ - saved_index = i; - break; - case RECEIVE: - /* Store no. of bytes to be received from - * FIFO */ - rx_len = transfer->len; - buffer = (u8 *)transfer->rx_buf; - recv_flag=1; - break; - } - } - - /* Set the RX count to the number of bytes to expect in - * response */ - amd_spi_set_rx_count(master, rx_len ); - amd_spi_clear_fifo_ptr(master); - amd_spi_dump_reg(master); - /* Executing command */ - amd_spi_execute_opcode(master); - amd_spi_dump_reg(master); - - if(recv_flag == 1) { - /* Read data from FIFO to receive buffer */ - for (i = 0; i < rx_len; i++) { - buffer[i] = ioread8((u8 *)amd_spi->io_remap_addr - + AMD_SPI_FIFO_BASE - + tx_len + i); - } - - recv_flag = 0; - } - - /* Update statistics */ - message->actual_length = tx_len + rx_len + 1 ; - /* complete the transaction */ - message->status = 0; - spi_finalize_current_message(master); - } - - return 0; -} - -static int amd_spi_pci_probe(struct pci_dev *pdev, - const struct pci_device_id *id) -{ - struct device *dev = &pdev->dev; - struct spi_master *master; - struct amd_spi *amd_spi; - u32 io_base_addr; - int err = 0; - - /* Allocate storage for spi_master and driver private data */ - master = spi_alloc_master(dev, sizeof(struct amd_spi)); - if (master == NULL) { - dev_err(dev, "Error allocating SPI master\n"); - return -ENOMEM; - } - - amd_spi = spi_master_get_devdata(master); - amd_spi->master = master; - - /* - * Lets first get the base address of SPI registers. The SPI Base - * Address is stored at offset 0xA0 into the LPC PCI configuration - * space. As per the specification, it is stored at bits 6:31 of the - * register. The address is aligned at 64-byte boundary, - * so we should just mask the lower 6 bits and get the address. - */ - pci_read_config_dword(pdev, AMD_PCI_LPC_SPI_BASE_ADDR_REG, - &io_base_addr); - amd_spi->io_base_addr = io_base_addr & AMD_SPI_BASE_ADDR_MASK; - amd_spi->io_remap_addr = ioremap_nocache(amd_spi->io_base_addr, - AMD_SPI_MEM_SIZE); - if (amd_spi->io_remap_addr == NULL) { - dev_err(dev, "ioremap of SPI registers failed\n"); - err = -ENOMEM; - goto err_free_master; - } - dev_dbg(dev, "io_base_addr: 0x%.8lx, io_remap_address: %p\n", - amd_spi->io_base_addr, amd_spi->io_remap_addr); - INIT_LIST_HEAD(&amd_spi->msg_queue); - init_waitqueue_head(&amd_spi->wq); - amd_spi->kthread_spi = kthread_run(amd_spi_thread, amd_spi, - "amd_spi_thread"); - - /* Now lets initialize the fields of spi_master */ - master->bus_num = 0; /* - * This should be the same as passed in - * spi_board_info structure - */ - master->num_chipselect = 4; /* Can be overwritten later during setup */ - master->mode_bits = 0; - master->flags = 0; - master->setup = amd_spi_master_setup; - master->transfer_one_message = amd_spi_master_transfer; - /* Register the controller with SPI framework */ - err = spi_register_master(master); - if (err) { - dev_err(dev, "error registering SPI controller\n"); - goto err_iounmap; - } - pci_set_drvdata(pdev, amd_spi); - - return 0; - -err_iounmap: - iounmap(amd_spi->io_remap_addr); -err_free_master: - spi_master_put(master); - - return 0; -} - -static void amd_spi_pci_remove(struct pci_dev *pdev) -{ - struct amd_spi *amd_spi = pci_get_drvdata(pdev); - - kthread_stop(amd_spi->kthread_spi); - iounmap(amd_spi->io_remap_addr); - spi_unregister_master(amd_spi->master); - spi_master_put(amd_spi->master); - pci_set_drvdata(pdev, NULL); -} - -static struct pci_driver amd_spi_pci_driver = { - .name = "amd_spi", - .id_table = amd_spi_pci_device_id, - .probe = amd_spi_pci_probe, - .remove = amd_spi_pci_remove, -}; - -static int __init amd_spi_init(void) -{ - int ret; - - pr_info("AMD SPI Driver v%s\n", SPI_VERSION); - - ret = pci_register_driver(&amd_spi_pci_driver); - if (ret) - return ret; - - return 0; -} -module_init(amd_spi_init); - -static void __exit amd_spi_exit(void) -{ - pci_unregister_driver(&amd_spi_pci_driver); -} -module_exit(amd_spi_exit); - -MODULE_LICENSE("Dual BSD/GPL"); -MODULE_AUTHOR("Arindam Nath <arindam.nath@amd.com>"); -MODULE_DESCRIPTION("AMD SPI Master Controller Driver"); diff --git a/meta-steppeeagle/recipes-kernel/amd-spi/files/spi_amd.h b/meta-steppeeagle/recipes-kernel/amd-spi/files/spi_amd.h deleted file mode 100644 index 21fa972f..00000000 --- a/meta-steppeeagle/recipes-kernel/amd-spi/files/spi_amd.h +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef SPI_AMD_H -#define SPI_AMD_H - -#define DRIVER_NAME "spi_amd" -#define SPI_VERSION "1.0" - -#define AMD_SPI_CTRL0_REG 0x00 - #define AMD_SPI_EXEC_CMD (0x1 << 16) - #define AMD_SPI_OPCODE_MASK 0xFF - #define AMD_SPI_FIFO_CLEAR (0x1 << 20) - #define AMD_SPI_BUSY (0x1 << 31) -#define AMD_SPI_ALT_CS_REG 0x1D - #define AMD_SPI_ALT_CS_MASK 0x3 -#define AMD_SPI_FIFO_BASE 0x80 -#define AMD_SPI_TX_COUNT_REG 0x48 -#define AMD_SPI_RX_COUNT_REG 0x4B -#define AMD_SPI_STATUS_REG 0x4C - -#define AMD_PCI_LPC_SPI_BASE_ADDR_REG 0xA0 -#define AMD_SPI_BASE_ADDR_MASK ~0x3F -#define AMD_SPI_MEM_SIZE 200 - -#define PCI_DEVICE_ID_AMD_LPC_BRIDGE 0x780E - -#define TRANSMIT 1 -#define RECEIVE 2 - -#endif /* SPI_AMD_H */ diff --git a/meta-steppeeagle/recipes-kernel/amd-spi/files/spirom.c b/meta-steppeeagle/recipes-kernel/amd-spi/files/spirom.c deleted file mode 100644 index f3701291..00000000 --- a/meta-steppeeagle/recipes-kernel/amd-spi/files/spirom.c +++ /dev/null @@ -1,534 +0,0 @@ -/***************************************************************************** -* -* spirom.c - SPI ROM client driver -* -* Copyright (c) 2014, Advanced Micro Devices, Inc. -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation; either version 2 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -* -***************************************************************************/ -#include <linux/init.h> -#include <linux/module.h> -#include <linux/ioctl.h> -#include <linux/fs.h> -#include <linux/device.h> -#include <linux/err.h> -#include <linux/list.h> -#include <linux/errno.h> -#include <linux/mutex.h> -#include <linux/slab.h> -#include <linux/spi/spi.h> -#include <linux/amd_imc.h> -#include <asm/uaccess.h> - -#include "spirom.h" - -#define SPIROM_VERSION "0.1" - -/* - * SPI has a character major number assigned. We allocate minor numbers - * dynamically using a bitmask. You must use hotplug tools, such as udev - * (or mdev with busybox) to create and destroy the /dev/spiromB.C device - * nodes, since there is no fixed association of minor numbers with any - * particular SPI bus or device. - */ -#define SPIROM_MAJOR 153 /* assigned */ -#define N_SPI_MINORS 32 /* ... up to 256 */ - -#define SPI_BUS 0 -#define SPI_BUS_CS1 0 - -static unsigned long minors[N_SPI_MINORS / BITS_PER_LONG]; - - -struct spirom_data { - dev_t devt; - spinlock_t spi_lock; - struct spi_device *spi; - struct list_head device_entry; - struct completion done; - - struct mutex buf_lock; - unsigned users; -}; - -static LIST_HEAD(device_list); -static DEFINE_MUTEX(device_list_lock); - -/*-------------------------------------------------------------------------*/ - -/* - * We can't use the standard synchronous wrappers for file I/O; we - * need to protect against async removal of the underlying spi_device. - */ -static void spirom_complete(void *arg) -{ - complete(arg); -} - -static ssize_t -spirom_sync(struct spirom_data *spirom, struct spi_message *message) -{ - int status; - - message->complete = spirom_complete; - message->context = &spirom->done; - - spin_lock_irq(&spirom->spi_lock); - if (spirom->spi == NULL) - status = -ESHUTDOWN; - else - status = spi_async(spirom->spi, message); - spin_unlock_irq(&spirom->spi_lock); - - if (status == 0) { - /* - * There might be cases where the controller driver has been - * unloaded in the middle of a transaction. So we might end up - * in a situation where we will be waiting for an event which - * will never happen. So we provide a timeout of 1 second for - * situations like this. - */ - wait_for_completion_timeout(&spirom->done, HZ); - status = message->status; - if (status == 0) - status = message->actual_length; - } - return status; -} - -static int spirom_message(struct spirom_data *spirom, - struct spi_ioc_transfer *u_trans, unsigned long arg) -{ - struct spi_message msg; - struct spi_transfer *transfer; - u8 *buffer; - int status = u_trans->len; - - buffer = u_trans->buf; - spi_message_init(&msg); - - /* The very first spi_transfer will contain the command only */ - transfer = kzalloc(sizeof(struct spi_transfer), GFP_KERNEL); - if (!transfer) - return -ENOMEM; - - transfer->tx_buf = buffer; - transfer->len = 1; - buffer += transfer->len; - spi_message_add_tail(transfer, &msg); - - /* - * If the command expects an address as its argument, we populate - * it in the very next spi_transfer. - */ - if (u_trans->addr_present) { - transfer = kzalloc(sizeof(struct spi_transfer), GFP_KERNEL); - if (!transfer) - return -ENOMEM; - - transfer->tx_buf = buffer; - transfer->len = 3; // 3-byte address - buffer += transfer->len; - spi_message_add_tail(transfer, &msg); - } - - /* - * Next is data, which can have a maximum of 64-bytes, the size limited - * by the number of bytes that can stored in the controller FIFO. - */ - if (u_trans->len) { - transfer = kzalloc(sizeof(struct spi_transfer), GFP_KERNEL); - if (!transfer) - return -ENOMEM; - - if (u_trans->direction == TRANSMIT) - transfer->tx_buf = buffer; - else if (u_trans->direction == RECEIVE) - transfer->rx_buf = buffer; - - transfer->len = u_trans->len; - /* No need to increment buffer pointer */ - spi_message_add_tail(transfer, &msg); - } - - status = spirom_sync(spirom, &msg); - - if (u_trans->direction == RECEIVE) { - /* - * The received data should have been populated in - * u_trans->buf, so we just need to copy it into the - * user-space buffer. - */ - buffer = u_trans->buf; - if (u_trans->addr_present) { - buffer += 4; // 1-byte command and 3-byte address - if(__copy_to_user((u8 __user *) - (((struct spi_ioc_transfer *)arg)->buf) + 4, - buffer, u_trans->len)) { - status = -EFAULT; - } - } else { - buffer += 1; // 1-byte command only - if(__copy_to_user((u8 __user *) - (((struct spi_ioc_transfer *)arg)->buf) + 1, - buffer, u_trans->len)) { - status = -EFAULT; - } - } - } - - /* Done with everything, free the memory taken by spi_transfer */ - while (msg.transfers.next != &msg.transfers) { - transfer = list_entry(msg.transfers.next, struct spi_transfer, - transfer_list); - msg.transfers.next = transfer->transfer_list.next; - transfer->transfer_list.next->prev = &msg.transfers; - kfree(transfer); - } - - return status; -} - -static long -spirom_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) -{ - int err = 0; - int retval = 0; - struct spirom_data *spirom; - struct spi_device *spi; - u32 tmp; - struct spi_ioc_transfer *ioc; - - /* Check type and command number */ - if (_IOC_TYPE(cmd) != SPI_IOC_MAGIC) - return -ENOTTY; - - /* Check access direction once here; don't repeat below. - * IOC_DIR is from the user perspective, while access_ok is - * from the kernel perspective; so they look reversed. - */ - if (_IOC_DIR(cmd) & _IOC_READ) - err = !access_ok(VERIFY_WRITE, - (void __user *)arg, _IOC_SIZE(cmd)); - if (err == 0 && _IOC_DIR(cmd) & _IOC_WRITE) - err = !access_ok(VERIFY_READ, - (void __user *)arg, _IOC_SIZE(cmd)); - if (err) - return -EFAULT; - - /* guard against device removal before, or while, - * we issue this ioctl. - */ - spirom = filp->private_data; - spin_lock_irq(&spirom->spi_lock); - spi = spi_dev_get(spirom->spi); - spin_unlock_irq(&spirom->spi_lock); - - if (spi == NULL) - return -ESHUTDOWN; - - /* use the buffer lock here for triple duty: - * - prevent I/O (from us) so calling spi_setup() is safe; - * - prevent concurrent SPI_IOC_WR_* from morphing - * data fields while SPI_IOC_RD_* reads them; - * - SPI_IOC_MESSAGE needs the buffer locked "normally". - */ - mutex_lock(&spirom->buf_lock); - - /* segmented and/or full-duplex I/O request */ - if (_IOC_NR(cmd) != _IOC_NR(SPI_IOC_MESSAGE(0)) || - _IOC_DIR(cmd) !=_IOC_WRITE) { - retval = -ENOTTY; - goto out; - } - - tmp = sizeof(struct spi_ioc_transfer); - - /* copy into scratch area */ - ioc = kzalloc(tmp, GFP_KERNEL); - if (!ioc) { - retval = -ENOMEM; - goto out; - } - if (__copy_from_user(ioc, (struct spi_ioc_transfer __user *)arg, - tmp)) { - kfree(ioc); - retval = -EFAULT; - goto out; - } - - /* translate to spi_message, execute */ - retval = spirom_message(spirom, ioc, arg); - kfree(ioc); - -out: - mutex_unlock(&spirom->buf_lock); - spi_dev_put(spi); - return retval; -} - -static int spirom_open(struct inode *inode, struct file *filp) -{ - struct spirom_data *spirom; - int status = -ENXIO; - - mutex_lock(&device_list_lock); - - list_for_each_entry(spirom, &device_list, device_entry) { - if (spirom->devt == inode->i_rdev) { - status = 0; - break; - } - } - if (status == 0) { - if (status == 0) { - spirom->users++; - filp->private_data = spirom; - nonseekable_open(inode, filp); - } - } else - pr_debug("spirom: nothing for minor %d\n", iminor(inode)); - - mutex_unlock(&device_list_lock); - - /* - * In case IMC is enabled, we need to inform IMC to stop - * fetching code from the BIOS ROM. We will inform IMC when - * it is safe to start fetching from ROM again once we are - * done with our SPI transactions. - */ - amd_imc_enter_scratch_ram(); - - return status; -} - -static int spirom_release(struct inode *inode, struct file *filp) -{ - struct spirom_data *spirom; - int status = 0; - - mutex_lock(&device_list_lock); - spirom = filp->private_data; - filp->private_data = NULL; - - /* last close? */ - spirom->users--; - if (!spirom->users) { - int dofree; - - /* ... after we unbound from the underlying device? */ - spin_lock_irq(&spirom->spi_lock); - dofree = (spirom->spi == NULL); - spin_unlock_irq(&spirom->spi_lock); - - if (dofree) - kfree(spirom); - } - mutex_unlock(&device_list_lock); - - /* - * In case IMC is enabled, we would have instructed IMC to stop - * fetching from ROM BIOS earlier in the code path. Now that we - * are done, we can safely inform IMC to start fetching from ROM - * again. - */ - amd_imc_exit_scratch_ram(); - - return status; -} - -static const struct file_operations spirom_fops = { - .owner = THIS_MODULE, - .unlocked_ioctl = spirom_ioctl, - .open = spirom_open, - .release = spirom_release, -}; - -static int __init add_spi_device_to_bus(void) -{ - struct spi_master *spi_master; - struct spi_device *spi_device; - struct spi_board_info spi_info; - - spi_master = spi_busnum_to_master(SPI_BUS); - if (!spi_master) { - printk(KERN_ALERT "Please make sure to \'modprobe " - "spi_amd\' driver first\n"); - return -1; - } - memset(&spi_info, 0, sizeof(struct spi_board_info)); - - strlcpy(spi_info.modalias, "spirom", SPI_NAME_SIZE); - spi_info.bus_num = SPI_BUS; //Bus number of SPI master - spi_info.chip_select = SPI_BUS_CS1; //CS on which SPI device is connected - - spi_device = spi_new_device(spi_master, &spi_info); - if (!spi_device) - return -ENODEV; - - return 0; -} - -/*-------------------------------------------------------------------------*/ - -/* The main reason to have this class is to make mdev/udev create the - * /dev/spiromB.C character device nodes exposing our userspace API. - * It also simplifies memory management. - */ - -static struct class *spirom_class; - -/*-------------------------------------------------------------------------*/ - -static int spirom_probe(struct spi_device *spi) -{ - struct spirom_data *spirom; - int status; - unsigned long minor; - - /* Allocate driver data */ - spirom = kzalloc(sizeof(*spirom), GFP_KERNEL); - if (!spirom) - return -ENOMEM; - - /* Initialize the driver data */ - spirom->spi = spi; - spin_lock_init(&spirom->spi_lock); - mutex_init(&spirom->buf_lock); - - INIT_LIST_HEAD(&spirom->device_entry); - init_completion(&spirom->done); - - /* If we can allocate a minor number, hook up this device. - * Reusing minors is fine so long as udev or mdev is working. - */ - mutex_lock(&device_list_lock); - minor = find_first_zero_bit(minors, N_SPI_MINORS); - if (minor < N_SPI_MINORS) { - struct device *dev; - - spirom->devt = MKDEV(SPIROM_MAJOR, minor); - dev = device_create(spirom_class, &spi->dev, spirom->devt, - spirom, "spirom%d.%d", - spi->master->bus_num, spi->chip_select); - status = IS_ERR(dev) ? PTR_ERR(dev) : 0; - } else { - dev_dbg(&spi->dev, "no minor number available!\n"); - status = -ENODEV; - } - if (status == 0) { - set_bit(minor, minors); - list_add(&spirom->device_entry, &device_list); - } - mutex_unlock(&device_list_lock); - - if (status == 0) - spi_set_drvdata(spi, spirom); - else - kfree(spirom); - - return status; -} - -static int spirom_remove(struct spi_device *spi) -{ - struct spirom_data *spirom = spi_get_drvdata(spi); - - /* make sure ops on existing fds can abort cleanly */ - spin_lock_irq(&spirom->spi_lock); - spirom->spi = NULL; - spi_set_drvdata(spi, NULL); - spin_unlock_irq(&spirom->spi_lock); - - /* prevent new opens */ - mutex_lock(&device_list_lock); - list_del(&spirom->device_entry); - clear_bit(MINOR(spirom->devt), minors); - device_destroy(spirom_class, spirom->devt); - if (spirom->users == 0) - kfree(spirom); - mutex_unlock(&device_list_lock); - - return 0; -} - -static struct spi_driver spirom_spi = { - .driver = { - .name = "spirom", - .owner = THIS_MODULE, - }, - .probe = spirom_probe, - .remove = spirom_remove, - - /* NOTE: suspend/resume methods are not necessary here. - * We don't do anything except pass the requests to/from - * the underlying controller. The refrigerator handles - * most issues; the controller driver handles the rest. - */ -}; - -/*-------------------------------------------------------------------------*/ - -static int __init spirom_init(void) -{ - int status; - - pr_info("AMD SPIROM Driver v%s\n", SPIROM_VERSION); - - /* Claim our 256 reserved device numbers. Then register a class - * that will key udev/mdev to add/remove /dev nodes. Last, register - * the driver which manages those device numbers. - */ - BUILD_BUG_ON(N_SPI_MINORS > 256); - status = register_chrdev(SPIROM_MAJOR, "spi", &spirom_fops); - if (status < 0) - return status; - - spirom_class = class_create(THIS_MODULE, "spirom"); - if (IS_ERR(spirom_class)) { - unregister_chrdev(SPIROM_MAJOR, spirom_spi.driver.name); - return PTR_ERR(spirom_class); - } - - status = spi_register_driver(&spirom_spi); - if (status < 0) { - class_destroy(spirom_class); - unregister_chrdev(SPIROM_MAJOR, spirom_spi.driver.name); - } - - status = add_spi_device_to_bus(); - if (status < 0) { - spi_unregister_driver(&spirom_spi); - class_destroy(spirom_class); - unregister_chrdev(SPIROM_MAJOR, spirom_spi.driver.name); - } - - return status; -} -module_init(spirom_init); - -static void __exit spirom_exit(void) -{ - spi_unregister_driver(&spirom_spi); - class_destroy(spirom_class); - unregister_chrdev(SPIROM_MAJOR, spirom_spi.driver.name); -} -module_exit(spirom_exit); - -MODULE_AUTHOR("Arindam Nath <arindam.nath@amd.com>"); -MODULE_DESCRIPTION("User mode SPI ROM interface"); -MODULE_LICENSE("GPL v2"); -MODULE_ALIAS("spi:spirom"); diff --git a/meta-steppeeagle/recipes-kernel/amd-spi/files/spirom.h b/meta-steppeeagle/recipes-kernel/amd-spi/files/spirom.h deleted file mode 100644 index 941b357a..00000000 --- a/meta-steppeeagle/recipes-kernel/amd-spi/files/spirom.h +++ /dev/null @@ -1,53 +0,0 @@ -#ifndef SPIROM_H -#define SPIROM_H - -#include <linux/types.h> - -/*---------------------------------------------------------------------------*/ - -/* IOCTL commands */ - -#define SPI_IOC_MAGIC 'k' - -#define TRANSMIT 1 -#define RECEIVE 2 - -/* - * struct spi_ioc_transfer - interface structure between application and ioctl - * - * @buf: Buffer to hold 1-byte command, 3-bytes address, and 64-byte data for - * transmit or receive. The internal FIFO of our controller can hold a - * maximum of 70 bytes, including the address. But here we assume the - * maximum data excluding address to be 64-bytes long. - * - * @direction: Direction of data transfer, either TRANSMIT or RECEIVE. - * - * @len: Length of data excluding command and address. - * - * @addr_present: Flag to indicate whether 'buf' above contains an address. - */ -struct spi_ioc_transfer { - __u8 buf[64 + 1 + 3]; - __u8 direction; - __u8 len; - __u8 addr_present; -}; - -/* not all platforms use <asm-generic/ioctl.h> or _IOC_TYPECHECK() ... */ -#define SPI_MSGSIZE(N) \ - ((((N)*(sizeof (struct spi_ioc_transfer))) < (1 << _IOC_SIZEBITS)) \ - ? ((N)*(sizeof (struct spi_ioc_transfer))) : 0) -#define SPI_IOC_MESSAGE(N) _IOW(SPI_IOC_MAGIC, 0, char[SPI_MSGSIZE(N)]) - -/* SPI ROM command codes */ -#define ROM_WREN 0x06 -#define ROM_WRDI 0x04 -#define ROM_RDSR 0x05 -#define ROM_RDID 0x9F -#define ROM_CHIP_ERASE 0x60 -#define ROM_SECTOR_ERASE 0x20 -#define ROM_BLOCK_ERASE 0xD8 -#define ROM_READ 0x03 -#define ROM_WRITE 0x02 - -#endif /* SPIROM_H */ diff --git a/meta-steppeeagle/recipes-kernel/amd-wdt/amd-wdt_1.0.bb b/meta-steppeeagle/recipes-kernel/amd-wdt/amd-wdt_1.0.bb deleted file mode 100644 index edaecf5a..00000000 --- a/meta-steppeeagle/recipes-kernel/amd-wdt/amd-wdt_1.0.bb +++ /dev/null @@ -1,14 +0,0 @@ -DESCRIPTION = "This kernel module provides support for AMD Watchdog driver" -LICENSE = "BSD | GPLv2" -LIC_FILES_CHKSUM = "file://amd_wdt.c;endline=29;md5=8e7a9706367d146e5073510a6e176dc2" - -inherit module - -SRC_URI = "file://Makefile \ - file://amd_wdt.c \ - file://amd_wdt.h \ - " - -S = "${WORKDIR}" - -# The inherit of module.bbclass will take care of the rest diff --git a/meta-steppeeagle/recipes-kernel/amd-wdt/files/Makefile b/meta-steppeeagle/recipes-kernel/amd-wdt/files/Makefile deleted file mode 100644 index 36b32f87..00000000 --- a/meta-steppeeagle/recipes-kernel/amd-wdt/files/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -obj-m := amd_wdt.o - -SRC := $(shell pwd) - -all: - $(MAKE) -C $(KERNEL_SRC) M=$(SRC) - -modules_install: - $(MAKE) -C $(KERNEL_SRC) M=$(SRC) modules_install - -clean: - rm -f *.o *~ core .depend .*.cmd *.ko *.mod.c - rm -f Module.markers Module.symvers modules.order - rm -rf .tmp_versions Modules.symvers diff --git a/meta-steppeeagle/recipes-kernel/amd-wdt/files/amd_wdt.c b/meta-steppeeagle/recipes-kernel/amd-wdt/files/amd_wdt.c deleted file mode 100644 index 26da1736..00000000 --- a/meta-steppeeagle/recipes-kernel/amd-wdt/files/amd_wdt.c +++ /dev/null @@ -1,518 +0,0 @@ -/***************************************************************************** -* -* Copyright (c) 2014, Advanced Micro Devices, Inc. -* All rights reserved. -* -* 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 Advanced Micro Devices, Inc. nor the names of -* its contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* 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 ADVANCED MICRO DEVICES, INC. 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. -* -* -***************************************************************************/ -#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - -#include <linux/module.h> -#include <linux/moduleparam.h> -#include <linux/types.h> -#include <linux/miscdevice.h> -#include <linux/watchdog.h> -#include <linux/init.h> -#include <linux/fs.h> -#include <linux/pci.h> -#include <linux/ioport.h> -#include <linux/platform_device.h> -#include <linux/uaccess.h> -#include <linux/io.h> - -#include "amd_wdt.h" - -/* internal variables */ -static u32 wdtbase_phys; -static void __iomem *wdtbase; -static DEFINE_SPINLOCK(wdt_lock); -static unsigned int bootstatus; -static unsigned long status; -static struct pci_dev *amd_wdt_pci; - -/* watchdog platform device */ -static struct platform_device *amd_wdt_platform_device; - -/* module parameters */ -static int heartbeat = WATCHDOG_HEARTBEAT; -module_param(heartbeat, int, 0); -MODULE_PARM_DESC(heartbeat, "Watchdog heartbeat in frequency units. " - "(default=" __MODULE_STRING(WATCHDOG_HEARTBEAT) ")"); - -static char frequency[MAX_LENGTH] = "1s"; -module_param_string(frequency, frequency, MAX_LENGTH, 0); -MODULE_PARM_DESC(frequency, "Watchdog timer frequency units (32us, " - "10ms, 100ms, 1s). (default=1s)"); - -static bool nowayout = WATCHDOG_NOWAYOUT; -module_param(nowayout, bool, 0); -MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started" - " (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); - -static char action[MAX_LENGTH] = "reboot"; -module_param_string(action, action, MAX_LENGTH, 0); -MODULE_PARM_DESC(action, "Watchdog action (reboot/shutdown). (default=reboot) "); - -/* - * Watchdog specific functions - */ -static int amd_wdt_timer_set_heartbeat(unsigned int t) -{ - unsigned long flags; - - /* - * In case the user inputs out of range timeout, we set it to the - * maximum timeout possible. - */ - if ((t == 0) || (t > 0xffff)) - heartbeat = t = 0xffff; - - /* Write new timeout value to watchdog */ - spin_lock_irqsave(&wdt_lock, flags); - writel(t, AMD_WDT_COUNT(wdtbase)); - spin_unlock_irqrestore(&wdt_lock, flags); - - heartbeat = t; - - return 0; -} - -static void amd_wdt_timer_activate(void) -{ - u32 val; - unsigned long flags; - - /* Enable the watchdog timer */ - spin_lock_irqsave(&wdt_lock, flags); - - val = readl(AMD_WDT_CONTROL(wdtbase)); - val |= AMD_WDT_START_STOP_BIT; - writel(val, AMD_WDT_CONTROL(wdtbase)); - - set_bit(AMD_WDOG_ACTIVE, &status); - - spin_unlock_irqrestore(&wdt_lock, flags); -} - -static void amd_wdt_timer_deactivate(void) -{ - u32 val; - unsigned long flags; - - /* Disable the watchdog timer */ - spin_lock_irqsave(&wdt_lock, flags); - - val = readl(AMD_WDT_CONTROL(wdtbase)); - val &= ~AMD_WDT_START_STOP_BIT; - writel(val, AMD_WDT_CONTROL(wdtbase)); - - clear_bit(AMD_WDOG_ACTIVE, &status); - - spin_unlock_irqrestore(&wdt_lock, flags); -} - -static void amd_wdt_timer_keepalive(void) -{ - u32 val; - unsigned long flags; - - /* Trigger watchdog */ - spin_lock_irqsave(&wdt_lock, flags); - - val = readl(AMD_WDT_CONTROL(wdtbase)); - val |= AMD_WDT_TRIGGER_BIT; - writel(val, AMD_WDT_CONTROL(wdtbase)); - - spin_unlock_irqrestore(&wdt_lock, flags); -} - -static unsigned int amd_wdt_timer_get_timeleft(void) -{ - u32 val; - unsigned long flags; - - spin_lock_irqsave(&wdt_lock, flags); - val = readl(AMD_WDT_COUNT(wdtbase)); - spin_unlock_irqrestore(&wdt_lock, flags); - - /* Mask out the upper 16-bits and return */ - return val & AMD_WDT_COUNT_MASK; -} - -static int amd_wdt_timer_open(struct inode *inode, struct file *file) -{ - /* /dev/watchdog can only be opened once */ - if (test_and_set_bit(AMD_WDOG_DEV_OPEN, &status)) - return -EBUSY; - - /* Start the watchdog timer and ping it once */ - amd_wdt_timer_activate(); - amd_wdt_timer_keepalive(); - - return nonseekable_open(inode, file); -} - -static int amd_wdt_timer_release(struct inode *inode, struct file *file) -{ - if (test_and_clear_bit(AMD_WDOG_ALLOW_RELEASE, &status)) { - amd_wdt_timer_deactivate(); - } else { - pr_crit("Unexpected close, not stopping watchdog!\n"); - amd_wdt_timer_keepalive(); - } - - clear_bit(AMD_WDOG_DEV_OPEN, &status); - - return 0; -} - -static ssize_t amd_wdt_timer_write(struct file *file, const char __user *data, - size_t len, loff_t *ppos) -{ - /* See if we got the magic character 'V' and reload the timer */ - if (len) { - if (!nowayout) { - size_t i; - - clear_bit(AMD_WDOG_ALLOW_RELEASE, &status); - - /* - * parse user buffer to see if we received magic - * character 'V'. - */ - for (i = 0; i != len; i++) { - char c; - - if (get_user(c, data + i)) - return -EFAULT; - - if (c == 'V') - set_bit(AMD_WDOG_ALLOW_RELEASE, &status); - } - } - - /* Reload the timer */ - amd_wdt_timer_keepalive(); - } - - return len; -} - -static long amd_wdt_timer_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) -{ - int new_options, retval = -EINVAL; - int new_heartbeat; - int timeleft; - void __user *argp = (void __user *)arg; - int __user *p = argp; - static const struct watchdog_info ident = { - .options = WDIOF_SETTIMEOUT | - WDIOF_KEEPALIVEPING | - WDIOF_MAGICCLOSE, - .firmware_version = 0, - .identity = WDT_MODULE_NAME, - }; - - switch (cmd) { - case WDIOC_GETSUPPORT: - return copy_to_user(argp, &ident, - sizeof(ident)) ? -EFAULT : 0; - case WDIOC_GETSTATUS: - return put_user(status, p); - case WDIOC_GETBOOTSTATUS: - return put_user(bootstatus, p); - case WDIOC_SETOPTIONS: - if (get_user(new_options, p)) - return -EFAULT; - if (new_options & WDIOS_DISABLECARD) { - amd_wdt_timer_deactivate(); - retval = 0; - } - if (new_options & WDIOS_ENABLECARD) { - amd_wdt_timer_activate(); - amd_wdt_timer_keepalive(); - retval = 0; - } - return retval; - case WDIOC_KEEPALIVE: - amd_wdt_timer_keepalive(); - return 0; - case WDIOC_SETTIMEOUT: - if (get_user(new_heartbeat, p)) - return -EFAULT; - if (amd_wdt_timer_set_heartbeat(new_heartbeat)) - return -EINVAL; - amd_wdt_timer_keepalive(); - /* Fall through */ - case WDIOC_GETTIMEOUT: - return put_user(heartbeat, p); - case WDIOC_GETTIMELEFT: - timeleft = amd_wdt_timer_get_timeleft(); - return put_user(timeleft, p); - default: - return -ENOTTY; - } -} - -/* Watchdog timer file operations structure */ -static const struct file_operations amd_wdt_fops = { - .owner = THIS_MODULE, - .llseek = no_llseek, - .write = amd_wdt_timer_write, - .unlocked_ioctl = amd_wdt_timer_ioctl, - .open = amd_wdt_timer_open, - .release = amd_wdt_timer_release, -}; - -static struct miscdevice amd_wdt_miscdev = { - .minor = WATCHDOG_MINOR, - .name = "watchdog", - .fops = &amd_wdt_fops, -}; - -/* - * The PCI Device ID table below is used to identify the platform - * the driver is supposed to work for. Since this is a platform - * device, we need a way for us to be able to find the correct - * platform when the driver gets loaded, otherwise we should - * bail out. - */ -static DEFINE_PCI_DEVICE_TABLE(amd_wdt_pci_tbl) = { - { PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_HUDSON2_SMBUS, PCI_ANY_ID, - PCI_ANY_ID, }, - { 0, }, -}; -MODULE_DEVICE_TABLE(pci, amd_wdt_pci_tbl); - -static unsigned char amd_wdt_setupdevice(void) -{ - struct pci_dev *dev = NULL; - u32 val; - - /* Match the PCI device */ - for_each_pci_dev(dev) { - if (pci_match_id(amd_wdt_pci_tbl, dev) != NULL) { - amd_wdt_pci = dev; - break; - } - } - - if (!amd_wdt_pci) - return 0; - - /* Watchdog Base Address starts from ACPI MMIO Base Address + 0xB00 */ - wdtbase_phys = AMD_ACPI_MMIO_BASE + AMD_WDT_MEM_MAP_OFFSET; - if (!request_mem_region_exclusive(wdtbase_phys, AMD_WDT_MEM_MAP_SIZE, - "AMD Watchdog")) { - pr_err("mmio address 0x%04x already in use\n", wdtbase_phys); - goto exit; - } - - wdtbase = ioremap(wdtbase_phys, AMD_WDT_MEM_MAP_SIZE); - if (!wdtbase) { - pr_err("failed to get wdtbase address\n"); - goto unreg_mem_region; - } - - /* Enable watchdog timer and decode bit */ - outb(AMD_PM_WATCHDOG_EN_REG, AMD_IO_PM_INDEX_REG); - val = inb(AMD_IO_PM_DATA_REG); - val |= AMD_PM_WATCHDOG_TIMER_EN; - outb(val, AMD_IO_PM_DATA_REG); - - /* Set the watchdog timer resolution */ - outb(AMD_PM_WATCHDOG_CONFIG_REG, AMD_IO_PM_INDEX_REG); - val = inb(AMD_IO_PM_DATA_REG); - /* Clear the previous frequency setting, if any */ - val &= ~AMD_PM_WATCHDOG_CONFIG_MASK; - - /* - * Now set the frequency depending on the module load parameter. - * In case the user passes an invalid argument, we consider the - * frequency to be of 1 second resolution. - */ - if (strncmp(frequency, "32us", 4) == 0) - val |= AMD_PM_WATCHDOG_32USEC_RES; - else if (strncmp(frequency, "10ms", 4) == 0) - val |= AMD_PM_WATCHDOG_10MSEC_RES; - else if (strncmp(frequency, "100ms", 5) == 0) - val |= AMD_PM_WATCHDOG_100MSEC_RES; - else { - val |= AMD_PM_WATCHDOG_1SEC_RES; - if (strncmp(frequency, "1s", 2) != 0) - strncpy(frequency, "1s", 2); - } - - outb(val, AMD_IO_PM_DATA_REG); - - /* Set the watchdog action depending on module load parameter. */ - val = readl(AMD_WDT_CONTROL(wdtbase)); - - /* - * If action is specified anything other than reboot or shutdown, - * we default it to reboot. - */ - if (strncmp(action, "shutdown", 8) == 0) - val |= AMD_WDT_ACTION_RESET_BIT; - else { - val &= ~AMD_WDT_ACTION_RESET_BIT; - /* The statement below is required for when the action - * is set anything other than reboot. - */ - if (strncmp(action, "reboot", 6) != 0) - strncpy(action, "reboot", 6); - } - - writel(val, AMD_WDT_CONTROL(wdtbase)); - - return 1; - -unreg_mem_region: - release_mem_region(wdtbase_phys, AMD_WDT_MEM_MAP_SIZE); -exit: - return 0; -} - -static int amd_wdt_init(struct platform_device *dev) -{ - int ret; - u32 val; - - /* Identify our device and initialize watchdog hardware */ - if (!amd_wdt_setupdevice()) - return -ENODEV; - - /* Check to see if last reboot was due to watchdog timeout */ - val = readl(AMD_WDT_CONTROL(wdtbase)); - if (val & AMD_WDT_FIRED_BIT) - bootstatus |= WDIOF_CARDRESET; - else - bootstatus &= ~WDIOF_CARDRESET; - - pr_info("Watchdog reboot %sdetected\n", - (val & AMD_WDT_FIRED_BIT) ? "" : "not "); - - /* Clear out the old status */ - val |= AMD_WDT_FIRED_BIT; - writel(val, AMD_WDT_CONTROL(wdtbase)); - - /* Set Watchdog timeout */ - amd_wdt_timer_set_heartbeat(heartbeat); - - ret = misc_register(&amd_wdt_miscdev); - if (ret != 0) { - pr_err("Watchdog timer: cannot register miscdevice on minor=" - "%d (err=%d)\n", WATCHDOG_MINOR, ret); - goto exit; - } - - clear_bit(AMD_WDOG_DEV_OPEN, &status); - if (nowayout) - set_bit(AMD_WDOG_NO_WAY_OUT, &status); - - pr_info("initialized (0x%p). (heartbeat=%d units) (frequency=%s) " - "(nowayout=%d) (action=%s)\n", wdtbase, heartbeat, frequency, - nowayout, action); - - return 0; - -exit: - iounmap(wdtbase); - release_mem_region(wdtbase_phys, AMD_WDT_MEM_MAP_SIZE); - return ret; -} - -static void amd_wdt_cleanup(void) -{ - /* Stop the timer before we leave */ - if (!nowayout) - amd_wdt_timer_deactivate(); - - misc_deregister(&amd_wdt_miscdev); - iounmap(wdtbase); - release_mem_region(wdtbase_phys, AMD_WDT_MEM_MAP_SIZE); -} - -static int amd_wdt_remove(struct platform_device *dev) -{ - if (wdtbase) - amd_wdt_cleanup(); - - return 0; -} - -static void amd_wdt_shutdown(struct platform_device *dev) -{ - amd_wdt_timer_deactivate(); -} - -static struct platform_driver amd_wdt_driver = { - .probe = amd_wdt_init, - .remove = amd_wdt_remove, - .shutdown = amd_wdt_shutdown, - .driver = { - .owner = THIS_MODULE, - .name = WDT_MODULE_NAME, - }, -}; - -static int __init amd_wdt_init_module(void) -{ - int err; - - pr_info("AMD WatchDog Timer Driver v%s\n", WDT_VERSION); - - err = platform_driver_register(&amd_wdt_driver); - if (err) - return err; - - amd_wdt_platform_device = platform_device_register_simple( - WDT_MODULE_NAME, -1, NULL, 0); - if (IS_ERR(amd_wdt_platform_device)) { - err = PTR_ERR(amd_wdt_platform_device); - goto unreg_platform_driver; - } - - return 0; - -unreg_platform_driver: - platform_driver_unregister(&amd_wdt_driver); - return err; -} - -static void __exit amd_wdt_cleanup_module(void) -{ - platform_device_unregister(amd_wdt_platform_device); - platform_driver_unregister(&amd_wdt_driver); - pr_info("AMD Watchdog Module Unloaded\n"); -} - -module_init(amd_wdt_init_module); -module_exit(amd_wdt_cleanup_module); - -MODULE_AUTHOR("Arindam Nath <arindam.nath@amd.com>"); -MODULE_DESCRIPTION("Watchdog timer driver for AMD chipsets"); -MODULE_LICENSE("Dual BSD/GPL"); diff --git a/meta-steppeeagle/recipes-kernel/amd-wdt/files/amd_wdt.h b/meta-steppeeagle/recipes-kernel/amd-wdt/files/amd_wdt.h deleted file mode 100644 index 116f370a..00000000 --- a/meta-steppeeagle/recipes-kernel/amd-wdt/files/amd_wdt.h +++ /dev/null @@ -1,49 +0,0 @@ -#ifndef _AMD_WDT_H_ -#define _AMD_WDT_H_ - -/* Module and version information */ -#define WDT_VERSION "0.1" -#define WDT_MODULE_NAME "AMD watchdog timer" -#define WDT_DRIVER_NAME WDT_MODULE_NAME ", v" WDT_VERSION - -#define WATCHDOG_HEARTBEAT 60 /* 60 units default heartbeat. */ -#define MAX_LENGTH (8 + 1) /* shutdown has 8 characters + NULL character */ - -/* Watchdog register definitions */ -#define AMD_ACPI_MMIO_BASE 0xFED80000 -#define AMD_WDT_MEM_MAP_OFFSET 0xB00 -#define AMD_WDT_MEM_MAP_SIZE 0x100 - -#define AMD_WDT_CONTROL(base) ((base) + 0x00) /* Watchdog Control */ - #define AMD_WDT_START_STOP_BIT (1 << 0) - #define AMD_WDT_FIRED_BIT (1 << 1) - #define AMD_WDT_ACTION_RESET_BIT (1 << 2) - #define AMD_WDT_DISABLE_BIT (1 << 3) - /* 6:4 bits Reserved */ - #define AMD_WDT_TRIGGER_BIT (1 << 7) -#define AMD_WDT_COUNT(base) ((base) + 0x04) /* Watchdog Count */ - #define AMD_WDT_COUNT_MASK 0xFFFF - -#define AMD_PM_WATCHDOG_EN_REG 0x00 - #define AMD_PM_WATCHDOG_TIMER_EN (0x01 << 7) - -#define AMD_PM_WATCHDOG_CONFIG_REG 0x03 - #define AMD_PM_WATCHDOG_32USEC_RES 0x0 - #define AMD_PM_WATCHDOG_10MSEC_RES 0x1 - #define AMD_PM_WATCHDOG_100MSEC_RES 0x2 - #define AMD_PM_WATCHDOG_1SEC_RES 0x3 -#define AMD_PM_WATCHDOG_CONFIG_MASK 0x3 - -/* IO port address for indirect access using ACPI PM registers */ -#define AMD_IO_PM_INDEX_REG 0xCD6 -#define AMD_IO_PM_DATA_REG 0xCD7 - -#define AMD_ACPI_MMIO_ADDR_MASK ~0x1FFF - -/* Watchdog device status */ -#define AMD_WDOG_ACTIVE 0 /* Is the watchdog running/active */ -#define AMD_WDOG_DEV_OPEN 1 /* Opended via /dev/watchdog */ -#define AMD_WDOG_ALLOW_RELEASE 2 /* Did we receive the magic char? */ -#define AMD_WDOG_NO_WAY_OUT 3 /* Is 'nowayout' feature set? */ - -#endif /* _AMD_WDT_H_ */ diff --git a/meta-steppeeagle/recipes-kernel/linux-firmware/radeon-firmware.bbappend b/meta-steppeeagle/recipes-kernel/linux-firmware/radeon-firmware.bbappend deleted file mode 100644 index 8ded8f45..00000000 --- a/meta-steppeeagle/recipes-kernel/linux-firmware/radeon-firmware.bbappend +++ /dev/null @@ -1,11 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:" - -SRC_URI_append_steppeeagle = "file://mullins_ce.bin \ - file://mullins_me.bin \ - file://mullins_mec.bin \ - file://mullins_pfp.bin \ - file://mullins_rlc.bin \ - file://mullins_sdma1.bin \ - file://mullins_sdma.bin \ - file://mullins_uvd.bin \ - file://mullins_vce.bin" diff --git a/meta-steppeeagle/recipes-kernel/linux-firmware/radeon-firmware/mullins_ce.bin b/meta-steppeeagle/recipes-kernel/linux-firmware/radeon-firmware/mullins_ce.bin Binary files differdeleted file mode 100644 index c2c0f4a0..00000000 --- a/meta-steppeeagle/recipes-kernel/linux-firmware/radeon-firmware/mullins_ce.bin +++ /dev/null diff --git a/meta-steppeeagle/recipes-kernel/linux-firmware/radeon-firmware/mullins_me.bin b/meta-steppeeagle/recipes-kernel/linux-firmware/radeon-firmware/mullins_me.bin Binary files differdeleted file mode 100644 index 1e2406a7..00000000 --- a/meta-steppeeagle/recipes-kernel/linux-firmware/radeon-firmware/mullins_me.bin +++ /dev/null diff --git a/meta-steppeeagle/recipes-kernel/linux-firmware/radeon-firmware/mullins_mec.bin b/meta-steppeeagle/recipes-kernel/linux-firmware/radeon-firmware/mullins_mec.bin Binary files differdeleted file mode 100644 index e16efdb2..00000000 --- a/meta-steppeeagle/recipes-kernel/linux-firmware/radeon-firmware/mullins_mec.bin +++ /dev/null diff --git a/meta-steppeeagle/recipes-kernel/linux-firmware/radeon-firmware/mullins_pfp.bin b/meta-steppeeagle/recipes-kernel/linux-firmware/radeon-firmware/mullins_pfp.bin Binary files differdeleted file mode 100644 index b3b4c60a..00000000 --- a/meta-steppeeagle/recipes-kernel/linux-firmware/radeon-firmware/mullins_pfp.bin +++ /dev/null diff --git a/meta-steppeeagle/recipes-kernel/linux-firmware/radeon-firmware/mullins_rlc.bin b/meta-steppeeagle/recipes-kernel/linux-firmware/radeon-firmware/mullins_rlc.bin Binary files differdeleted file mode 100644 index 0279be19..00000000 --- a/meta-steppeeagle/recipes-kernel/linux-firmware/radeon-firmware/mullins_rlc.bin +++ /dev/null diff --git a/meta-steppeeagle/recipes-kernel/linux-firmware/radeon-firmware/mullins_sdma.bin b/meta-steppeeagle/recipes-kernel/linux-firmware/radeon-firmware/mullins_sdma.bin Binary files differdeleted file mode 100644 index 77b6d9da..00000000 --- a/meta-steppeeagle/recipes-kernel/linux-firmware/radeon-firmware/mullins_sdma.bin +++ /dev/null diff --git a/meta-steppeeagle/recipes-kernel/linux-firmware/radeon-firmware/mullins_sdma1.bin b/meta-steppeeagle/recipes-kernel/linux-firmware/radeon-firmware/mullins_sdma1.bin Binary files differdeleted file mode 100644 index f9efa138..00000000 --- a/meta-steppeeagle/recipes-kernel/linux-firmware/radeon-firmware/mullins_sdma1.bin +++ /dev/null diff --git a/meta-steppeeagle/recipes-kernel/linux-firmware/radeon-firmware/mullins_uvd.bin b/meta-steppeeagle/recipes-kernel/linux-firmware/radeon-firmware/mullins_uvd.bin Binary files differdeleted file mode 100644 index ff461391..00000000 --- a/meta-steppeeagle/recipes-kernel/linux-firmware/radeon-firmware/mullins_uvd.bin +++ /dev/null diff --git a/meta-steppeeagle/recipes-kernel/linux-firmware/radeon-firmware/mullins_vce.bin b/meta-steppeeagle/recipes-kernel/linux-firmware/radeon-firmware/mullins_vce.bin Binary files differdeleted file mode 100644 index bea60f1e..00000000 --- a/meta-steppeeagle/recipes-kernel/linux-firmware/radeon-firmware/mullins_vce.bin +++ /dev/null diff --git a/meta-steppeeagle/recipes-kernel/linux/files/steppeeagle-user-features.scc b/meta-steppeeagle/recipes-kernel/linux/files/steppeeagle-user-features.scc deleted file mode 100644 index e69de29b..00000000 --- a/meta-steppeeagle/recipes-kernel/linux/files/steppeeagle-user-features.scc +++ /dev/null diff --git a/meta-steppeeagle/recipes-kernel/linux/files/steppeeagle-user-patches.scc b/meta-steppeeagle/recipes-kernel/linux/files/steppeeagle-user-patches.scc deleted file mode 100644 index e69de29b..00000000 --- a/meta-steppeeagle/recipes-kernel/linux/files/steppeeagle-user-patches.scc +++ /dev/null diff --git a/meta-steppeeagle/recipes-kernel/linux/files/steppeeagle_savedefconfig.cfg b/meta-steppeeagle/recipes-kernel/linux/files/steppeeagle_savedefconfig.cfg deleted file mode 100644 index 21b3986f..00000000 --- a/meta-steppeeagle/recipes-kernel/linux/files/steppeeagle_savedefconfig.cfg +++ /dev/null @@ -1,512 +0,0 @@ -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -CONFIG_FHANDLE=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_BSD_PROCESS_ACCT=y -CONFIG_BSD_PROCESS_ACCT_V3=y -CONFIG_RCU_FAST_NO_HZ=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_CGROUP_DEBUG=y -CONFIG_CGROUP_FREEZER=y -CONFIG_CGROUP_DEVICE=y -CONFIG_CPUSETS=y -CONFIG_CGROUP_CPUACCT=y -CONFIG_MEMCG=y -CONFIG_MEMCG_SWAP=y -CONFIG_MEMCG_KMEM=y -CONFIG_CGROUP_PERF=y -CONFIG_RT_GROUP_SCHED=y -CONFIG_BLK_CGROUP=y -CONFIG_CHECKPOINT_RESTORE=y -CONFIG_NAMESPACES=y -CONFIG_USER_NS=y -CONFIG_SCHED_AUTOGROUP=y -CONFIG_BLK_DEV_INITRD=y -# CONFIG_RD_BZIP2 is not set -# CONFIG_RD_LZMA is not set -# CONFIG_RD_XZ is not set -# CONFIG_RD_LZO is not set -# CONFIG_RD_LZ4 is not set -CONFIG_SYSCTL_SYSCALL=y -CONFIG_EMBEDDED=y -CONFIG_PROFILING=y -CONFIG_OPROFILE=y -CONFIG_KPROBES=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODVERSIONS=y -CONFIG_MODULE_SRCVERSION_ALL=y -CONFIG_BLK_DEV_BSGLIB=y -CONFIG_BLK_DEV_INTEGRITY=y -CONFIG_BLK_DEV_THROTTLING=y -CONFIG_PARTITION_ADVANCED=y -CONFIG_CFQ_GROUP_IOSCHED=y -CONFIG_DEFAULT_DEADLINE=y -CONFIG_SMP=y -CONFIG_MJAGUAR=y -# CONFIG_MCORE2 is not set -CONFIG_PROCESSOR_SELECT=y -CONFIG_GART_IOMMU=y -CONFIG_CALGARY_IOMMU=y -CONFIG_NR_CPUS=24 -CONFIG_SCHED_SMT=y -CONFIG_PREEMPT=y -CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS=y -CONFIG_X86_MCE_INJECT=m -CONFIG_MICROCODE=y -CONFIG_MICROCODE_AMD=y -CONFIG_X86_MSR=m -CONFIG_X86_CPUID=m -CONFIG_NUMA=y -CONFIG_ARCH_MEMORY_PROBE=y -CONFIG_MEMORY_HOTPLUG=y -CONFIG_MEMORY_HOTREMOVE=y -CONFIG_KSM=y -CONFIG_MEMORY_FAILURE=y -CONFIG_TRANSPARENT_HUGEPAGE=y -CONFIG_TRANSPARENT_HUGEPAGE_MADVISE=y -CONFIG_CLEANCACHE=y -CONFIG_FRONTSWAP=y -CONFIG_X86_CHECK_BIOS_CORRUPTION=y -# CONFIG_MTRR_SANITIZER is not set -CONFIG_EFI=y -CONFIG_EFI_STUB=y -CONFIG_HZ_1000=y -CONFIG_KEXEC=y -CONFIG_CRASH_DUMP=y -CONFIG_PHYSICAL_ALIGN=0x1000000 -CONFIG_COMPAT_VDSO=y -CONFIG_HIBERNATION=y -CONFIG_PM_DEBUG=y -CONFIG_PM_ADVANCED_DEBUG=y -CONFIG_PM_TRACE_RTC=y -CONFIG_ACPI_VIDEO=m -CONFIG_ACPI_SBS=m -CONFIG_ACPI_BGRT=y -CONFIG_ACPI_APEI=y -CONFIG_ACPI_APEI_GHES=y -CONFIG_ACPI_APEI_PCIEAER=y -CONFIG_ACPI_APEI_MEMORY_FAILURE=y -CONFIG_ACPI_APEI_EINJ=m -CONFIG_ACPI_APEI_ERST_DEBUG=m -CONFIG_SFI=y -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_STAT_DETAILS=y -CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=y -CONFIG_CPU_FREQ_GOV_USERSPACE=y -CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y -CONFIG_X86_PCC_CPUFREQ=m -CONFIG_X86_ACPI_CPUFREQ=y -CONFIG_X86_POWERNOW_K8=y -CONFIG_X86_SPEEDSTEP_CENTRINO=y -CONFIG_X86_P4_CLOCKMOD=m -CONFIG_INTEL_IDLE=y -CONFIG_PCI_MMCONFIG=y -CONFIG_PCIEPORTBUS=y -CONFIG_PCI_REALLOC_ENABLE_AUTO=y -CONFIG_PCI_STUB=m -CONFIG_PCI_IOV=y -CONFIG_HOTPLUG_PCI=y -CONFIG_HOTPLUG_PCI_CPCI=y -CONFIG_HOTPLUG_PCI_CPCI_GENERIC=m -CONFIG_HOTPLUG_PCI_SHPC=m -CONFIG_X86_SYSFB=y -CONFIG_BINFMT_MISC=m -CONFIG_IA32_EMULATION=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_XFRM_USER=m -CONFIG_XFRM_SUB_POLICY=y -CONFIG_NET_KEY=m -CONFIG_NET_KEY_MIGRATE=y -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -CONFIG_IP_MULTIPLE_TABLES=y -CONFIG_IP_ROUTE_MULTIPATH=y -CONFIG_IP_ROUTE_VERBOSE=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -CONFIG_IP_PNP_RARP=y -CONFIG_NET_IPIP=m -CONFIG_IP_MROUTE=y -CONFIG_IP_PIMSM_V1=y -CONFIG_IP_PIMSM_V2=y -CONFIG_SYN_COOKIES=y -CONFIG_INET_AH=m -CONFIG_INET_ESP=m -CONFIG_INET_IPCOMP=m -CONFIG_IPV6=y -CONFIG_IPV6_ROUTER_PREF=y -CONFIG_INET6_AH=y -CONFIG_INET6_ESP=y -CONFIG_INET6_IPCOMP=m -CONFIG_IPV6_TUNNEL=m -CONFIG_NETFILTER=y -CONFIG_NF_CONNTRACK=m -CONFIG_NF_CT_PROTO_UDPLITE=m -CONFIG_NF_CONNTRACK_AMANDA=m -CONFIG_NF_CONNTRACK_FTP=m -CONFIG_NF_CONNTRACK_H323=m -CONFIG_NF_CONNTRACK_IRC=m -CONFIG_NF_CONNTRACK_NETBIOS_NS=m -CONFIG_NF_CONNTRACK_PPTP=m -CONFIG_NF_CONNTRACK_SANE=m -CONFIG_NF_CONNTRACK_SIP=m -CONFIG_NF_CONNTRACK_TFTP=m -CONFIG_NF_CT_NETLINK=m -CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m -CONFIG_NETFILTER_XT_TARGET_CONNMARK=m -CONFIG_NETFILTER_XT_TARGET_DSCP=m -CONFIG_NETFILTER_XT_TARGET_MARK=m -CONFIG_NETFILTER_XT_TARGET_NETMAP=m -CONFIG_NETFILTER_XT_TARGET_NFLOG=m -CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m -CONFIG_NETFILTER_XT_TARGET_NOTRACK=m -CONFIG_NETFILTER_XT_TARGET_REDIRECT=m -CONFIG_NETFILTER_XT_TARGET_TRACE=m -CONFIG_NETFILTER_XT_TARGET_TCPMSS=m -CONFIG_NETFILTER_XT_MATCH_COMMENT=m -CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m -CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m -CONFIG_NETFILTER_XT_MATCH_CONNMARK=m -CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m -CONFIG_NETFILTER_XT_MATCH_DCCP=m -CONFIG_NETFILTER_XT_MATCH_DSCP=m -CONFIG_NETFILTER_XT_MATCH_ESP=m -CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m -CONFIG_NETFILTER_XT_MATCH_HELPER=m -CONFIG_NETFILTER_XT_MATCH_LENGTH=m -CONFIG_NETFILTER_XT_MATCH_LIMIT=m -CONFIG_NETFILTER_XT_MATCH_MAC=m -CONFIG_NETFILTER_XT_MATCH_MARK=m -CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m -CONFIG_NETFILTER_XT_MATCH_POLICY=m -CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m -CONFIG_NETFILTER_XT_MATCH_QUOTA=m -CONFIG_NETFILTER_XT_MATCH_REALM=m -CONFIG_NETFILTER_XT_MATCH_STATE=m -CONFIG_NETFILTER_XT_MATCH_STATISTIC=m -CONFIG_NETFILTER_XT_MATCH_STRING=m -CONFIG_NETFILTER_XT_MATCH_TCPMSS=m -CONFIG_NETFILTER_XT_MATCH_U32=m -CONFIG_NF_CONNTRACK_IPV4=m -CONFIG_NF_NAT_IPV4=m -CONFIG_IP_NF_IPTABLES=m -CONFIG_IP_NF_MATCH_AH=m -CONFIG_IP_NF_MATCH_ECN=m -CONFIG_IP_NF_MATCH_TTL=m -CONFIG_IP_NF_FILTER=m -CONFIG_IP_NF_TARGET_REJECT=m -CONFIG_IP_NF_MANGLE=m -CONFIG_IP_NF_TARGET_CLUSTERIP=m -CONFIG_IP_NF_TARGET_ECN=m -CONFIG_IP_NF_TARGET_TTL=m -CONFIG_IP_NF_RAW=m -CONFIG_IP_NF_ARPTABLES=m -CONFIG_IP_NF_ARPFILTER=m -CONFIG_IP_NF_ARP_MANGLE=m -CONFIG_IP6_NF_IPTABLES=m -CONFIG_IP6_NF_MATCH_EUI64=m -CONFIG_IP6_NF_MATCH_FRAG=m -CONFIG_IP6_NF_MATCH_OPTS=m -CONFIG_IP6_NF_MATCH_HL=m -CONFIG_IP6_NF_MATCH_IPV6HEADER=m -CONFIG_IP6_NF_MATCH_RT=m -CONFIG_IP6_NF_FILTER=m -CONFIG_IP6_NF_MANGLE=m -CONFIG_IP6_NF_RAW=m -CONFIG_IP_SCTP=m -CONFIG_TIPC=m -CONFIG_BRIDGE=m -CONFIG_VLAN_8021Q=m -CONFIG_NET_SCHED=y -CONFIG_NET_SCH_CBQ=m -CONFIG_NET_SCH_HTB=m -CONFIG_NET_SCH_HFSC=m -CONFIG_NET_SCH_PRIO=m -CONFIG_NET_SCH_RED=m -CONFIG_NET_SCH_SFQ=m -CONFIG_NET_SCH_TEQL=m -CONFIG_NET_SCH_TBF=m -CONFIG_NET_SCH_GRED=m -CONFIG_NET_SCH_DSMARK=m -CONFIG_NET_SCH_NETEM=m -CONFIG_NET_SCH_CODEL=m -CONFIG_NET_SCH_FQ=m -CONFIG_NET_SCH_INGRESS=m -CONFIG_NET_CLS_BASIC=y -CONFIG_NET_CLS_U32=y -CONFIG_NET_CLS_CGROUP=y -CONFIG_NET_CLS_ACT=y -CONFIG_NET_ACT_MIRRED=m -CONFIG_NET_PKTGEN=m -CONFIG_CFG80211=m -CONFIG_MAC80211=m -CONFIG_RFKILL=y -CONFIG_DEVTMPFS=y -CONFIG_DEVTMPFS_MOUNT=y -CONFIG_CONNECTOR=y -CONFIG_PARPORT=m -CONFIG_PARPORT_PC=m -CONFIG_BLK_DEV_FD=m -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_CRYPTOLOOP=m -CONFIG_BLK_DEV_NBD=m -CONFIG_BLK_DEV_RAM=y -CONFIG_VIRTIO_BLK=y -CONFIG_ENCLOSURE_SERVICES=m -CONFIG_EEPROM_LEGACY=m -CONFIG_IDE=y -CONFIG_BLK_DEV_IDECD=y -CONFIG_BLK_DEV_PIIX=y -CONFIG_BLK_DEV_SD=y -CONFIG_BLK_DEV_SR=y -CONFIG_CHR_DEV_SG=y -CONFIG_ATA=y -CONFIG_SATA_AHCI=y -CONFIG_SATA_AHCI_PLATFORM=m -CONFIG_ATA_PIIX=y -CONFIG_PATA_SCH=y -CONFIG_ATA_GENERIC=y -CONFIG_MD=y -CONFIG_BLK_DEV_MD=y -CONFIG_MD_LINEAR=y -CONFIG_MD_RAID0=y -CONFIG_MD_RAID1=y -CONFIG_MD_RAID10=y -CONFIG_MD_MULTIPATH=y -CONFIG_MD_FAULTY=y -CONFIG_BLK_DEV_DM=y -CONFIG_DM_CRYPT=y -CONFIG_DM_SNAPSHOT=y -CONFIG_DM_MIRROR=y -CONFIG_DM_ZERO=y -CONFIG_NETDEVICES=y -CONFIG_BONDING=m -CONFIG_DUMMY=m -CONFIG_NETCONSOLE=y -CONFIG_TUN=m -CONFIG_VIRTIO_NET=y -CONFIG_PCNET32=y -CONFIG_ATL2=m -CONFIG_ATL1E=m -CONFIG_TIGON3=y -CONFIG_E100=y -CONFIG_E1000=m -CONFIG_E1000E=m -CONFIG_8139CP=m -CONFIG_8139TOO=m -CONFIG_R8169=y -CONFIG_PPP=m -CONFIG_PPP_BSDCOMP=m -CONFIG_PPP_DEFLATE=m -CONFIG_PPP_FILTER=y -CONFIG_PPP_MULTILINK=y -CONFIG_PPPOE=m -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -CONFIG_SLIP=m -CONFIG_SLIP_COMPRESSED=y -CONFIG_SLIP_SMART=y -CONFIG_SLIP_MODE_SLIP6=y -CONFIG_ATH_CARDS=m -CONFIG_ATH5K=m -CONFIG_ATH9K=m -CONFIG_BRCMFMAC=m -CONFIG_BRCMFMAC_USB=y -CONFIG_RT2X00=m -CONFIG_RT2800PCI=m -CONFIG_INPUT_EVDEV=y -CONFIG_INPUT_TABLET=y -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_USB_COMPOSITE=m -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_PRINTER=m -CONFIG_VIRTIO_CONSOLE=y -CONFIG_IPMI_HANDLER=m -CONFIG_NVRAM=m -CONFIG_HPET=y -CONFIG_HANGCHECK_TIMER=m -CONFIG_TCG_TPM=y -CONFIG_I2C_CHARDEV=m -CONFIG_I2C_I801=y -CONFIG_I2C_PIIX4=m -CONFIG_SPI=y -CONFIG_SPI_SPIDEV=m -CONFIG_GPIOLIB=y -CONFIG_GPIO_SYSFS=y -CONFIG_GPIO_GENERIC_PLATFORM=m -CONFIG_SENSORS_K8TEMP=m -CONFIG_SENSORS_K10TEMP=m -CONFIG_SENSORS_FAM15H_POWER=m -CONFIG_SENSORS_ACPI_POWER=m -CONFIG_WATCHDOG=y -CONFIG_SOFT_WATCHDOG=m -CONFIG_MEDIA_SUPPORT=m -CONFIG_MEDIA_CAMERA_SUPPORT=y -CONFIG_MEDIA_USB_SUPPORT=y -CONFIG_USB_VIDEO_CLASS=m -CONFIG_AGP=y -CONFIG_AGP_AMD64=y -CONFIG_AGP_INTEL=y -CONFIG_VGA_SWITCHEROO=y -CONFIG_USB_HIDDEV=y -CONFIG_USB=y -CONFIG_USB_ANNOUNCE_NEW_DEVICES=y -CONFIG_USB_XHCI_HCD=y -CONFIG_USB_EHCI_HCD=y -CONFIG_USB_EHCI_ROOT_HUB_TT=y -CONFIG_USB_EHCI_HCD_PLATFORM=y -CONFIG_USB_OHCI_HCD=y -CONFIG_USB_OHCI_HCD_PCI=m -CONFIG_USB_OHCI_HCD_PLATFORM=y -CONFIG_USB_UHCI_HCD=y -CONFIG_USB_STORAGE=y -CONFIG_USB_SERIAL=y -CONFIG_USB_SERIAL_CONSOLE=y -CONFIG_USB_SERIAL_GENERIC=y -CONFIG_USB_SERIAL_FTDI_SIO=y -CONFIG_USB_SERIAL_PL2303=y -CONFIG_USB_EZUSB_FX2=y -CONFIG_MMC=y -CONFIG_MMC_SDHCI=y -CONFIG_MMC_SDHCI_PCI=y -# CONFIG_MMC_RICOH_MMC is not set -CONFIG_MMC_SDHCI_PLTFM=m -CONFIG_MMC_SPI=m -CONFIG_LEDS_CLASS=y -CONFIG_EDAC=y -CONFIG_EDAC_MCE_INJ=m -CONFIG_EDAC_MM_EDAC=m -CONFIG_EDAC_AMD64=m -CONFIG_RTC_CLASS=y -CONFIG_AUXDISPLAY=y -CONFIG_VIRTIO_PCI=y -CONFIG_VIRTIO_BALLOON=y -CONFIG_VIRTIO_MMIO=y -CONFIG_AMD_IOMMU=y -CONFIG_AMD_IOMMU_STATS=y -CONFIG_AMD_IOMMU_V2=m -CONFIG_IRQ_REMAP=y -CONFIG_PM_DEVFREQ=y -CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND=y -CONFIG_DEVFREQ_GOV_PERFORMANCE=y -CONFIG_DEVFREQ_GOV_POWERSAVE=y -CONFIG_DEVFREQ_GOV_USERSPACE=y -CONFIG_MEMORY=y -CONFIG_EDD=y -CONFIG_EDD_OFF=y -CONFIG_DMI_SYSFS=m -CONFIG_EFI_VARS=y -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT3_FS=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT4_FS=y -CONFIG_EXT4_FS_POSIX_ACL=y -CONFIG_REISERFS_FS=m -CONFIG_REISERFS_FS_XATTR=y -CONFIG_REISERFS_FS_POSIX_ACL=y -CONFIG_BTRFS_FS=y -CONFIG_BTRFS_FS_POSIX_ACL=y -CONFIG_QUOTA=y -CONFIG_QUOTA_NETLINK_INTERFACE=y -# CONFIG_PRINT_QUOTA_WARNING is not set -CONFIG_AUTOFS4_FS=y -CONFIG_FUSE_FS=m -CONFIG_CUSE=m -CONFIG_ISO9660_FS=y -CONFIG_UDF_FS=m -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -CONFIG_PROC_KCORE=y -CONFIG_TMPFS=y -CONFIG_TMPFS_POSIX_ACL=y -CONFIG_HUGETLBFS=y -CONFIG_CONFIGFS_FS=m -# CONFIG_EFIVAR_FS is not set -CONFIG_SQUASHFS=y -CONFIG_SQUASHFS_XATTR=y -CONFIG_MINIX_FS=m -CONFIG_ROMFS_FS=m -CONFIG_NFS_FS=y -CONFIG_NFS_V4=y -CONFIG_ROOT_NFS=y -CONFIG_NFSD=m -CONFIG_NFSD_V4=y -CONFIG_CIFS=m -CONFIG_CIFS_XATTR=y -CONFIG_CIFS_POSIX=y -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_CODEPAGE_737=m -CONFIG_NLS_CODEPAGE_775=m -CONFIG_NLS_CODEPAGE_850=m -CONFIG_NLS_CODEPAGE_852=m -CONFIG_NLS_CODEPAGE_855=m -CONFIG_NLS_CODEPAGE_857=m -CONFIG_NLS_CODEPAGE_860=m -CONFIG_NLS_CODEPAGE_861=m -CONFIG_NLS_CODEPAGE_862=m -CONFIG_NLS_CODEPAGE_863=m -CONFIG_NLS_CODEPAGE_864=m -CONFIG_NLS_CODEPAGE_865=m -CONFIG_NLS_CODEPAGE_866=m -CONFIG_NLS_CODEPAGE_869=m -CONFIG_NLS_CODEPAGE_936=m -CONFIG_NLS_CODEPAGE_950=m -CONFIG_NLS_CODEPAGE_932=m -CONFIG_NLS_CODEPAGE_949=m -CONFIG_NLS_CODEPAGE_874=m -CONFIG_NLS_ISO8859_8=m -CONFIG_NLS_CODEPAGE_1250=m -CONFIG_NLS_CODEPAGE_1251=m -CONFIG_NLS_ASCII=m -CONFIG_NLS_ISO8859_1=y -CONFIG_NLS_ISO8859_2=m -CONFIG_NLS_ISO8859_3=m -CONFIG_NLS_ISO8859_4=m -CONFIG_NLS_ISO8859_5=m -CONFIG_NLS_ISO8859_6=m -CONFIG_NLS_ISO8859_7=m -CONFIG_NLS_ISO8859_9=m -CONFIG_NLS_ISO8859_13=m -CONFIG_NLS_ISO8859_14=m -CONFIG_NLS_ISO8859_15=m -CONFIG_NLS_KOI8_R=m -CONFIG_NLS_KOI8_U=m -CONFIG_NLS_UTF8=m -CONFIG_DEBUG_INFO=y -CONFIG_TIMER_STATS=y -# CONFIG_RCU_CPU_STALL_INFO is not set -CONFIG_LATENCYTOP=y -CONFIG_FUNCTION_TRACER=y -CONFIG_FTRACE_SYSCALLS=y -CONFIG_BLK_DEV_IO_TRACE=y -CONFIG_UPROBE_EVENT=y -CONFIG_KDB_KEYBOARD=y -CONFIG_CRYPTO_TEST=m -CONFIG_CRYPTO_XCBC=m -CONFIG_CRYPTO_MICHAEL_MIC=m -CONFIG_CRYPTO_SHA512=m -CONFIG_CRYPTO_WP512=m -CONFIG_CRYPTO_ANUBIS=m -CONFIG_CRYPTO_BLOWFISH=m -CONFIG_CRYPTO_CAMELLIA=m -CONFIG_CRYPTO_CAST5=m -CONFIG_CRYPTO_CAST6=m -CONFIG_CRYPTO_KHAZAD=m -CONFIG_CRYPTO_SERPENT=m -CONFIG_CRYPTO_TEA=m -CONFIG_CRYPTO_TWOFISH=m -CONFIG_LIBCRC32C=y -# CONFIG_DEBUG_PREEMPT is not set -# CONFIG_DEBUG_RODATA is not set diff --git a/meta-steppeeagle/recipes-kernel/linux/linux-yocto_4.4.bbappend b/meta-steppeeagle/recipes-kernel/linux/linux-yocto_4.4.bbappend deleted file mode 100644 index beb16286..00000000 --- a/meta-steppeeagle/recipes-kernel/linux/linux-yocto_4.4.bbappend +++ /dev/null @@ -1,8 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" - -SRC_URI_append_steppeeagle += " file://steppeeagle-user-features.scc \ - file://steppeeagle-user-patches.scc \ - file://steppeeagle_savedefconfig.cfg \ -" - -COMPATIBLE_MACHINE_steppeeagle = "steppeeagle" |