source: branches/backfire/package/ltq-dsl/patches/500-portability.patch @ 27547

Last change on this file since 27547 was 27547, checked in by blogic, 5 years ago

adds lantiq packages/drivers

File size: 12.8 KB
  • configure.in

    a b  
    310310AC_ARG_ENABLE(kernelbuild, 
    311311    AC_HELP_STRING(--enable-kernel-build=x,Set the target kernel build path), 
    312312    [ 
    313         if test -e $enableval/include/linux/autoconf.h; then 
     313        if test -e $enableval/include/linux/autoconf.h -o -e $enableval/include/generated/autoconf.h; then 
    314314            AC_SUBST([KERNEL_BUILD_PATH],[$enableval]) 
    315315        else 
    316316            AC_MSG_ERROR([The kernel build directory is not valid or not configured!]) 
     
    333333            echo Set the lib_ifxos include path $enableval 
    334334            AC_SUBST([IFXOS_INCLUDE_PATH],[$enableval]) 
    335335        else 
    336             echo -e Set the default lib_ifxos include path $DEFAULT_IFXOS_INCLUDE_PATH 
     336            echo Set the default lib_ifxos include path $DEFAULT_IFXOS_INCLUDE_PATH 
    337337            AC_SUBST([IFXOS_INCLUDE_PATH],[$DEFAULT_IFXOS_INCLUDE_PATH]) 
    338338        fi 
    339339    ], 
    340340    [ 
    341         echo -e Set the default lib_ifxos include path $DEFAULT_IFXOS_INCLUDE_PATH 
     341        echo Set the default lib_ifxos include path $DEFAULT_IFXOS_INCLUDE_PATH 
    342342        AC_SUBST([IFXOS_INCLUDE_PATH],[$DEFAULT_IFXOS_INCLUDE_PATH]) 
    343343    ] 
    344344) 
     
    17021702AC_SUBST([DISTCHECK_CONFIGURE_PARAMS],[$CONFIGURE_OPTIONS]) 
    17031703 
    17041704AC_CONFIG_COMMANDS_PRE([ 
    1705 echo -e "------------------------------------------------------------------------" 
    1706 echo -e " Configuration for drv_dsl_cpe_api:" 
    1707 echo -e "  Configure model type:             $DSL_CONFIG_MODEL_TYPE" 
    1708 echo -e "  Source code location:             $srcdir" 
    1709 echo -e "  Compiler:                         $CC" 
    1710 echo -e "  Compiler c-flags:                 $CFLAGS" 
    1711 echo -e "  Extra compiler c-flags:           $EXTRA_DRV_CFLAGS" 
    1712 echo -e "  Host System Type:                 $host" 
    1713 echo -e "  Install path:                     $prefix" 
    1714 echo -e "  Linux kernel include path:        $KERNEL_INCL_PATH" 
    1715 echo -e "  Linux kernel build path:          $KERNEL_BUILD_PATH" 
    1716 echo -e "  Linux kernel architecture:        $KERNEL_ARCH" 
    1717 echo -e "  Include IFXOS:                    $INCLUDE_DSL_CPE_API_IFXOS_SUPPORT" 
    1718 echo -e "  IFXOS include path:               $IFXOS_INCLUDE_PATH" 
    1719 echo -e "  Driver Include Path               $DSL_DRIVER_INCL_PATH" 
    1720 echo -e "  DSL device:                       $DSL_DEVICE_NAME" 
    1721 echo -e "  Max device number:                $DSL_DRV_MAX_DEVICE_NUMBER" 
    1722 echo -e "  Channels per line:                $DSL_CHANNELS_PER_LINE" 
    1723 echo -e "  Build lib (only for kernel 2.6)   $DSL_CPE_API_LIBRARY_BUILD_2_6" 
    1724 echo -e "  DSL data led flash frequency:     $DSL_DATA_LED_FLASH_FREQUENCY Hz" 
    1725 echo -e "  Disable debug prints:             $DSL_DEBUG_DISABLE" 
    1726 echo -e "  Preselection of max. debug level: $DSL_DBG_MAX_LEVEL_SET" 
    1727 echo -e "  Preselected max. debug level:     $DSL_DBG_MAX_LEVEL_PRE" 
    1728 echo -e "  Include deprecated functions:     $INCLUDE_DEPRECATED" 
    1729 echo -e "  Include Device Exception Codes:   $INCLUDE_DEVICE_EXCEPTION_CODES" 
    1730 echo -e "  Include FW request support:       $INCLUDE_FW_REQUEST_SUPPORT" 
    1731 echo -e "  Include ADSL trace buffer:        $INCLUDE_DSL_CPE_TRACE_BUFFER" 
    1732 echo -e "  Include ADSL MIB:                 $INCLUDE_DSL_ADSL_MIB" 
    1733 echo -e "  Include ADSL LED:                 $INCLUDE_ADSL_LED" 
    1734 echo -e "  Include CEOC:                     $INCLUDE_DSL_CEOC" 
    1735 echo -e "  Include config get support:       $INCLUDE_DSL_CONFIG_GET" 
    1736 echo -e "  Include System i/f configuration: $INCLUDE_DSL_SYSTEM_INTERFACE" 
    1737 echo -e "  Include Resource Statistics:      $INCLUDE_DSL_RESOURCE_STATISTICS" 
    1738 echo -e "  Include Framing Parameters:       $INCLUDE_DSL_FRAMING_PARAMETERS" 
    1739 echo -e "  Include G997 Line Inventory:      $INCLUDE_DSL_G997_LINE_INVENTORY" 
    1740 echo -e "  Include G997 Framing Parameters:  $INCLUDE_DSL_G997_FRAMING_PARAMETERS" 
    1741 echo -e "  Include G997 per tone data:       $INCLUDE_DSL_G997_PER_TONE" 
    1742 echo -e "  Include G997 status:              $INCLUDE_DSL_G997_STATUS" 
    1743 echo -e "  Include G997 alarm:               $INCLUDE_DSL_G997_ALARM" 
    1744 echo -e "  Include DSL Bonding:              $INCLUDE_DSL_BONDING" 
    1745 echo -e "  Include Misc Line Status          $INCLUDE_DSL_CPE_MISC_LINE_STATUS" 
    1746 echo -e "  Include DELT:                     $INCLUDE_DSL_DELT" 
    1747 echo -e "  Include DELT data static storage: $DSL_CPE_STATIC_DELT_DATA" 
    1748 echo -e "  Include PM:                       $INCLUDE_DSL_PM" 
    1749 echo -e "  Include PM config:                $INCLUDE_DSL_CPE_PM_CONFIG" 
    1750 echo -e "  Include PM total:                 $INCLUDE_DSL_CPE_PM_TOTAL_COUNTERS" 
    1751 echo -e "  Include PM history:               $INCLUDE_DSL_CPE_PM_HISTORY" 
    1752 echo -e "  Include PM showtime:              $INCLUDE_DSL_CPE_PM_SHOWTIME_COUNTERS" 
    1753 echo -e "  Include PM optional:              $INCLUDE_DSL_CPE_PM_OPTIONAL_PARAMETERS" 
    1754 echo -e "  Include PM line:                  $INCLUDE_DSL_CPE_PM_LINE_COUNTERS" 
    1755 echo -e "  Include PM line event showtime:   $INCLUDE_DSL_CPE_PM_LINE_EVENT_SHOWTIME_COUNTERS" 
    1756 echo -e "  Include PM channel:               $INCLUDE_DSL_CPE_PM_CHANNEL_COUNTERS" 
    1757 echo -e "  Include PM channel extended:      $INCLUDE_DSL_CPE_PM_CHANNEL_EXT_COUNTERS" 
    1758 echo -e "  Include PM data path:             $INCLUDE_DSL_CPE_PM_DATA_PATH_COUNTERS" 
    1759 echo -e "  Include PM data path failure:     $INCLUDE_DSL_CPE_PM_DATA_PATH_FAILURE_COUNTERS" 
    1760 echo -e "  Include PM ReTx:                  $INCLUDE_DSL_CPE_PM_RETX_COUNTERS" 
    1761 echo -e "  Include PM line threshold:        $INCLUDE_DSL_CPE_PM_LINE_THRESHOLDS" 
    1762 echo -e "  Include PM channel threshold:     $INCLUDE_DSL_CPE_PM_CHANNEL_THRESHOLDS" 
    1763 echo -e "  Include PM data path threshold:   $INCLUDE_DSL_CPE_PM_DATA_PATH_THRESHOLDS" 
    1764 echo -e "  Include PM ReTx threshold:        $INCLUDE_DSL_CPE_PM_RETX_THRESHOLDS" 
    1765 echo -e "  Include FW memory free support:   $INCLUDE_DSL_FIRMWARE_MEMORY_FREE" 
    1766 echo -e "----------------------- deprectated ! ----------------------------------" 
    1767 echo -e "  Include PM line failure:          $INCLUDE_DSL_CPE_PM_LINE_FAILURE_COUNTERS" 
    1768 echo -e "" 
    1769 echo -e " Settings:" 
    1770 echo -e "  Configure options:                $CONFIGURE_OPTIONS" 
    1771 echo -e "------------------------------------------------------------------------" 
     1705echo "------------------------------------------------------------------------" 
     1706echo " Configuration for drv_dsl_cpe_api:" 
     1707echo "  Configure model type:             $DSL_CONFIG_MODEL_TYPE" 
     1708echo "  Source code location:             $srcdir" 
     1709echo "  Compiler:                         $CC" 
     1710echo "  Compiler c-flags:                 $CFLAGS" 
     1711echo "  Extra compiler c-flags:           $EXTRA_DRV_CFLAGS" 
     1712echo "  Host System Type:                 $host" 
     1713echo "  Install path:                     $prefix" 
     1714echo "  Linux kernel include path:        $KERNEL_INCL_PATH" 
     1715echo "  Linux kernel build path:          $KERNEL_BUILD_PATH" 
     1716echo "  Linux kernel architecture:        $KERNEL_ARCH" 
     1717echo "  Include IFXOS:                    $INCLUDE_DSL_CPE_API_IFXOS_SUPPORT" 
     1718echo "  IFXOS include path:               $IFXOS_INCLUDE_PATH" 
     1719echo "  Driver Include Path               $DSL_DRIVER_INCL_PATH" 
     1720echo "  DSL device:                       $DSL_DEVICE_NAME" 
     1721echo "  Max device number:                $DSL_DRV_MAX_DEVICE_NUMBER" 
     1722echo "  Channels per line:                $DSL_CHANNELS_PER_LINE" 
     1723echo "  Build lib (only for kernel 2.6)   $DSL_CPE_API_LIBRARY_BUILD_2_6" 
     1724echo "  DSL data led flash frequency:     $DSL_DATA_LED_FLASH_FREQUENCY Hz" 
     1725echo "  Disable debug prints:             $DSL_DEBUG_DISABLE" 
     1726echo "  Preselection of max. debug level: $DSL_DBG_MAX_LEVEL_SET" 
     1727echo "  Preselected max. debug level:     $DSL_DBG_MAX_LEVEL_PRE" 
     1728echo "  Include deprecated functions:     $INCLUDE_DEPRECATED" 
     1729echo "  Include Device Exception Codes:   $INCLUDE_DEVICE_EXCEPTION_CODES" 
     1730echo "  Include FW request support:       $INCLUDE_FW_REQUEST_SUPPORT" 
     1731echo "  Include ADSL trace buffer:        $INCLUDE_DSL_CPE_TRACE_BUFFER" 
     1732echo "  Include ADSL MIB:                 $INCLUDE_DSL_ADSL_MIB" 
     1733echo "  Include ADSL LED:                 $INCLUDE_ADSL_LED" 
     1734echo "  Include CEOC:                     $INCLUDE_DSL_CEOC" 
     1735echo "  Include config get support:       $INCLUDE_DSL_CONFIG_GET" 
     1736echo "  Include System i/f configuration: $INCLUDE_DSL_SYSTEM_INTERFACE" 
     1737echo "  Include Resource Statistics:      $INCLUDE_DSL_RESOURCE_STATISTICS" 
     1738echo "  Include Framing Parameters:       $INCLUDE_DSL_FRAMING_PARAMETERS" 
     1739echo "  Include G997 Line Inventory:      $INCLUDE_DSL_G997_LINE_INVENTORY" 
     1740echo "  Include G997 Framing Parameters:  $INCLUDE_DSL_G997_FRAMING_PARAMETERS" 
     1741echo "  Include G997 per tone data:       $INCLUDE_DSL_G997_PER_TONE" 
     1742echo "  Include G997 status:              $INCLUDE_DSL_G997_STATUS" 
     1743echo "  Include G997 alarm:               $INCLUDE_DSL_G997_ALARM" 
     1744echo "  Include DSL Bonding:              $INCLUDE_DSL_BONDING" 
     1745echo "  Include Misc Line Status          $INCLUDE_DSL_CPE_MISC_LINE_STATUS" 
     1746echo "  Include DELT:                     $INCLUDE_DSL_DELT" 
     1747echo "  Include DELT data static storage: $DSL_CPE_STATIC_DELT_DATA" 
     1748echo "  Include PM:                       $INCLUDE_DSL_PM" 
     1749echo "  Include PM config:                $INCLUDE_DSL_CPE_PM_CONFIG" 
     1750echo "  Include PM total:                 $INCLUDE_DSL_CPE_PM_TOTAL_COUNTERS" 
     1751echo "  Include PM history:               $INCLUDE_DSL_CPE_PM_HISTORY" 
     1752echo "  Include PM showtime:              $INCLUDE_DSL_CPE_PM_SHOWTIME_COUNTERS" 
     1753echo "  Include PM optional:              $INCLUDE_DSL_CPE_PM_OPTIONAL_PARAMETERS" 
     1754echo "  Include PM line:                  $INCLUDE_DSL_CPE_PM_LINE_COUNTERS" 
     1755echo "  Include PM line event showtime:   $INCLUDE_DSL_CPE_PM_LINE_EVENT_SHOWTIME_COUNTERS" 
     1756echo "  Include PM channel:               $INCLUDE_DSL_CPE_PM_CHANNEL_COUNTERS" 
     1757echo "  Include PM channel extended:      $INCLUDE_DSL_CPE_PM_CHANNEL_EXT_COUNTERS" 
     1758echo "  Include PM data path:             $INCLUDE_DSL_CPE_PM_DATA_PATH_COUNTERS" 
     1759echo "  Include PM data path failure:     $INCLUDE_DSL_CPE_PM_DATA_PATH_FAILURE_COUNTERS" 
     1760echo "  Include PM ReTx:                  $INCLUDE_DSL_CPE_PM_RETX_COUNTERS" 
     1761echo "  Include PM line threshold:        $INCLUDE_DSL_CPE_PM_LINE_THRESHOLDS" 
     1762echo "  Include PM channel threshold:     $INCLUDE_DSL_CPE_PM_CHANNEL_THRESHOLDS" 
     1763echo "  Include PM data path threshold:   $INCLUDE_DSL_CPE_PM_DATA_PATH_THRESHOLDS" 
     1764echo "  Include PM ReTx threshold:        $INCLUDE_DSL_CPE_PM_RETX_THRESHOLDS" 
     1765echo "  Include FW memory free support:   $INCLUDE_DSL_FIRMWARE_MEMORY_FREE" 
     1766echo "----------------------- deprectated ! ----------------------------------" 
     1767echo "  Include PM line failure:          $INCLUDE_DSL_CPE_PM_LINE_FAILURE_COUNTERS" 
     1768echo "" 
     1769echo " Settings:" 
     1770echo "  Configure options:                $CONFIGURE_OPTIONS" 
     1771echo "------------------------------------------------------------------------" 
    17721772]) 
    17731773 
    17741774AC_CONFIG_FILES([Makefile src/Makefile]) 
  • src/Makefile.am

    a b  
    303303drv_dsl_cpe_api_OBJS = "$(subst .c,.o,$(filter %.c,$(drv_dsl_cpe_api_SOURCES)))" 
    304304 
    305305drv_dsl_cpe_api.ko: $(drv_dsl_cpe_api_SOURCES) 
    306         @echo -e "drv_dsl_cpe_api: Making Linux 2.6.x kernel object" 
     306        @echo "drv_dsl_cpe_api: Making Linux 2.6.x kernel object" 
    307307        if test ! -e common/drv_dsl_cpe_api.c ; then \ 
    308308                echo "copy source files (as links only!)"; \ 
    309309                for f in $(filter %.c,$(drv_dsl_cpe_api_SOURCES)); do \ 
     
    311311                        cp -s $(addprefix @abs_srcdir@/,$$f) $(PWD)/`dirname $$f`/ ; \ 
    312312                done \ 
    313313        fi 
    314         @echo -e "# drv_dsl_cpe_api: Generated to build Linux 2.6.x kernel object" > $(PWD)/Kbuild 
    315         @echo -e "obj-m := $(subst .ko,.o,$@)"                  >> $(PWD)/Kbuild 
    316         @echo -e "$(subst .ko,,$@)-y := $(drv_dsl_cpe_api_OBJS)"        >> $(PWD)/Kbuild 
    317         @echo -e "EXTRA_CFLAGS := $(CFLAGS) -DHAVE_CONFIG_H $(drv_dsl_cpe_api_CFLAGS) $(DSL_DRIVER_INCL_PATH) $(IFXOS_INCLUDE_PATH) -I@abs_srcdir@/include -I$(PWD)/include"    >> $(PWD)/Kbuild 
     314        @echo "# drv_dsl_cpe_api: Generated to build Linux 2.6.x kernel object" > $(PWD)/Kbuild 
     315        @echo "obj-m := $(subst .ko,.o,$@)"                     >> $(PWD)/Kbuild 
     316        @echo "$(subst .ko,,$@)-y := $(drv_dsl_cpe_api_OBJS)"   >> $(PWD)/Kbuild 
     317        @echo "EXTRA_CFLAGS := $(CFLAGS) -DHAVE_CONFIG_H $(drv_dsl_cpe_api_CFLAGS) $(DSL_DRIVER_INCL_PATH) $(IFXOS_INCLUDE_PATH) -I@abs_srcdir@/include -I$(PWD)/include"       >> $(PWD)/Kbuild 
    318318        $(MAKE) ARCH=@KERNEL_ARCH@ -C @KERNEL_BUILD_PATH@ O=@KERNEL_BUILD_PATH@ M=$(PWD) modules 
    319319 
    320320clean-generic: 
  • src/include/drv_dsl_cpe_os_linux.h

    a b  
    1616   extern "C" { 
    1717#endif 
    1818 
    19 #include <asm/ioctl.h> 
    20 #include <generated/autoconf.h> 
    2119#include <linux/module.h> 
    2220#include <linux/kernel.h> 
    2321#include <linux/init.h> 
     
    2624#include <linux/spinlock.h> 
    2725#include <linux/sched.h> 
    2826 
    29 #if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,17)) 
    30    #include <generated/utsrelease.h> 
     27#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)) 
     28#include <linux/utsrelease.h> 
     29#else 
     30#include <generated/utsrelease.h> 
    3131#endif 
    3232 
    3333#include <linux/types.h> 
     
    3939#include <linux/delay.h> 
    4040#include <linux/poll.h> 
    4141#include <asm/uaccess.h> 
    42 #include <linux/smp_lock.h> 
     42//#include <linux/smp_lock.h> 
     43#include <asm/ioctl.h> 
    4344 
    4445#ifdef INCLUDE_DSL_CPE_API_IFXOS_SUPPORT 
    4546/** IFXOS includes*/ 
Note: See TracBrowser for help on using the repository browser.