[saibcm] update saibcm kernel module source code to 6.5.13
This is upgrading code as-is. The build will fail. Signed-off-by: Ying Xie <ying.xie@microsoft.com>
This commit is contained in:
parent
de0238d673
commit
73d4c99d78
@ -1,18 +1,17 @@
|
||||
/*
|
||||
* Unless you and Broadcom execute a separate written software license
|
||||
* agreement governing use of this software, this software is licensed to
|
||||
* you under the terms of the GNU General Public License version 2 (the
|
||||
* "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
|
||||
* with the following added to such license:
|
||||
* Copyright 2017 Broadcom
|
||||
*
|
||||
* As a special exception, the copyright holders of this software give
|
||||
* you permission to link this software with independent modules, and to
|
||||
* copy and distribute the resulting executable under terms of your
|
||||
* choice, provided that you also meet, for each linked independent
|
||||
* module, the terms and conditions of the license of that module. An
|
||||
* independent module is a module which is not derived from this
|
||||
* software. The special exception does not apply to any modifications
|
||||
* of the software.
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License, version 2, as
|
||||
* published by the Free Software Foundation (the "GPL").
|
||||
*
|
||||
* 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 version 2 (GPLv2) for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* version 2 (GPLv2) along with this source code.
|
||||
*/
|
||||
/*
|
||||
* $Id: ibde.h,v 1.27 Broadcom SDK $
|
||||
@ -83,6 +82,7 @@ typedef struct ibde_s {
|
||||
#define BDE_BYTE_SWAP 0x01000000 /* SW byte swap */
|
||||
#define BDE_NO_IPROC 0x02000000 /* Device uses two BARs, but is not iProc */
|
||||
|
||||
#define BDE_8MB_REG_SPACE 0x10000000 /* 8MB sized CMIC BAR */
|
||||
#define BDE_256K_REG_SPACE 0x20000000 /* Map 256K (v 64K) */
|
||||
#define BDE_128K_REG_SPACE 0x40000000 /* Map 128K (v 64K) */
|
||||
#define BDE_320K_REG_SPACE 0x80000000 /* Map 256K+64K */
|
||||
|
@ -1,26 +1,25 @@
|
||||
/*
|
||||
* Unless you and Broadcom execute a separate written software license
|
||||
* agreement governing use of this software, this software is licensed to
|
||||
* you under the terms of the GNU General Public License version 2 (the
|
||||
* "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
|
||||
* with the following added to such license:
|
||||
* Copyright 2017 Broadcom
|
||||
*
|
||||
* As a special exception, the copyright holders of this software give
|
||||
* you permission to link this software with independent modules, and to
|
||||
* copy and distribute the resulting executable under terms of your
|
||||
* choice, provided that you also meet, for each linked independent
|
||||
* module, the terms and conditions of the license of that module. An
|
||||
* independent module is a module which is not derived from this
|
||||
* software. The special exception does not apply to any modifications
|
||||
* of the software.
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License, version 2, as
|
||||
* published by the Free Software Foundation (the "GPL").
|
||||
*
|
||||
* 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 version 2 (GPLv2) for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* version 2 (GPLv2) along with this source code.
|
||||
*/
|
||||
/*
|
||||
* $Id: kcom.h,v 1.9 Broadcom SDK $
|
||||
* $Copyright: (c) 2005 Broadcom Corp.
|
||||
* All Rights Reserved.$
|
||||
*
|
||||
* File: kcom.h
|
||||
* Purpose: User/Kernel message definitions
|
||||
* File: kcom.h
|
||||
* Purpose: User/Kernel message definitions
|
||||
*/
|
||||
|
||||
#ifndef _KCOM_H
|
||||
@ -37,7 +36,6 @@
|
||||
#define KCOM_MSG_TYPE_RSP 2 /* Command response */
|
||||
#define KCOM_MSG_TYPE_EVT 3 /* Unsolicited event */
|
||||
|
||||
|
||||
/*
|
||||
* Message opcodes
|
||||
*/
|
||||
@ -57,10 +55,11 @@
|
||||
#define KCOM_M_FILTER_LIST 23 /* Get list of Rx filter IDs */
|
||||
#define KCOM_M_FILTER_GET 24 /* Get Rx filter info */
|
||||
#define KCOM_M_DMA_INFO 31 /* Tx/Rx DMA info */
|
||||
#define KCOM_M_DBGPKT_SET 41 /* Enbale debug packet function */
|
||||
#define KCOM_M_DBGPKT_GET 42 /* Get debug packet function info */
|
||||
#define KCOM_M_DBGPKT_SET 41 /* Enbale debug packet function */
|
||||
#define KCOM_M_DBGPKT_GET 42 /* Get debug packet function info */
|
||||
#define KCOM_M_WB_CLEANUP 51 /* Clean up for warmbooting */
|
||||
|
||||
#define KCOM_VERSION 8 /* Protocol version */
|
||||
#define KCOM_VERSION 9 /* Protocol version */
|
||||
|
||||
/*
|
||||
* Message status codes
|
||||
@ -80,7 +79,6 @@ typedef struct kcom_msg_hdr_s {
|
||||
uint16 id;
|
||||
} kcom_msg_hdr_t;
|
||||
|
||||
|
||||
/*
|
||||
* Object types
|
||||
*/
|
||||
@ -267,44 +265,40 @@ typedef struct kcom_dma_info_s {
|
||||
uint16 chan;
|
||||
uint16 flags;
|
||||
union {
|
||||
void *p;
|
||||
uint8 b[8];
|
||||
} cookie;
|
||||
union {
|
||||
uint32 dcb_start;
|
||||
uint64 dcb_start;
|
||||
struct {
|
||||
uint32 tx;
|
||||
uint32 rx;
|
||||
} seqno;
|
||||
} data;
|
||||
union {
|
||||
void *p;
|
||||
uint8 b[8];
|
||||
} cookie;
|
||||
} kcom_dma_info_t;
|
||||
|
||||
/* Default channel configuration */
|
||||
#define KCOM_DMA_TX_CHAN 0
|
||||
#define KCOM_DMA_RX_CHAN 1
|
||||
#define KCOM_DMA_TX_CHAN 0
|
||||
#define KCOM_DMA_RX_CHAN 1
|
||||
|
||||
|
||||
#define KCOM_ETH_HW_T_RESET 1
|
||||
#define KCOM_ETH_HW_T_INIT 2
|
||||
#define KCOM_ETH_HW_T_OTHER 3
|
||||
|
||||
#define KCOM_ETH_HW_C_ALL 0xff
|
||||
|
||||
#define KCOM_ETH_HW_RESET_F_TX (1U << 0)
|
||||
#define KCOM_ETH_HW_RESET_F_RX (1U << 1)
|
||||
#define KCOM_ETH_HW_RESET_F_TX_RECLAIM (1U << 2)
|
||||
#define KCOM_ETH_HW_RESET_F_RX_RECLAIM (1U << 3)
|
||||
|
||||
#define KCOM_ETH_HW_INIT_F_TX (1U << 0)
|
||||
#define KCOM_ETH_HW_INIT_F_RX (1U << 1)
|
||||
#define KCOM_ETH_HW_INIT_F_RX_FILL (1U << 2)
|
||||
|
||||
|
||||
#define KCOM_ETH_HW_OTHER_F_FIFO_LOOPBACK (1U << 0)
|
||||
#define KCOM_ETH_HW_OTHER_F_INTERRUPT (1U << 1)
|
||||
#define KCOM_ETH_HW_C_ALL 0xff
|
||||
|
||||
#define KCOM_ETH_HW_RESET_F_TX (1U << 0)
|
||||
#define KCOM_ETH_HW_RESET_F_RX (1U << 1)
|
||||
#define KCOM_ETH_HW_RESET_F_TX_RECLAIM (1U << 2)
|
||||
#define KCOM_ETH_HW_RESET_F_RX_RECLAIM (1U << 3)
|
||||
|
||||
#define KCOM_ETH_HW_INIT_F_TX (1U << 0)
|
||||
#define KCOM_ETH_HW_INIT_F_RX (1U << 1)
|
||||
#define KCOM_ETH_HW_INIT_F_RX_FILL (1U << 2)
|
||||
|
||||
#define KCOM_ETH_HW_OTHER_F_FIFO_LOOPBACK (1U << 0)
|
||||
#define KCOM_ETH_HW_OTHER_F_INTERRUPT (1U << 1)
|
||||
|
||||
typedef struct kcom_eth_hw_config_s {
|
||||
uint8 type;
|
||||
@ -339,7 +333,6 @@ typedef struct kcom_msg_string_s {
|
||||
char val[KCOM_MSG_STRING_MAX];
|
||||
} kcom_msg_string_t;
|
||||
|
||||
|
||||
/*
|
||||
* Indicate that eth hardware is about to be reset. Active
|
||||
* DMA operations should be aborted and DMA and interrupts
|
||||
@ -354,7 +347,6 @@ typedef struct kcom_msg_eth_hw_config_s {
|
||||
kcom_eth_hw_config_t config;
|
||||
} kcom_msg_eth_hw_config_t;
|
||||
|
||||
|
||||
/*
|
||||
* Indicate that switch hardware is about to be reset. Active
|
||||
* DMA operations should be aborted and DMA and interrupts
|
||||
@ -371,8 +363,11 @@ typedef struct kcom_msg_hw_reset_s {
|
||||
*/
|
||||
typedef struct kcom_msg_hw_init_s {
|
||||
kcom_msg_hdr_t hdr;
|
||||
uint16 dcb_size;
|
||||
uint16 dcb_type;
|
||||
uint8 cmic_type;
|
||||
uint8 dcb_type;
|
||||
uint8 dcb_size;
|
||||
uint8 pkt_hdr_size;
|
||||
uint32 dma_hi;
|
||||
uint32 cdma_channels;
|
||||
} kcom_msg_hw_init_t;
|
||||
|
||||
@ -400,6 +395,14 @@ typedef struct kcom_msg_dbg_pkt_get_s {
|
||||
int value;
|
||||
} kcom_msg_dbg_pkt_get_t;
|
||||
|
||||
/*
|
||||
* Clean up warmboot-related resources.
|
||||
*/
|
||||
typedef struct kcom_msg_wb_cleanup_s {
|
||||
kcom_msg_hdr_t hdr;
|
||||
uint32 flags;
|
||||
} kcom_msg_wb_cleanup_t;
|
||||
|
||||
/*
|
||||
* Create new system network interface. The network interface will
|
||||
* be associated with the specified switch unit number.
|
||||
@ -458,8 +461,7 @@ typedef struct kcom_msg_filter_destroy_s {
|
||||
* Get list of currently defined packet filters.
|
||||
*/
|
||||
#ifndef KCOM_FILTER_MAX
|
||||
/* OPENNSL_FIXUP - Increased the filters to 1024 from 128 */
|
||||
#define KCOM_FILTER_MAX 1024
|
||||
#define KCOM_FILTER_MAX 128
|
||||
#endif
|
||||
|
||||
typedef struct kcom_msg_filter_list_s {
|
||||
@ -484,11 +486,9 @@ typedef struct kcom_msg_dma_info_s {
|
||||
kcom_dma_info_t dma_info;
|
||||
} kcom_msg_dma_info_t;
|
||||
|
||||
|
||||
/*
|
||||
* All messages (e.g. for generic receive)
|
||||
*/
|
||||
|
||||
typedef union kcom_msg_s {
|
||||
kcom_msg_hdr_t hdr;
|
||||
kcom_msg_version_t version;
|
||||
@ -508,9 +508,9 @@ typedef union kcom_msg_s {
|
||||
kcom_msg_dma_info_t dma_info;
|
||||
kcom_msg_dbg_pkt_set_t dbg_pkt_set;
|
||||
kcom_msg_dbg_pkt_get_t dbg_pkt_get;
|
||||
kcom_msg_wb_cleanup_t wb_cleanup;
|
||||
} kcom_msg_t;
|
||||
|
||||
|
||||
/*
|
||||
* KCOM communication channel vectors
|
||||
*
|
||||
@ -538,4 +538,4 @@ typedef struct kcom_chan_s {
|
||||
int (*recv)(void *handle, void *msg, unsigned int bufsz);
|
||||
} kcom_chan_t;
|
||||
|
||||
#endif /* _KCOM_H */
|
||||
#endif /* _KCOM_H */
|
||||
|
@ -1,18 +1,17 @@
|
||||
/*
|
||||
* Unless you and Broadcom execute a separate written software license
|
||||
* agreement governing use of this software, this software is licensed to
|
||||
* you under the terms of the GNU General Public License version 2 (the
|
||||
* "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
|
||||
* with the following added to such license:
|
||||
* Copyright 2017 Broadcom
|
||||
*
|
||||
* As a special exception, the copyright holders of this software give
|
||||
* you permission to link this software with independent modules, and to
|
||||
* copy and distribute the resulting executable under terms of your
|
||||
* choice, provided that you also meet, for each linked independent
|
||||
* module, the terms and conditions of the license of that module. An
|
||||
* independent module is a module which is not derived from this
|
||||
* software. The special exception does not apply to any modifications
|
||||
* of the software.
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License, version 2, as
|
||||
* published by the Free Software Foundation (the "GPL").
|
||||
*
|
||||
* 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 version 2 (GPLv2) for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* version 2 (GPLv2) along with this source code.
|
||||
*/
|
||||
/*
|
||||
* $Id: sync.h,v 1.1 Broadcom SDK $
|
||||
|
@ -1,18 +1,17 @@
|
||||
/*
|
||||
* Unless you and Broadcom execute a separate written software license
|
||||
* agreement governing use of this software, this software is licensed to
|
||||
* you under the terms of the GNU General Public License version 2 (the
|
||||
* "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
|
||||
* with the following added to such license:
|
||||
* Copyright 2017 Broadcom
|
||||
*
|
||||
* As a special exception, the copyright holders of this software give
|
||||
* you permission to link this software with independent modules, and to
|
||||
* copy and distribute the resulting executable under terms of your
|
||||
* choice, provided that you also meet, for each linked independent
|
||||
* module, the terms and conditions of the license of that module. An
|
||||
* independent module is a module which is not derived from this
|
||||
* software. The special exception does not apply to any modifications
|
||||
* of the software.
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License, version 2, as
|
||||
* published by the Free Software Foundation (the "GPL").
|
||||
*
|
||||
* 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 version 2 (GPLv2) for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* version 2 (GPLv2) along with this source code.
|
||||
*/
|
||||
/*
|
||||
* $Id: thread.h,v 1.1 Broadcom SDK $
|
||||
|
@ -1,18 +1,17 @@
|
||||
/*
|
||||
* Unless you and Broadcom execute a separate written software license
|
||||
* agreement governing use of this software, this software is licensed to
|
||||
* you under the terms of the GNU General Public License version 2 (the
|
||||
* "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
|
||||
* with the following added to such license:
|
||||
* Copyright 2017 Broadcom
|
||||
*
|
||||
* As a special exception, the copyright holders of this software give
|
||||
* you permission to link this software with independent modules, and to
|
||||
* copy and distribute the resulting executable under terms of your
|
||||
* choice, provided that you also meet, for each linked independent
|
||||
* module, the terms and conditions of the license of that module. An
|
||||
* independent module is a module which is not derived from this
|
||||
* software. The special exception does not apply to any modifications
|
||||
* of the software.
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License, version 2, as
|
||||
* published by the Free Software Foundation (the "GPL").
|
||||
*
|
||||
* 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 version 2 (GPLv2) for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* version 2 (GPLv2) along with this source code.
|
||||
*/
|
||||
/*
|
||||
* $Id: types.h,v 1.3 Broadcom SDK $
|
||||
|
@ -1,18 +1,17 @@
|
||||
/*
|
||||
* Unless you and Broadcom execute a separate written software license
|
||||
* agreement governing use of this software, this software is licensed to
|
||||
* you under the terms of the GNU General Public License version 2 (the
|
||||
* "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
|
||||
* with the following added to such license:
|
||||
* Copyright 2017 Broadcom
|
||||
*
|
||||
* As a special exception, the copyright holders of this software give
|
||||
* you permission to link this software with independent modules, and to
|
||||
* copy and distribute the resulting executable under terms of your
|
||||
* choice, provided that you also meet, for each linked independent
|
||||
* module, the terms and conditions of the license of that module. An
|
||||
* independent module is a module which is not derived from this
|
||||
* software. The special exception does not apply to any modifications
|
||||
* of the software.
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License, version 2, as
|
||||
* published by the Free Software Foundation (the "GPL").
|
||||
*
|
||||
* 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 version 2 (GPLv2) for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* version 2 (GPLv2) along with this source code.
|
||||
*/
|
||||
/*
|
||||
* $Id: sdk_config.h,v 1.5 Broadcom SDK $
|
||||
|
@ -1,18 +1,17 @@
|
||||
/*
|
||||
* Unless you and Broadcom execute a separate written software license
|
||||
* agreement governing use of this software, this software is licensed to
|
||||
* you under the terms of the GNU General Public License version 2 (the
|
||||
* "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
|
||||
* with the following added to such license:
|
||||
* Copyright 2017 Broadcom
|
||||
*
|
||||
* As a special exception, the copyright holders of this software give
|
||||
* you permission to link this software with independent modules, and to
|
||||
* copy and distribute the resulting executable under terms of your
|
||||
* choice, provided that you also meet, for each linked independent
|
||||
* module, the terms and conditions of the license of that module. An
|
||||
* independent module is a module which is not derived from this
|
||||
* software. The special exception does not apply to any modifications
|
||||
* of the software.
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License, version 2, as
|
||||
* published by the Free Software Foundation (the "GPL").
|
||||
*
|
||||
* 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 version 2 (GPLv2) for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* version 2 (GPLv2) along with this source code.
|
||||
*/
|
||||
/*
|
||||
* $Id: cmic.h,v 1.1 Broadcom SDK $
|
||||
|
@ -1,21 +1,20 @@
|
||||
/*
|
||||
* Unless you and Broadcom execute a separate written software license
|
||||
* agreement governing use of this software, this software is licensed to
|
||||
* you under the terms of the GNU General Public License version 2 (the
|
||||
* "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
|
||||
* with the following added to such license:
|
||||
* Copyright 2017 Broadcom
|
||||
*
|
||||
* As a special exception, the copyright holders of this software give
|
||||
* you permission to link this software with independent modules, and to
|
||||
* copy and distribute the resulting executable under terms of your
|
||||
* choice, provided that you also meet, for each linked independent
|
||||
* module, the terms and conditions of the license of that module. An
|
||||
* independent module is a module which is not derived from this
|
||||
* software. The special exception does not apply to any modifications
|
||||
* of the software.
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License, version 2, as
|
||||
* published by the Free Software Foundation (the "GPL").
|
||||
*
|
||||
* 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 version 2 (GPLv2) for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* version 2 (GPLv2) along with this source code.
|
||||
*/
|
||||
/*
|
||||
* Copyright: (c) 2017 Broadcom Corp.
|
||||
* Copyright: (c) 2018 Broadcom.
|
||||
* All Rights Reserved.
|
||||
*/
|
||||
|
||||
@ -1237,6 +1236,9 @@
|
||||
#define BCM56169_B0_REV_ID 0x11
|
||||
#define BCM56169_B1_REV_ID 0x12
|
||||
|
||||
#define BCM56980_DEVICE_ID 0xb980
|
||||
#define BCM56980_A0_REV_ID 1
|
||||
|
||||
#define BCM56968_DEVICE_ID 0xb968
|
||||
#define BCM56968_A0_REV_ID 1
|
||||
#define BCM56968_B0_REV_ID 0x11
|
||||
@ -1276,90 +1278,95 @@
|
||||
#define BCM56560_DEVICE_ID 0xb560
|
||||
#define BCM56560_A0_REV_ID 1
|
||||
#define BCM56560_B0_REV_ID 0x11
|
||||
#define BCM56560_B1_REV_ID 0x12
|
||||
|
||||
#define BCM56561_DEVICE_ID 0xb561
|
||||
#define BCM56561_A0_REV_ID 1
|
||||
#define BCM56561_B0_REV_ID 0x11
|
||||
#define BCM56561_B1_REV_ID 0x12
|
||||
|
||||
#define BCM56562_DEVICE_ID 0xb562
|
||||
#define BCM56562_A0_REV_ID 1
|
||||
#define BCM56562_B0_REV_ID 0x11
|
||||
#define BCM56562_B1_REV_ID 0x12
|
||||
|
||||
#define BCM56670_DEVICE_ID 0xb670
|
||||
#define BCM56670_A0_REV_ID 1
|
||||
|
||||
#define BCM56671_DEVICE_ID 0xb671
|
||||
#define BCM56671_A0_REV_ID 1
|
||||
|
||||
#define BCM56672_DEVICE_ID 0xb672
|
||||
#define BCM56672_A0_REV_ID 1
|
||||
|
||||
#define BCM56675_DEVICE_ID 0xb675
|
||||
#define BCM56675_A0_REV_ID 1
|
||||
|
||||
#define BCM56565_DEVICE_ID 0xb565
|
||||
#define BCM56565_A0_REV_ID 1
|
||||
#define BCM56565_B0_REV_ID 0x11
|
||||
#define BCM56565_B1_REV_ID 0x12
|
||||
|
||||
#define BCM56566_DEVICE_ID 0xb566
|
||||
#define BCM56566_A0_REV_ID 1
|
||||
#define BCM56566_B0_REV_ID 0x11
|
||||
#define BCM56566_B1_REV_ID 0x12
|
||||
|
||||
#define BCM56567_DEVICE_ID 0xb567
|
||||
#define BCM56567_A0_REV_ID 1
|
||||
#define BCM56567_B0_REV_ID 0x11
|
||||
#define BCM56567_B1_REV_ID 0x12
|
||||
|
||||
#define BCM56568_DEVICE_ID 0xb568
|
||||
#define BCM56568_A0_REV_ID 1
|
||||
#define BCM56568_B0_REV_ID 0x11
|
||||
#define BCM56568_B1_REV_ID 0x12
|
||||
|
||||
#define BCM56760_DEVICE_ID 0xb760
|
||||
#define BCM56760_A0_REV_ID 1
|
||||
#define BCM56760_A1_REV_ID 2
|
||||
#define BCM56760_B0_REV_ID 0x11
|
||||
#define BCM56760_B1_REV_ID 0x12
|
||||
|
||||
#define BCM56761_DEVICE_ID 0xb761
|
||||
#define BCM56761_A0_REV_ID 1
|
||||
#define BCM56761_B0_REV_ID 0x11
|
||||
|
||||
#define BCM56762_DEVICE_ID 0xb762
|
||||
#define BCM56762_A0_REV_ID 1
|
||||
#define BCM56762_B0_REV_ID 0x11
|
||||
#define BCM56762_B1_REV_ID 0x12
|
||||
|
||||
#define BCM56764_DEVICE_ID 0xb764
|
||||
#define BCM56764_A0_REV_ID 1
|
||||
#define BCM56764_B0_REV_ID 0x11
|
||||
#define BCM56764_B1_REV_ID 0x12
|
||||
|
||||
#define BCM56765_DEVICE_ID 0xb765
|
||||
#define BCM56765_A0_REV_ID 1
|
||||
#define BCM56765_B0_REV_ID 0x11
|
||||
#define BCM56765_B1_REV_ID 0x12
|
||||
|
||||
#define BCM56766_DEVICE_ID 0xb766
|
||||
#define BCM56766_A0_REV_ID 1
|
||||
#define BCM56766_B0_REV_ID 0x11
|
||||
#define BCM56766_B1_REV_ID 0x12
|
||||
|
||||
#define BCM56768_DEVICE_ID 0xb768
|
||||
#define BCM56768_A0_REV_ID 1
|
||||
#define BCM56768_B0_REV_ID 0x11
|
||||
#define BCM56768_B1_REV_ID 0x12
|
||||
|
||||
#define BCM56068_DEVICE_ID 0xb068
|
||||
#define BCM56068_A0_REV_ID 1
|
||||
#define BCM56068_B0_REV_ID 0x11
|
||||
#define BCM56068_B1_REV_ID 0x12
|
||||
|
||||
#define BCM56069_DEVICE_ID 0xb069
|
||||
#define BCM56069_A0_REV_ID 1
|
||||
#define BCM56069_B0_REV_ID 0x11
|
||||
#define BCM56069_B1_REV_ID 0x12
|
||||
|
||||
#define BCM56170_DEVICE_ID 0xb170
|
||||
#define BCM56170_A0_REV_ID 1
|
||||
#define BCM56170_B0_REV_ID 0x11
|
||||
#define BCM56172_DEVICE_ID 0xb172
|
||||
#define BCM56172_A0_REV_ID 1
|
||||
#define BCM56172_B0_REV_ID 0x11
|
||||
#define BCM56174_DEVICE_ID 0xb174
|
||||
#define BCM56174_A0_REV_ID 1
|
||||
#define BCM56174_B0_REV_ID 0x11
|
||||
|
||||
#define BCM53570_DEVICE_ID 0x8570
|
||||
#define BCM53570_A0_REV_ID 1
|
||||
#define BCM53570_B0_REV_ID 0x11
|
||||
#define BCM53575_DEVICE_ID 0x8575
|
||||
#define BCM53575_A0_REV_ID 1
|
||||
#define BCM53575_B0_REV_ID 0x11
|
||||
|
||||
|
||||
#define BCM56965_DEVICE_ID 0xb965
|
||||
@ -1384,13 +1391,24 @@
|
||||
#define BCM56974_DEVICE_ID 0xb974
|
||||
#define BCM56974_A0_REV_ID 1
|
||||
#define BCM56974_B0_REV_ID 0x11
|
||||
|
||||
#define BCM56975_DEVICE_ID 0xb975
|
||||
#define BCM56975_A0_REV_ID 1
|
||||
#define BCM56975_B0_REV_ID 0x11
|
||||
|
||||
#define BCM56870_DEVICE_ID 0xb870
|
||||
#define BCM56870_A0_REV_ID 1
|
||||
#define BCM56873_DEVICE_ID 0xb873
|
||||
#define BCM56873_A0_REV_ID 1
|
||||
|
||||
#define BCM53540_DEVICE_ID 0x8540
|
||||
#define BCM53540_A0_REV_ID 1
|
||||
#define BCM53547_DEVICE_ID 0x8547
|
||||
#define BCM53547_A0_REV_ID 1
|
||||
#define BCM53548_DEVICE_ID 0x8548
|
||||
#define BCM53548_A0_REV_ID 1
|
||||
#define BCM53549_DEVICE_ID 0x8549
|
||||
#define BCM53549_A0_REV_ID 1
|
||||
|
||||
#define BCM5665_DEVICE_ID 0x5665
|
||||
#define BCM5665_A0_REV_ID 1
|
||||
#define BCM5665_B0_REV_ID 0x11
|
||||
@ -1695,8 +1713,27 @@
|
||||
#define BCM88955_A1_REV_ID 0x0002
|
||||
#define BCM88956_DEVICE_ID 0x8956
|
||||
#define BCM88956_A1_REV_ID 0x0002
|
||||
#define DNXC_A0_REV_ID 0x0001
|
||||
#define DNXC_A1_REV_ID 0x0002
|
||||
#define DNXC_B0_REV_ID 0x0011
|
||||
#define BCM88790_DEVICE_ID 0x8790
|
||||
#define BCM88790_A0_REV_ID 0x0001
|
||||
#define BCM88790_A0_REV_ID DNXC_A0_REV_ID
|
||||
#define BCM88791_DEVICE_ID 0x8791
|
||||
#define BCM88792_DEVICE_ID 0x8792
|
||||
#define BCM88793_DEVICE_ID 0x8793
|
||||
#define BCM88794_DEVICE_ID 0x8794
|
||||
#define BCM88795_DEVICE_ID 0x8795
|
||||
#define BCM88796_DEVICE_ID 0x8796
|
||||
#define BCM88797_DEVICE_ID 0x8797
|
||||
#define BCM88798_DEVICE_ID 0x8798
|
||||
#define BCM88799_DEVICE_ID 0x8799
|
||||
#define BCM8879A_DEVICE_ID 0x879A
|
||||
#define BCM8879B_DEVICE_ID 0x879B
|
||||
#define BCM8879C_DEVICE_ID 0x879C
|
||||
#define BCM8879D_DEVICE_ID 0x879D
|
||||
#define BCM8879E_DEVICE_ID 0x879E
|
||||
#define BCM8879F_DEVICE_ID 0x879F
|
||||
#define BCM_DNXF_DEVID_MASK 0xFFF0
|
||||
#define ARADPLUS_DEVICE_ID 0x8660
|
||||
#define ARADPLUS_A0_REV_ID 0x0001
|
||||
#define BCM88660_DEVICE_ID ARADPLUS_DEVICE_ID
|
||||
@ -1865,6 +1902,7 @@
|
||||
#define BCM88272_DEVICE_ID 0x8272
|
||||
#define BCM88273_DEVICE_ID 0x8273
|
||||
#define BCM88278_DEVICE_ID 0x8278
|
||||
#define BCM88279_DEVICE_ID 0x8279
|
||||
|
||||
#define FLAIR_DEVICE_ID 0xF000
|
||||
#define FLAIR_A0_REV_ID 0x0001
|
||||
@ -1922,11 +1960,11 @@
|
||||
#define BCM88654_DEVICE_ID 0x8654
|
||||
#define BCM88654_B1_REV_ID ARAD_B1_REV_ID
|
||||
|
||||
#define BCM88772_DEVICE_ID 0x8772
|
||||
#define BCM88952_DEVICE_ID 0x8952
|
||||
#define BCM88772_A1_REV_ID 0x0002
|
||||
#define BCM88952_A0_REV_ID 0x0001
|
||||
#define BCM88952_A1_REV_ID 0x0002
|
||||
#define BCM88772_DEVICE_ID 0x8772
|
||||
#define BCM88952_DEVICE_ID 0x8952
|
||||
#define BCM88772_A1_REV_ID 0x0002
|
||||
#define BCM88952_A0_REV_ID 0x0001
|
||||
#define BCM88952_A1_REV_ID 0x0002
|
||||
|
||||
#define BCM88752_DEVICE_ID 0x8752
|
||||
#define BCM88752_A0_REV_ID 0x0000
|
||||
|
@ -1,18 +1,17 @@
|
||||
#
|
||||
# Unless you and Broadcom execute a separate written software license
|
||||
# agreement governing use of this software, this software is licensed to
|
||||
# you under the terms of the GNU General Public License version 2 (the
|
||||
# "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
|
||||
# with the following added to such license:
|
||||
# Copyright 2017 Broadcom
|
||||
#
|
||||
# As a special exception, the copyright holders of this software give
|
||||
# you permission to link this software with independent modules, and to
|
||||
# copy and distribute the resulting executable under terms of your
|
||||
# choice, provided that you also meet, for each linked independent
|
||||
# module, the terms and conditions of the license of that module. An
|
||||
# independent module is a module which is not derived from this
|
||||
# software. The special exception does not apply to any modifications
|
||||
# of the software.
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License, version 2, as
|
||||
# published by the Free Software Foundation (the "GPL").
|
||||
#
|
||||
# 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 version 2 (GPLv2) for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# version 2 (GPLv2) along with this source code.
|
||||
#
|
||||
# $Id: Make.config,v 1.3 Broadcom SDK $
|
||||
# $Copyright: (c) 2005 Broadcom Corp.
|
||||
|
@ -1,18 +1,17 @@
|
||||
#
|
||||
# Unless you and Broadcom execute a separate written software license
|
||||
# agreement governing use of this software, this software is licensed to
|
||||
# you under the terms of the GNU General Public License version 2 (the
|
||||
# "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
|
||||
# with the following added to such license:
|
||||
# Copyright 2017 Broadcom
|
||||
#
|
||||
# As a special exception, the copyright holders of this software give
|
||||
# you permission to link this software with independent modules, and to
|
||||
# copy and distribute the resulting executable under terms of your
|
||||
# choice, provided that you also meet, for each linked independent
|
||||
# module, the terms and conditions of the license of that module. An
|
||||
# independent module is a module which is not derived from this
|
||||
# software. The special exception does not apply to any modifications
|
||||
# of the software.
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License, version 2, as
|
||||
# published by the Free Software Foundation (the "GPL").
|
||||
#
|
||||
# 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 version 2 (GPLv2) for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# version 2 (GPLv2) along with this source code.
|
||||
#
|
||||
# $Id: Make.depend,v 1.14 Broadcom SDK $
|
||||
# $Copyright: (c) 2005 Broadcom Corp.
|
||||
|
@ -1,18 +1,17 @@
|
||||
#
|
||||
# Unless you and Broadcom execute a separate written software license
|
||||
# agreement governing use of this software, this software is licensed to
|
||||
# you under the terms of the GNU General Public License version 2 (the
|
||||
# "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
|
||||
# with the following added to such license:
|
||||
# Copyright 2017 Broadcom
|
||||
#
|
||||
# As a special exception, the copyright holders of this software give
|
||||
# you permission to link this software with independent modules, and to
|
||||
# copy and distribute the resulting executable under terms of your
|
||||
# choice, provided that you also meet, for each linked independent
|
||||
# module, the terms and conditions of the license of that module. An
|
||||
# independent module is a module which is not derived from this
|
||||
# software. The special exception does not apply to any modifications
|
||||
# of the software.
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License, version 2, as
|
||||
# published by the Free Software Foundation (the "GPL").
|
||||
#
|
||||
# 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 version 2 (GPLv2) for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# version 2 (GPLv2) along with this source code.
|
||||
#
|
||||
# $Id: Make.kernlib,v 1.7 Broadcom SDK $
|
||||
# $Copyright: (c) 2005 Broadcom Corp.
|
||||
|
@ -1,18 +1,17 @@
|
||||
#
|
||||
# Unless you and Broadcom execute a separate written software license
|
||||
# agreement governing use of this software, this software is licensed to
|
||||
# you under the terms of the GNU General Public License version 2 (the
|
||||
# "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
|
||||
# with the following added to such license:
|
||||
# Copyright 2017 Broadcom
|
||||
#
|
||||
# As a special exception, the copyright holders of this software give
|
||||
# you permission to link this software with independent modules, and to
|
||||
# copy and distribute the resulting executable under terms of your
|
||||
# choice, provided that you also meet, for each linked independent
|
||||
# module, the terms and conditions of the license of that module. An
|
||||
# independent module is a module which is not derived from this
|
||||
# software. The special exception does not apply to any modifications
|
||||
# of the software.
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License, version 2, as
|
||||
# published by the Free Software Foundation (the "GPL").
|
||||
#
|
||||
# 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 version 2 (GPLv2) for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# version 2 (GPLv2) along with this source code.
|
||||
#
|
||||
# $Id: Make.lib,v 1.14 Broadcom SDK $
|
||||
# $Copyright: (c) 2005 Broadcom Corp.
|
||||
|
@ -1,18 +1,17 @@
|
||||
#
|
||||
# Unless you and Broadcom execute a separate written software license
|
||||
# agreement governing use of this software, this software is licensed to
|
||||
# you under the terms of the GNU General Public License version 2 (the
|
||||
# "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
|
||||
# with the following added to such license:
|
||||
# Copyright 2017 Broadcom
|
||||
#
|
||||
# As a special exception, the copyright holders of this software give
|
||||
# you permission to link this software with independent modules, and to
|
||||
# copy and distribute the resulting executable under terms of your
|
||||
# choice, provided that you also meet, for each linked independent
|
||||
# module, the terms and conditions of the license of that module. An
|
||||
# independent module is a module which is not derived from this
|
||||
# software. The special exception does not apply to any modifications
|
||||
# of the software.
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License, version 2, as
|
||||
# published by the Free Software Foundation (the "GPL").
|
||||
#
|
||||
# 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 version 2 (GPLv2) for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# version 2 (GPLv2) along with this source code.
|
||||
#
|
||||
#
|
||||
# $Id: Make.linux,v 1.18 Broadcom SDK $
|
||||
|
@ -1,2 +0,0 @@
|
||||
#Changing value of this Knet filter
|
||||
CFGFLAGS += -UKCOM_FILTER_MAX -DKCOM_FILTER_MAX=256
|
@ -1,18 +1,17 @@
|
||||
#
|
||||
# Unless you and Broadcom execute a separate written software license
|
||||
# agreement governing use of this software, this software is licensed to
|
||||
# you under the terms of the GNU General Public License version 2 (the
|
||||
# "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
|
||||
# with the following added to such license:
|
||||
# Copyright 2017 Broadcom
|
||||
#
|
||||
# As a special exception, the copyright holders of this software give
|
||||
# you permission to link this software with independent modules, and to
|
||||
# copy and distribute the resulting executable under terms of your
|
||||
# choice, provided that you also meet, for each linked independent
|
||||
# module, the terms and conditions of the license of that module. An
|
||||
# independent module is a module which is not derived from this
|
||||
# software. The special exception does not apply to any modifications
|
||||
# of the software.
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License, version 2, as
|
||||
# published by the Free Software Foundation (the "GPL").
|
||||
#
|
||||
# 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 version 2 (GPLv2) for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# version 2 (GPLv2) along with this source code.
|
||||
#
|
||||
# $Id: Make.subdirs,v 1.8 Broadcom SDK $
|
||||
# $Copyright: (c) 2005 Broadcom Corp.
|
||||
|
@ -1,18 +1,17 @@
|
||||
#
|
||||
# Unless you and Broadcom execute a separate written software license
|
||||
# agreement governing use of this software, this software is licensed to
|
||||
# you under the terms of the GNU General Public License version 2 (the
|
||||
# "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
|
||||
# with the following added to such license:
|
||||
# Copyright 2017 Broadcom
|
||||
#
|
||||
# As a special exception, the copyright holders of this software give
|
||||
# you permission to link this software with independent modules, and to
|
||||
# copy and distribute the resulting executable under terms of your
|
||||
# choice, provided that you also meet, for each linked independent
|
||||
# module, the terms and conditions of the license of that module. An
|
||||
# independent module is a module which is not derived from this
|
||||
# software. The special exception does not apply to any modifications
|
||||
# of the software.
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License, version 2, as
|
||||
# published by the Free Software Foundation (the "GPL").
|
||||
#
|
||||
# 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 version 2 (GPLv2) for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# version 2 (GPLv2) along with this source code.
|
||||
#
|
||||
# $Id: Make.tools,v 1.2 Broadcom SDK $
|
||||
# $Copyright: (c) 2005 Broadcom Corp.
|
||||
|
122
platform/broadcom/saibcm-modules/make/Makefile.linux-bmw-2_6
Normal file
122
platform/broadcom/saibcm-modules/make/Makefile.linux-bmw-2_6
Normal file
@ -0,0 +1,122 @@
|
||||
#
|
||||
# Copyright 2017 Broadcom
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License, version 2, as
|
||||
# published by the Free Software Foundation (the "GPL").
|
||||
#
|
||||
# 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 version 2 (GPLv2) for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# version 2 (GPLv2) along with this source code.
|
||||
#
|
||||
# $Id: Makefile.linux-bmw-2_6,v 1.20 Broadcom SDK $
|
||||
# $Copyright: (c) 2005 Broadcom Corp.
|
||||
# All Rights Reserved.$
|
||||
|
||||
# Look for custom tools
|
||||
ifneq (,$(PPC_TOOLS_DIR))
|
||||
ifneq (,$(PPC_CROSS_COMPILE))
|
||||
override PATH := $(PPC_TOOLS_DIR):$(PATH)
|
||||
override CROSS_COMPILE := $(PPC_CROSS_COMPILE)
|
||||
endif
|
||||
endif
|
||||
|
||||
# Default tools
|
||||
ifeq (,$(WRS_LINUX_VERSION))
|
||||
WRS_LINUX_VERSION=2.0
|
||||
endif
|
||||
|
||||
# Default Linux Kernel directory
|
||||
ifeq (,$(KERNDIR))
|
||||
|
||||
ifeq (1.4,$(WRS_LINUX_VERSION))
|
||||
|
||||
KERNDIR := /projects/ntsw-tools/linux/wrslinux_1.4/bcm98245cpci/build/linux-2.6.14-cgl
|
||||
|
||||
ifeq (,$(CROSS_COMPILE))
|
||||
CROSS_COMPILE = powerpc-wrs-linux-gnu-603e-glibc_std-
|
||||
endif
|
||||
|
||||
WRLINUX_BASE=/tools/windriver/linux_ed/1.4/Linux
|
||||
export WIND_LIC_PROXY = $(WRLINUX_BASE)/setup/x86-linux2/bin
|
||||
override PATH := $(WRLINUX_BASE)/gnu/3.4.4-wrlinux-1.4/x86-linux2/bin:$(PATH)
|
||||
|
||||
WRS_SYSROOT_PATH := $(WRLINUX_GNU_PATH)/../lib/gcc/powerpc-wrs-linux-gnu/3.4.4/include
|
||||
else
|
||||
|
||||
ifeq (2.0,$(WRS_LINUX_VERSION))
|
||||
|
||||
ifeq (,$(CROSS_COMPILE))
|
||||
CROSS_COMPILE = powerpc-wrs-linux-gnu-ppc_603e-glibc_std-
|
||||
endif
|
||||
|
||||
KERNDIR:= /projects/ntsw-tools/linux/wrslinux_2.0/bmw/glibc_std/build/linux-2.6.21-standard
|
||||
|
||||
WRLINUX_BASE=/tools/windriver/linux_ed/2.0_GA/Linux
|
||||
|
||||
TOOLCHAIN_EXEC_PREFIX=$(WRLINUX_BASE)/gnu/4.1-wrlinux-2.0/x86-linux2
|
||||
TOOLCHAIN_BIN_DIR=$(TOOLCHAIN_EXEC_PREFIX)
|
||||
WIND_LIC_PROXY=$(WRLINUX_BASE)/setup/x86-linux2/bin
|
||||
|
||||
WRLINUX_GNU_PATH = $(WRLINUX_BASE)/gnu/4.1-wrlinux-2.0/x86-linux2/bin
|
||||
|
||||
override PATH := $(TOOLCHAIN_EXEC_PREFIX):$(KERNDIR)/../../host-cross/bin:$(KERNDIR)/../../host-cross/powerpc-wrs-linux-gnu/bin:$(WRLINUX_GNU_PATH):$(PATH)
|
||||
|
||||
export TOOLCHAIN_EXEC_PREFIX TOOLCHAIN_BIN_DIR WIND_LIC_PROXY
|
||||
|
||||
WRS_SYSROOT_PATH := $(WRLINUX_GNU_PATH)/../lib/gcc/powerpc-wrs-linux-gnu/4.1.2/include
|
||||
|
||||
comma = ,
|
||||
basetarget = $(basename $(notdir $@))
|
||||
modname = $(basetarget)
|
||||
|
||||
# Extra variables.
|
||||
EXTRA_CFLAGS = -D"KBUILD_STR(s)=\#s" $(basename_flags) $(modname_flags)
|
||||
|
||||
name-fix = $(subst $(comma),_,$(subst -,_,$1))
|
||||
basename_flags = -D"KBUILD_BASENAME=KBUILD_STR($(call name-fix,$(basetarget)))"
|
||||
modname_flags = $(if $(filter 1,$(words $(modname))),\
|
||||
-D"KBUILD_MODNAME=KBUILD_STR($(call name-fix,$(modname)))")
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
# Default Linux include directory
|
||||
ifeq (,$(LINUX_INCLUDE))
|
||||
LINUX_INCLUDE := $(KERNDIR)/include
|
||||
endif
|
||||
|
||||
CFGFLAGS += -DSYS_BE_PIO=1 -DSYS_BE_PACKET=0 -DSYS_BE_OTHER=1
|
||||
ENDIAN = BE_HOST=1
|
||||
CFGFLAGS += -D$(ENDIAN)
|
||||
CFGFLAGS += -DBCM_PLATFORM_STRING=\"BMW_MPC8245/PPC603e\"
|
||||
|
||||
ARCH = ppc
|
||||
KBUILD_VERBOSE = 1
|
||||
|
||||
export ARCH KBUILD_VERBOSE
|
||||
|
||||
ifeq (1.4,$(WRS_LINUX_VERSION))
|
||||
# From linux/arch/ppc/Makefile
|
||||
|
||||
ifeq (,$(KFLAGS))
|
||||
KFLAGS := -D__KERNEL__ -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -fsigned-char -msoft-float -pipe -ffixed-r2 -Wno-uninitialized -mmultiple -mstring
|
||||
endif
|
||||
|
||||
else
|
||||
ifeq (2.0,$(WRS_LINUX_VERSION))
|
||||
|
||||
ifeq (,$(KFLAGS))
|
||||
KFLAGS := -D__KERNEL__ -m32 -nostdinc -isystem $(WRS_SYSROOT_PATH) -I$(LINUX_INCLUDE) -include $(LINUX_INCLUDE)/linux/autoconf.h -I$(KERNDIR)/arch/ppc -I$(KERNDIR)/arch/ppc/include -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -msoft-float -pipe -ffixed-r2 -mmultiple -mno-altivec -mstring -fomit-frame-pointer -fno-stack-protector -Wdeclaration-after-statement -Wno-pointer-sign
|
||||
endif
|
||||
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($(targetplat),user)
|
||||
include ${SDK}/make/Makefile.linux-kernel-2_6
|
||||
endif
|
@ -1,18 +1,17 @@
|
||||
#
|
||||
# Unless you and Broadcom execute a separate written software license
|
||||
# agreement governing use of this software, this software is licensed to
|
||||
# you under the terms of the GNU General Public License version 2 (the
|
||||
# "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
|
||||
# with the following added to such license:
|
||||
# Copyright 2017 Broadcom
|
||||
#
|
||||
# As a special exception, the copyright holders of this software give
|
||||
# you permission to link this software with independent modules, and to
|
||||
# copy and distribute the resulting executable under terms of your
|
||||
# choice, provided that you also meet, for each linked independent
|
||||
# module, the terms and conditions of the license of that module. An
|
||||
# independent module is a module which is not derived from this
|
||||
# software. The special exception does not apply to any modifications
|
||||
# of the software.
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License, version 2, as
|
||||
# published by the Free Software Foundation (the "GPL").
|
||||
#
|
||||
# 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 version 2 (GPLv2) for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# version 2 (GPLv2) along with this source code.
|
||||
#
|
||||
# $Id: Makefile.linux-gto-4_4,v 1.42 Broadcom SDK $
|
||||
# $Copyright: (c) 2015 Broadcom Corp.
|
||||
|
@ -1,18 +1,17 @@
|
||||
#
|
||||
# Unless you and Broadcom execute a separate written software license
|
||||
# agreement governing use of this software, this software is licensed to
|
||||
# you under the terms of the GNU General Public License version 2 (the
|
||||
# "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
|
||||
# with the following added to such license:
|
||||
# Copyright 2017 Broadcom
|
||||
#
|
||||
# As a special exception, the copyright holders of this software give
|
||||
# you permission to link this software with independent modules, and to
|
||||
# copy and distribute the resulting executable under terms of your
|
||||
# choice, provided that you also meet, for each linked independent
|
||||
# module, the terms and conditions of the license of that module. An
|
||||
# independent module is a module which is not derived from this
|
||||
# software. The special exception does not apply to any modifications
|
||||
# of the software.
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License, version 2, as
|
||||
# published by the Free Software Foundation (the "GPL").
|
||||
#
|
||||
# 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 version 2 (GPLv2) for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# version 2 (GPLv2) along with this source code.
|
||||
#
|
||||
# $Id: Makefile.linux-gto-2_6,v 1.42 Broadcom SDK $
|
||||
# $Copyright: (c) 2005 Broadcom Corp.
|
||||
@ -255,7 +254,13 @@ CFLAGS += -DBCM_PLX9656_LOCAL_BUS -DBDE_LINUX_NON_INTERRUPTIBLE -DSHADOW_SVK
|
||||
endif
|
||||
|
||||
ifeq (,$(KFLAGS))
|
||||
KFLAGS := -D__KERNEL__ -m32 -nostdinc -isystem $(KFLAG_INCLD) -I$(LINUX_INCLUDE) -include $(LINUX_INCLUDE)/linux/version.h -include $(LINUX_INCLUDE)/generated/autoconf.h -I$(KERNDIR)/arch/powerpc -I$(KERNDIR)/arch/powerpc -I$(KERNDIR)/arch/powerpc/include -I$(KERNDIR)/include/asm-powerpc -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -msoft-float -pipe -ffixed-r2 -mmultiple -mno-altivec -funit-at-a-time -Wa,-me500 -fomit-frame-pointer -Wdeclaration-after-statement -Wno-pointer-sign
|
||||
#autoconf.h was moved in later kernels
|
||||
LINUX_AUTOCONF = $(LINUX_INCLUDE)/generated/autoconf.h
|
||||
ifeq (,$(shell ls $(LINUX_AUTOCONF) 2>/dev/null))
|
||||
LINUX_AUTOCONF = $(LINUX_INCLUDE)/linux/autoconf.h
|
||||
endif
|
||||
|
||||
KFLAGS := -D__KERNEL__ -m32 -nostdinc -isystem $(KFLAG_INCLD) -I$(LINUX_INCLUDE) -include $(LINUX_INCLUDE)/linux/version.h -include $(LINUX_AUTOCONF) -I$(KERNDIR)/arch/powerpc -I$(KERNDIR)/arch/powerpc -I$(KERNDIR)/arch/powerpc/include -I$(KERNDIR)/include/asm-powerpc -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -msoft-float -pipe -ffixed-r2 -mmultiple -mno-altivec -funit-at-a-time -Wa,-me500 -fomit-frame-pointer -Wdeclaration-after-statement -Wno-pointer-sign
|
||||
endif
|
||||
|
||||
#Wind river Linux 3.0 needs addtional flags
|
||||
|
@ -1,18 +1,17 @@
|
||||
#
|
||||
# Unless you and Broadcom execute a separate written software license
|
||||
# agreement governing use of this software, this software is licensed to
|
||||
# you under the terms of the GNU General Public License version 2 (the
|
||||
# "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
|
||||
# with the following added to such license:
|
||||
# Copyright 2017 Broadcom
|
||||
#
|
||||
# As a special exception, the copyright holders of this software give
|
||||
# you permission to link this software with independent modules, and to
|
||||
# copy and distribute the resulting executable under terms of your
|
||||
# choice, provided that you also meet, for each linked independent
|
||||
# module, the terms and conditions of the license of that module. An
|
||||
# independent module is a module which is not derived from this
|
||||
# software. The special exception does not apply to any modifications
|
||||
# of the software.
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License, version 2, as
|
||||
# published by the Free Software Foundation (the "GPL").
|
||||
#
|
||||
# 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 version 2 (GPLv2) for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# version 2 (GPLv2) along with this source code.
|
||||
#
|
||||
# $Id: Makefile.linux-iproc Exp $
|
||||
# $Copyright: (c) 2007 Broadcom Corp.
|
||||
|
@ -1,18 +1,17 @@
|
||||
#
|
||||
# Unless you and Broadcom execute a separate written software license
|
||||
# agreement governing use of this software, this software is licensed to
|
||||
# you under the terms of the GNU General Public License version 2 (the
|
||||
# "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
|
||||
# with the following added to such license:
|
||||
# Copyright 2017 Broadcom
|
||||
#
|
||||
# As a special exception, the copyright holders of this software give
|
||||
# you permission to link this software with independent modules, and to
|
||||
# copy and distribute the resulting executable under terms of your
|
||||
# choice, provided that you also meet, for each linked independent
|
||||
# module, the terms and conditions of the license of that module. An
|
||||
# independent module is a module which is not derived from this
|
||||
# software. The special exception does not apply to any modifications
|
||||
# of the software.
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License, version 2, as
|
||||
# published by the Free Software Foundation (the "GPL").
|
||||
#
|
||||
# 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 version 2 (GPLv2) for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# version 2 (GPLv2) along with this source code.
|
||||
#
|
||||
# $Id: Makefile.linux-iproc-3_6,v 1.1 Broadcom SDK $
|
||||
# $Copyright: (c) 2007 Broadcom Corp.
|
||||
|
166
platform/broadcom/saibcm-modules/make/Makefile.linux-jag-2_6
Normal file
166
platform/broadcom/saibcm-modules/make/Makefile.linux-jag-2_6
Normal file
@ -0,0 +1,166 @@
|
||||
#
|
||||
# Copyright 2017 Broadcom
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License, version 2, as
|
||||
# published by the Free Software Foundation (the "GPL").
|
||||
#
|
||||
# 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 version 2 (GPLv2) for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# version 2 (GPLv2) along with this source code.
|
||||
#
|
||||
# $Id: Makefile.linux-jag-2_6,v 1.20 Broadcom SDK $
|
||||
# $Copyright: (c) 2007 Broadcom Corp.
|
||||
# All Rights Reserved.$
|
||||
|
||||
|
||||
# User must select one platform from below.By default WR_LINUX is selected. .
|
||||
ifeq (,$(BUILD_PLATFORM))
|
||||
#BUILD_PLATFORM=ELDK
|
||||
BUILD_PLATFORM=WR_LINUX
|
||||
endif
|
||||
|
||||
|
||||
# Specify the KERNEL VERSION you want to use for building SDK.
|
||||
ifeq (ELDK,$(BUILD_PLATFORM))
|
||||
ifeq (,$(KERN_VER))
|
||||
KERN_VER=2.6.21.7
|
||||
endif
|
||||
endif
|
||||
|
||||
# Specify the Windriver Linux version here.For example '2.0' as shown below.
|
||||
ifeq (WR_LINUX,$(BUILD_PLATFORM))
|
||||
ifeq (,$(WRS_LINUX_VERSION))
|
||||
WRS_LINUX_VERSION=2.0
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq (WR_LINUX,$(BUILD_PLATFORM))
|
||||
ifeq (1.4,$(WRS_LINUX_VERSION))
|
||||
|
||||
KERNDIR := /projects/ntsw-tools/linux/wrslinux_1.4/broadcom_bcm95836cpci_be/build/linux-2.6.14-small
|
||||
|
||||
ifeq (,$(CROSS_COMPILE))
|
||||
CROSS_COMPILE := mips-wrs-linux-gnu-
|
||||
endif
|
||||
|
||||
export WIND_LIC_PROXY = /projects/ntsw-tools/wrs/wrs_linux/GPP_LE_1.4_PPR/setup/x86-linux2/bin
|
||||
|
||||
override PATH := /projects/ntsw-tools/wrs/wrs_linux/GPP_LE_1.4_PPR/gnu/3.4.4-wrlinux-1.4/x86-linux2/bin:$(PATH)
|
||||
endif
|
||||
|
||||
ifeq (2.0,$(WRS_LINUX_VERSION))
|
||||
|
||||
#CROSS_COMPILE = mips-wrs-linux-gnu-
|
||||
|
||||
ifeq (,$(CROSS_COMPILE))
|
||||
CROSS_COMPILE := mips-wrs-linux-gnu-mips_softfp-glibc_std-
|
||||
endif
|
||||
|
||||
KERNDIR:= /projects/ntsw-tools/linux/wrslinux_2.0/jag/glibc_std/build/linux-2.6.21-standard
|
||||
|
||||
endif
|
||||
|
||||
WRLINUX_BASE=/tools/windriver/linux_ed/2.0_GA/Linux
|
||||
|
||||
TOOLCHAIN_BIN_DIR=$(KERNDIR)/../../host-cross/mips-wrs-linux-gnu/bin
|
||||
WIND_LIC_PROXY=$(WRLINUX_BASE)/setup/x86-linux2/bin
|
||||
|
||||
WRLINUX_GNU_PATH=$(WRLINUX_BASE)/gnu/4.1-wrlinux-2.0/x86-linux2/bin
|
||||
|
||||
override PATH:=$(KERNDIR)/../../host-cross/bin:$(KERNDIR)/../../host-cross/mips-wrs-linux-gnu/bin:$(WRLINUX_GNU_PATH):$(PATH)
|
||||
|
||||
WRS_SYSROOT_PATH := $(WRLINUX_GNU_PATH)/../lib/gcc/mips-wrs-linux-gnu/4.1.2/include
|
||||
|
||||
export TOOLCHAIN_BIN_DIR WIND_LIC_PROXY
|
||||
endif
|
||||
|
||||
ifeq (ELDK,$(BUILD_PLATFORM))
|
||||
ifeq (2.6.21.7, $(KERN_VER))
|
||||
|
||||
ifeq (,$(CROSS_COMPILE))
|
||||
CROSS_COMPILE := mips_4KC-
|
||||
endif
|
||||
|
||||
override PATH := /tools/eldk/4.1/usr/bin:$(PATH)
|
||||
KERNDIR ?= /projects/ntsw-tools/linux/eldk/jag-ntswics-eldk/linux-2.6.21.7
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
|
||||
comma = ,
|
||||
basetarget = $(basename $(notdir $@))
|
||||
modname = $(basetarget)
|
||||
|
||||
# Extra variables.
|
||||
EXTRA_CFLAGS = -D"KBUILD_STR(s)=\#s" $(basename_flags) $(modname_flags)
|
||||
|
||||
name-fix = $(subst $(comma),_,$(subst -,_,$1))
|
||||
basename_flags = -D"KBUILD_BASENAME=KBUILD_STR($(call name-fix,$(basetarget)))"
|
||||
modname_flags = $(if $(filter 1,$(words $(modname))),\
|
||||
-D"KBUILD_MODNAME=KBUILD_STR($(call name-fix,$(modname)))")
|
||||
|
||||
|
||||
# Default Linux include directory
|
||||
ifeq (,$(LINUX_INCLUDE))
|
||||
LINUX_INCLUDE := $(KERNDIR)/include
|
||||
endif
|
||||
|
||||
CFGFLAGS += -DSYS_BE_PIO=0 -DSYS_BE_PACKET=1 -DSYS_BE_OTHER=0
|
||||
ENDIAN = BE_HOST=1
|
||||
CFGFLAGS += -D$(ENDIAN)
|
||||
CFGFLAGS += -DBCM_PLATFORM_STRING=\"JAG_BCM4704\"
|
||||
|
||||
ARCH = mips
|
||||
KBUILD_VERBOSE = 1
|
||||
|
||||
export ARCH KBUILD_VERBOSE
|
||||
|
||||
ifeq (ELDK,$(BUILD_PLATFORM))
|
||||
KFLAG_INCLD = /tools/eldk/4.1/usr/lib/gcc/mips-linux/4.0.0/include/
|
||||
endif
|
||||
|
||||
ifeq (1.4,$(WRS_LINUX_VERSION))
|
||||
# From linux/arch/mips/Makefile
|
||||
|
||||
ifeq (,$(KFLAGS))
|
||||
KFLAGS := -D__KERNEL__ -Wall -Wno-trigraphs -fno-strict-aliasing -fno-common -ffreestanding -O2 -fomit-frame-pointer -g -G 0 -mno-abicalls -fno-pic -pipe -march=mips32 -Wa,-mips32 -Wa,--trap -funit-at-a-time -mlong-calls -Wundef -finline-limit=100000 -mabi=32
|
||||
endif
|
||||
|
||||
#-Wdeclaration-after-statement -Wstrict-prototypes
|
||||
else
|
||||
|
||||
ifeq (2.0,$(WRS_LINUX_VERSION))
|
||||
|
||||
ifeq (,$(KFLAGS))
|
||||
KFLAGS := -D__KERNEL__ -nostdinc -isystem $(WRS_SYSROOT_PATH) -I$(LINUX_INCLUDE) -include $(LINUX_INCLUDE)/linux/autoconf.h -I$(KERNDIR)/arch/mips -I$(KERNDIR)/arch/mips -I$(KERNDIR)/arch/mips/include -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -mabi=32 -G 0 -mno-abicalls -fno-pic -pipe -msoft-float -ffreestanding -march=mips32 -Wa,-mips32 -Wa,--trap -Iinclude/asm-mips/mach-bcm947xx -Iinclude/asm-mips/mach-generic -fomit-frame-pointer -g -fno-stack-protector -Wdeclaration-after-statement -Wno-pointer-sign -mlong-calls
|
||||
endif
|
||||
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq (ELDK,$(BUILD_PLATFORM))
|
||||
|
||||
ifeq (,$(KFLAGS))
|
||||
KFLAGS := -D__KERNEL__ -nostdinc -isystem $(KFLAG_INCLD) -I$(LINUX_INCLUDE) -include $(LINUX_INCLUDE)/linux/autoconf.h -I$(KERNDIR)/arch/mips -I$(KERNDIR)/arch/mips -I$(KERNDIR)/arch/mips/include -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -mabi=32 -G 0 -mno-abicalls -fno-pic -pipe -msoft-float -ffreestanding -march=mips32 -Wa,-mips32 -Wa,--trap -Iinclude/asm-mips/mach-bcm947xx -Iinclude/asm-mips/mach-generic -fomit-frame-pointer -g -Wdeclaration-after-statement -mlong-calls
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
ifneq ($(targetplat),user)
|
||||
include ${SDK}/make/Makefile.linux-kernel-2_6
|
||||
endif
|
||||
|
||||
ifneq (,$(findstring TCL,$(FEATURE_LIST)))
|
||||
LINK_STATIC=0
|
||||
export LINK_STATIC
|
||||
endif
|
||||
|
||||
|
||||
|
||||
|
@ -1,18 +1,17 @@
|
||||
#
|
||||
# Unless you and Broadcom execute a separate written software license
|
||||
# agreement governing use of this software, this software is licensed to
|
||||
# you under the terms of the GNU General Public License version 2 (the
|
||||
# "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
|
||||
# with the following added to such license:
|
||||
# Copyright 2017 Broadcom
|
||||
#
|
||||
# As a special exception, the copyright holders of this software give
|
||||
# you permission to link this software with independent modules, and to
|
||||
# copy and distribute the resulting executable under terms of your
|
||||
# choice, provided that you also meet, for each linked independent
|
||||
# module, the terms and conditions of the license of that module. An
|
||||
# independent module is a module which is not derived from this
|
||||
# software. The special exception does not apply to any modifications
|
||||
# of the software.
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License, version 2, as
|
||||
# published by the Free Software Foundation (the "GPL").
|
||||
#
|
||||
# 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 version 2 (GPLv2) for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# version 2 (GPLv2) along with this source code.
|
||||
#
|
||||
# $Id: Makefile.linux-kernel,v 1.27 Broadcom SDK $
|
||||
# $Copyright: (c) 2005 Broadcom Corp.
|
||||
|
@ -1,18 +1,17 @@
|
||||
#
|
||||
# Unless you and Broadcom execute a separate written software license
|
||||
# agreement governing use of this software, this software is licensed to
|
||||
# you under the terms of the GNU General Public License version 2 (the
|
||||
# "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
|
||||
# with the following added to such license:
|
||||
# Copyright 2017 Broadcom
|
||||
#
|
||||
# As a special exception, the copyright holders of this software give
|
||||
# you permission to link this software with independent modules, and to
|
||||
# copy and distribute the resulting executable under terms of your
|
||||
# choice, provided that you also meet, for each linked independent
|
||||
# module, the terms and conditions of the license of that module. An
|
||||
# independent module is a module which is not derived from this
|
||||
# software. The special exception does not apply to any modifications
|
||||
# of the software.
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License, version 2, as
|
||||
# published by the Free Software Foundation (the "GPL").
|
||||
#
|
||||
# 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 version 2 (GPLv2) for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# version 2 (GPLv2) along with this source code.
|
||||
#
|
||||
# $Id: Makefile.linux-kernel-2_6,v 1.40 Broadcom SDK $
|
||||
# $Copyright: (c) 2005 Broadcom Corp.
|
||||
|
@ -1,18 +1,17 @@
|
||||
#
|
||||
# Unless you and Broadcom execute a separate written software license
|
||||
# agreement governing use of this software, this software is licensed to
|
||||
# you under the terms of the GNU General Public License version 2 (the
|
||||
# "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
|
||||
# with the following added to such license:
|
||||
# Copyright 2017 Broadcom
|
||||
#
|
||||
# As a special exception, the copyright holders of this software give
|
||||
# you permission to link this software with independent modules, and to
|
||||
# copy and distribute the resulting executable under terms of your
|
||||
# choice, provided that you also meet, for each linked independent
|
||||
# module, the terms and conditions of the license of that module. An
|
||||
# independent module is a module which is not derived from this
|
||||
# software. The special exception does not apply to any modifications
|
||||
# of the software.
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License, version 2, as
|
||||
# published by the Free Software Foundation (the "GPL").
|
||||
#
|
||||
# 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 version 2 (GPLv2) for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# version 2 (GPLv2) along with this source code.
|
||||
#
|
||||
# $Id: Makefile.linux-kernel-3_6,v 1.2 Broadcom SDK $
|
||||
# $Copyright: (c) 2005 Broadcom Corp.
|
||||
|
@ -1,18 +1,17 @@
|
||||
#
|
||||
# Unless you and Broadcom execute a separate written software license
|
||||
# agreement governing use of this software, this software is licensed to
|
||||
# you under the terms of the GNU General Public License version 2 (the
|
||||
# "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
|
||||
# with the following added to such license:
|
||||
# Copyright 2017 Broadcom
|
||||
#
|
||||
# As a special exception, the copyright holders of this software give
|
||||
# you permission to link this software with independent modules, and to
|
||||
# copy and distribute the resulting executable under terms of your
|
||||
# choice, provided that you also meet, for each linked independent
|
||||
# module, the terms and conditions of the license of that module. An
|
||||
# independent module is a module which is not derived from this
|
||||
# software. The special exception does not apply to any modifications
|
||||
# of the software.
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License, version 2, as
|
||||
# published by the Free Software Foundation (the "GPL").
|
||||
#
|
||||
# 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 version 2 (GPLv2) for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# version 2 (GPLv2) along with this source code.
|
||||
#
|
||||
# $Id: Makefile.linux-kernel-2_6,v 1.40 Broadcom SDK $
|
||||
# $Copyright: (c) 2005 Broadcom Corp.
|
||||
|
@ -1,18 +1,17 @@
|
||||
#
|
||||
# Unless you and Broadcom execute a separate written software license
|
||||
# agreement governing use of this software, this software is licensed to
|
||||
# you under the terms of the GNU General Public License version 2 (the
|
||||
# "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
|
||||
# with the following added to such license:
|
||||
# Copyright 2017 Broadcom
|
||||
#
|
||||
# As a special exception, the copyright holders of this software give
|
||||
# you permission to link this software with independent modules, and to
|
||||
# copy and distribute the resulting executable under terms of your
|
||||
# choice, provided that you also meet, for each linked independent
|
||||
# module, the terms and conditions of the license of that module. An
|
||||
# independent module is a module which is not derived from this
|
||||
# software. The special exception does not apply to any modifications
|
||||
# of the software.
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License, version 2, as
|
||||
# published by the Free Software Foundation (the "GPL").
|
||||
#
|
||||
# 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 version 2 (GPLv2) for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# version 2 (GPLv2) along with this source code.
|
||||
#
|
||||
# $Id: Makefile.linux-kmodule-3_6,v 1.2 Broadcom SDK $
|
||||
# $Copyright: (c) 2006 Broadcom Corp.
|
||||
|
56
platform/broadcom/saibcm-modules/make/Makefile.linux-nsx-2_6
Normal file
56
platform/broadcom/saibcm-modules/make/Makefile.linux-nsx-2_6
Normal file
@ -0,0 +1,56 @@
|
||||
#
|
||||
# Copyright 2017 Broadcom
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License, version 2, as
|
||||
# published by the Free Software Foundation (the "GPL").
|
||||
#
|
||||
# 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 version 2 (GPLv2) for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# version 2 (GPLv2) along with this source code.
|
||||
#
|
||||
# $Id: Makefile.linux-nsx-2_6,v 1.9 Broadcom SDK $
|
||||
# $Copyright: (c) 2005 Broadcom Corp.
|
||||
# All Rights Reserved.$
|
||||
|
||||
# Look for custom tools
|
||||
ifneq (,$(MIPS_TOOLS_DIR))
|
||||
override PATH := $(MIPS_TOOLS_DIR):$(PATH)
|
||||
endif
|
||||
ifneq (,$(MIPS_CROSS_COMPILE))
|
||||
override CROSS_COMPILE := $(MIPS_CROSS_COMPILE)
|
||||
endif
|
||||
|
||||
# Default tools
|
||||
ifeq (,$(CROSS_COMPILE))
|
||||
CROSS_COMPILE := mips2_fp_be-
|
||||
override PATH := $(PATH):/projects/ntsw-tools/linux/mvista/mvista-4.0/pro/devkit/mips/mips2_fp_be/bin
|
||||
endif
|
||||
|
||||
# Default Linux Kernel directory
|
||||
ifeq (,$(KERNDIR))
|
||||
KERNDIR := /projects/ntsw-tools/linux/mvista/mvista-4.0-nsx/linux-2.6.10_dev
|
||||
endif
|
||||
# Default Linux include directory
|
||||
ifeq (,$(LINUX_INCLUDE))
|
||||
LINUX_INCLUDE := $(KERNDIR)/include
|
||||
endif
|
||||
|
||||
CFGFLAGS += -DSYS_BE_PIO=1 -DSYS_BE_PACKET=0 -DSYS_BE_OTHER=1
|
||||
ENDIAN = BE_HOST=1
|
||||
CFGFLAGS += -D$(ENDIAN)
|
||||
CFGFLAGS += -DBCM_PLATFORM_STRING=\"NSX_BCM1125\"
|
||||
|
||||
# From linux/arch/mips/Makefile
|
||||
|
||||
ifeq (,$(KFLAGS))
|
||||
KFLAGS := -D__KERNEL__ -O2 -fomit-frame-pointer -fno-strict-aliasing -G 0 -mno-abicalls -fno-pic -mips64 -mtune=sb1 -Wa,--trap -pipe -mlong-calls
|
||||
endif
|
||||
|
||||
ifneq ($(targetplat),user)
|
||||
include ${SDK}/make/Makefile.linux-kernel-2_6
|
||||
endif
|
54
platform/broadcom/saibcm-modules/make/Makefile.linux-nsx64
Normal file
54
platform/broadcom/saibcm-modules/make/Makefile.linux-nsx64
Normal file
@ -0,0 +1,54 @@
|
||||
#
|
||||
# Copyright 2017 Broadcom
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License, version 2, as
|
||||
# published by the Free Software Foundation (the "GPL").
|
||||
#
|
||||
# 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 version 2 (GPLv2) for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# version 2 (GPLv2) along with this source code.
|
||||
#
|
||||
# $Id: Makefile.linux-nsx64,v 1.9 Broadcom SDK $
|
||||
# $Copyright: (c) 2005 Broadcom Corp.
|
||||
# All Rights Reserved.$
|
||||
|
||||
# Look for custom tools
|
||||
ifneq (,$(MIPS_TOOLS_DIR))
|
||||
override PATH := $(MIPS_TOOLS_DIR):$(PATH)
|
||||
endif
|
||||
ifneq (,$(MIPS_CROSS_COMPILE))
|
||||
override CROSS_COMPILE := $(MIPS_CROSS_COMPILE)
|
||||
endif
|
||||
|
||||
# Default tools
|
||||
ifeq (,$(CROSS_COMPILE))
|
||||
CROSS_COMPILE := mips64_fp_be-
|
||||
override PATH := $(PATH):/projects/ntsw-tools/linux/mvista/mips64_be_tools-3.1/bin
|
||||
endif
|
||||
|
||||
# Default Linux include directory
|
||||
ifeq (,$(LINUX_INCLUDE))
|
||||
LINUX_INCLUDE = /projects/ntsw-tools/linux/headers/mvl-3.1-nsx64/include
|
||||
endif
|
||||
|
||||
CFGFLAGS += -DSYS_BE_PIO=1 -DSYS_BE_PACKET=0 -DSYS_BE_OTHER=1
|
||||
ENDIAN = BE_HOST=1
|
||||
CFGFLAGS += -D$(ENDIAN) -Wa,-xgot -mips64 -mabi=64 -fno-strict-aliasing -DPTRS_ARE_64BITS -DLONGS_ARE_64BITS
|
||||
CFGFLAGS += -DBCM_PLATFORM_STRING=\"NSX_BCM1125\"
|
||||
|
||||
# From linux/arch/mips/Makefile
|
||||
|
||||
ifeq (,$(KFLAGS))
|
||||
KFLAGS := -D__KERNEL__ -O2 -fomit-frame-pointer -fno-strict-aliasing -G 0 -mno-abicalls -fno-pic -mips64 -mabi=64 -mtune=sb1 -Wa,--trap -pipe -mlong-calls
|
||||
endif
|
||||
|
||||
ifneq ($(targetplat),user)
|
||||
include ${SDK}/make/Makefile.linux-kernel
|
||||
endif
|
||||
|
||||
MODULE_LDFLAGS += -m elf64btsmip
|
127
platform/broadcom/saibcm-modules/make/Makefile.linux-nsx_wrl-2_6
Normal file
127
platform/broadcom/saibcm-modules/make/Makefile.linux-nsx_wrl-2_6
Normal file
@ -0,0 +1,127 @@
|
||||
#
|
||||
# Copyright 2017 Broadcom
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License, version 2, as
|
||||
# published by the Free Software Foundation (the "GPL").
|
||||
#
|
||||
# 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 version 2 (GPLv2) for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# version 2 (GPLv2) along with this source code.
|
||||
#
|
||||
# $Id: Makefile.linux-nsx_wrl-2_6,v 1.15 Broadcom SDK $
|
||||
# $Copyright: (c) 2007 Broadcom Corp.
|
||||
# All Rights Reserved.$
|
||||
|
||||
ifeq (,$(WRS_LINUX_VERSION))
|
||||
WRS_LINUX_VERSION=2.0
|
||||
endif
|
||||
|
||||
# Look for custom tools
|
||||
ifneq (,$(MIPS_TOOLS_DIR))
|
||||
ifneq (,$(MIPS_CROSS_COMPILE))
|
||||
override PATH := $(MIPS_TOOLS_DIR):$(PATH)
|
||||
override CROSS_COMPILE := $(MIPS_CROSS_COMPILE)
|
||||
endif
|
||||
endif
|
||||
|
||||
# Default Linux Kernel directory
|
||||
ifeq (,$(KERNDIR))
|
||||
|
||||
ifeq (1.4,$(WRS_LINUX_VERSION))
|
||||
|
||||
ifeq (,$(CROSS_COMPILE))
|
||||
CROSS_COMPILE := mips-wrs-linux-gnu-
|
||||
endif
|
||||
|
||||
KERNDIR := /projects/ntsw-tools/linux/wrslinux_1.4/broadcom_bcm91125cpci_32_be_glibc_std/build/linux-2.6.14-cgl
|
||||
|
||||
export WIND_LIC_PROXY = /projects/ntsw-tools/wrs/wrs_linux/GPP_LE_1.4_PPR/setup/x86-linux2/bin
|
||||
override PATH := /projects/ntsw-tools/wrs/wrs_linux/GPP_LE_1.4_PPR/gnu/3.4.4-wrlinux-1.4/x86-linux2/bin:$(PATH)
|
||||
else
|
||||
|
||||
ifeq (2.0,$(WRS_LINUX_VERSION))
|
||||
|
||||
ifeq (,$(CROSS_COMPILE))
|
||||
CROSS_COMPILE := mips-wrs-linux-gnu-mips-glibc_std-
|
||||
endif
|
||||
|
||||
KERNDIR:= /projects/ntsw-tools/linux/wrslinux_2.0/nsx/glibc_std/build/linux-2.6.21-standard
|
||||
|
||||
WRLINUX_BASE=/tools/windriver/linux_ed/2.0_GA/Linux
|
||||
|
||||
TOOLCHAIN_BIN_DIR=$(KERNDIR)/../../host-cross/mips-wrs-linux-gnu/bin
|
||||
WIND_LIC_PROXY=$(WRLINUX_BASE)/setup/x86-linux2/bin
|
||||
|
||||
WRLINUX_GNU_PATH=$(WRLINUX_BASE)/gnu/4.1-wrlinux-2.0/x86-linux2/bin
|
||||
override PATH:=$(KERNDIR)/../../host-cross/bin:$(KERNDIR)/../../host-cross/mips-wrs-linux-gnu/bin:$(WRLINUX_GNU_PATH):$(PATH)
|
||||
|
||||
WRS_SYSROOT_PATH := $(WRLINUX_GNU_PATH)/../lib/gcc/mips-wrs-linux-gnu/4.1.2/include
|
||||
|
||||
export TOOLCHAIN_BIN_DIR WIND_LIC_PROXY
|
||||
|
||||
comma = ,
|
||||
basetarget = $(basename $(notdir $@))
|
||||
modname = $(basetarget)
|
||||
|
||||
# Extra variables.
|
||||
EXTRA_CFLAGS = -D"KBUILD_STR(s)=\#s" $(basename_flags) $(modname_flags)
|
||||
|
||||
name-fix = $(subst $(comma),_,$(subst -,_,$1))
|
||||
basename_flags = -D"KBUILD_BASENAME=KBUILD_STR($(call name-fix,$(basetarget)))"
|
||||
modname_flags = $(if $(filter 1,$(words $(modname))),\
|
||||
-D"KBUILD_MODNAME=KBUILD_STR($(call name-fix,$(modname)))")
|
||||
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
# Default Linux include directory
|
||||
ifeq (,$(LINUX_INCLUDE))
|
||||
LINUX_INCLUDE := $(KERNDIR)/include
|
||||
endif
|
||||
|
||||
CFGFLAGS += -DSYS_BE_PIO=1 -DSYS_BE_PACKET=0 -DSYS_BE_OTHER=1
|
||||
ENDIAN = BE_HOST=1
|
||||
CFGFLAGS += -D$(ENDIAN)
|
||||
CFGFLAGS += -DBCM_PLATFORM_STRING=\"NSX_BCM1125\"
|
||||
|
||||
ARCH = mips
|
||||
KBUILD_VERBOSE = 1
|
||||
|
||||
export ARCH KBUILD_VERBOSE
|
||||
|
||||
ifeq (1.4,$(WRS_LINUX_VERSION))
|
||||
# From Linux Kbuild output
|
||||
|
||||
ifeq (,$(KFLAGS))
|
||||
KFLAGS := -D__KERNEL__ -Iinclude -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -ffreestanding -O2 -fomit-frame-pointer -g -G 0 -mno-abicalls -fno-pic -pipe -finline-limit=100000 -mabi=32 -march=sb1 -Wa,-32 -Wa,-march=sb1 -Wa,-mips64 -Wa,--trap -DSIBYTE_HDR_FEATURES=SIBYTE_HDR_FMASK_1250_112x_ALL -mlong-calls
|
||||
#-Wdeclaration-after-statement
|
||||
endif
|
||||
|
||||
else
|
||||
|
||||
ifeq (2.0,$(WRS_LINUX_VERSION))
|
||||
|
||||
ifeq (,$(KFLAGS))
|
||||
KFLAGS := -D__KERNEL__ -nostdinc -isystem $(WRS_SYSROOT_PATH) -I$(LINUX_INCLUDE) -include $(LINUX_INCLUDE)/linux/autoconf.h -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -mabi=32 -G 0 -mno-abicalls -fno-pic -pipe -msoft-float -ffreestanding -march=sb1 -Wa,--trap -Iinclude/asm-mips/mach-sibyte -Iinclude/asm-mips/mach-generic -DSIBYTE_HDR_FEATURES=SIBYTE_HDR_FMASK_1250_112x_ALL -fomit-frame-pointer -g -fno-stack-protector -Wdeclaration-after-statement -Wno-pointer-sign -mlong-calls
|
||||
endif
|
||||
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($(targetplat),user)
|
||||
include ${SDK}/make/Makefile.linux-kernel-2_6
|
||||
endif
|
||||
|
||||
|
||||
ifneq (,$(findstring TCL,$(FEATURE_LIST)))
|
||||
LINK_STATIC=0
|
||||
export LINK_STATIC
|
||||
endif
|
||||
|
||||
|
53
platform/broadcom/saibcm-modules/make/Makefile.linux-raptor
Normal file
53
platform/broadcom/saibcm-modules/make/Makefile.linux-raptor
Normal file
@ -0,0 +1,53 @@
|
||||
#
|
||||
# Copyright 2017 Broadcom
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License, version 2, as
|
||||
# published by the Free Software Foundation (the "GPL").
|
||||
#
|
||||
# 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 version 2 (GPLv2) for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# version 2 (GPLv2) along with this source code.
|
||||
#
|
||||
# $Id: Makefile.linux-raptor,v 1.6 Broadcom SDK $
|
||||
# $Copyright: (c) 2005 Broadcom Corp.
|
||||
# All Rights Reserved.$
|
||||
|
||||
# Look for custom tools
|
||||
ifneq (,$(MIPS_TOOLS_DIR))
|
||||
override PATH := $(MIPS_TOOLS_DIR):$(PATH)
|
||||
endif
|
||||
ifneq (,$(MIPS_CROSS_COMPILE))
|
||||
override CROSS_COMPILE := $(MIPS_CROSS_COMPILE)
|
||||
endif
|
||||
|
||||
# Default tools
|
||||
ifeq (,$(CROSS_COMPILE))
|
||||
CROSS_COMPILE := mips_fp_be-
|
||||
override PATH := $(PATH):/projects/ntsw-tools/linux/mvista/mvista-3.1/pro/devkit/mips/fp_be/bin
|
||||
endif
|
||||
|
||||
# Default Linux include directory
|
||||
ifeq (,$(LINUX_INCLUDE))
|
||||
LINUX_INCLUDE = /projects/ntsw-tools/linux/headers/mvl-3.1-raptor/include
|
||||
endif
|
||||
|
||||
CFGFLAGS += -DSYS_BE_PIO=0 -DSYS_BE_PACKET=1 -DSYS_BE_OTHER=0 -DBCM_ICS
|
||||
ENDIAN = BE_HOST=1
|
||||
CFGFLAGS += -D$(ENDIAN)
|
||||
CFGFLAGS += -DBCM_PLATFORM_STRING=\"Raptor_BCM56218\"
|
||||
|
||||
|
||||
ifneq ($(targetplat),user)
|
||||
include ${SDK}/make/Makefile.linux-kernel
|
||||
endif
|
||||
|
||||
# From linux/arch/mips/Makefile
|
||||
|
||||
ifeq (,$(KFLAGS))
|
||||
KFLAGS := -D__KERNEL__ -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -G 0 -mno-abicalls -fno-pic -pipe -m$(gcc-tune-flag)=r4600 -mips2 -Wa,--trap -mlong-calls
|
||||
endif
|
172
platform/broadcom/saibcm-modules/make/Makefile.linux-raptor-2_6
Normal file
172
platform/broadcom/saibcm-modules/make/Makefile.linux-raptor-2_6
Normal file
@ -0,0 +1,172 @@
|
||||
#
|
||||
# Copyright 2017 Broadcom
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License, version 2, as
|
||||
# published by the Free Software Foundation (the "GPL").
|
||||
#
|
||||
# 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 version 2 (GPLv2) for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# version 2 (GPLv2) along with this source code.
|
||||
#
|
||||
# $Id: Makefile.linux-raptor-2_6,v 1.21 Broadcom SDK $
|
||||
# $Copyright: (c) 2007 Broadcom Corp.
|
||||
# All Rights Reserved.$
|
||||
|
||||
|
||||
# User must select one platform from below.By default WR_LINUX is selected. .
|
||||
ifeq (,$(BUILD_PLATFORM))
|
||||
#BUILD_PLATFORM=ELDK
|
||||
BUILD_PLATFORM=WR_LINUX
|
||||
endif
|
||||
|
||||
|
||||
# Specify the KERNEL VERSION you want to use for building SDK.
|
||||
ifeq (ELDK,$(BUILD_PLATFORM))
|
||||
ifeq (,$(KERN_VER))
|
||||
KERN_VER=2.6.21.7
|
||||
endif
|
||||
endif
|
||||
|
||||
# Specify the Windriver Linux version here.For example '2.0' as shown below.
|
||||
ifeq (WR_LINUX,$(BUILD_PLATFORM))
|
||||
ifeq (,$(WRS_LINUX_VERSION))
|
||||
WRS_LINUX_VERSION=2.0
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
# Default Linux Kernel directory
|
||||
ifeq (WR_LINUX,$(BUILD_PLATFORM))
|
||||
ifeq (1.4,$(WRS_LINUX_VERSION))
|
||||
|
||||
KERNDIR ?= /projects/ntsw-tools/linux/wrslinux_1.4/broadcom_bcm95621x_be/build/linux-2.6.14-small
|
||||
|
||||
ifeq (,$(CROSS_COMPILE))
|
||||
CROSS_COMPILE := mips-wrs-linux-gnu-
|
||||
endif
|
||||
|
||||
export WIND_LIC_PROXY = /projects/ntsw-tools/wrs/wrs_linux/GPP_LE_1.4_PPR/setup/x86-linux2/bin
|
||||
|
||||
override PATH := /projects/ntsw-tools/wrs/wrs_linux/GPP_LE_1.4_PPR/gnu/3.4.4-wrlinux-1.4/x86-linux2/bin:$(PATH)
|
||||
endif
|
||||
|
||||
ifeq (2.0,$(WRS_LINUX_VERSION))
|
||||
|
||||
ifeq (,$(CROSS_COMPILE))
|
||||
CROSS_COMPILE := mips-wrs-linux-gnu-mips_softfp-glibc_std-
|
||||
endif
|
||||
|
||||
KERNDIR ?= /projects/ntsw-tools/linux/wrslinux_2.0/ntswics/glibc_std/build/linux-2.6.21-standard
|
||||
override PATH:=$(KERNDIR)/../../host-cross/bin:$(KERNDIR)/../../host-cross/mips-wrs-linux-gnu/bin:$(WRLINUX_GNU_PATH):$(PATH)
|
||||
|
||||
endif
|
||||
|
||||
WRLINUX_BASE=/tools/windriver/linux_ed/2.0_GA/Linux
|
||||
|
||||
TOOLCHAIN_BIN_DIR=$(KERNDIR)/../../host-cross/mips-wrs-linux-gnu/bin
|
||||
WIND_LIC_PROXY=$(WRLINUX_BASE)/setup/x86-linux2/bin
|
||||
|
||||
WRLINUX_GNU_PATH=$(WRLINUX_BASE)/gnu/4.1-wrlinux-2.0/x86-linux2/bin
|
||||
|
||||
override PATH:=$(KERNDIR)/../../host-cross/bin:$(KERNDIR)/../../host-cross/mips-wrs-linux-gnu/bin:$(WRLINUX_GNU_PATH):$(PATH)
|
||||
|
||||
WRS_SYSROOT_PATH := $(WRLINUX_GNU_PATH)/../lib/gcc/mips-wrs-linux-gnu/4.1.2/include
|
||||
|
||||
export TOOLCHAIN_BIN_DIR WIND_LIC_PROXY
|
||||
|
||||
endif
|
||||
|
||||
ifeq (ELDK,$(BUILD_PLATFORM))
|
||||
ifeq (2.6.21.7, $(KERN_VER))
|
||||
ifeq (,$(CROSS_COMPILE))
|
||||
CROSS_COMPILE := mips_4KC-
|
||||
endif
|
||||
override PATH := /tools/eldk/4.1/usr/bin:$(PATH)
|
||||
KERNDIR ?= /projects/ntsw-tools/linux/eldk/raptor_eldk/linux-2.6.21.7
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
|
||||
comma = ,
|
||||
basetarget = $(basename $(notdir $@))
|
||||
modname = $(basetarget)
|
||||
|
||||
# Extra variables.
|
||||
EXTRA_CFLAGS = -D"KBUILD_STR(s)=\#s" $(basename_flags) $(modname_flags)
|
||||
|
||||
name-fix = $(subst $(comma),_,$(subst -,_,$1))
|
||||
basename_flags = -D"KBUILD_BASENAME=KBUILD_STR($(call name-fix,$(basetarget)))"
|
||||
modname_flags = $(if $(filter 1,$(words $(modname))),\
|
||||
-D"KBUILD_MODNAME=KBUILD_STR($(call name-fix,$(modname)))")
|
||||
|
||||
# Default Linux include directory
|
||||
ifeq (,$(LINUX_INCLUDE))
|
||||
LINUX_INCLUDE := $(KERNDIR)/include
|
||||
endif
|
||||
|
||||
CFGFLAGS += -DSYS_BE_PIO=0 -DSYS_BE_PACKET=1 -DSYS_BE_OTHER=0 -DBCM_ICS
|
||||
ENDIAN = BE_HOST=1
|
||||
CFGFLAGS += -D$(ENDIAN) -DRAPTOR
|
||||
CFGFLAGS += -DBCM_PLATFORM_STRING=\"Raptor_BCM56218\"
|
||||
|
||||
|
||||
ARCH = mips
|
||||
KBUILD_VERBOSE = 1
|
||||
|
||||
export ARCH KBUILD_VERBOSE
|
||||
|
||||
|
||||
ifeq (ELDK,$(BUILD_PLATFORM))
|
||||
KFLAG_INCLD = /tools/eldk/4.1/usr/lib/gcc/mips-linux/4.0.0/include
|
||||
endif
|
||||
|
||||
|
||||
# From linux/arch/mips/Makefile
|
||||
ifeq (WR_LINUX,$(BUILD_PLATFORM))
|
||||
ifeq (1.4,$(WRS_LINUX_VERSION))
|
||||
|
||||
ifeq (,$(KFLAGS))
|
||||
KFLAGS := -D__KERNEL__ -Wall -Wno-trigraphs -fno-strict-aliasing -fno-common -ffreestanding -O2 -fomit-frame-pointer -g -G 0 -mno-abicalls -fno-pic -pipe -march=mips32 -Wa,-mips32 -Wa,--trap -funit-at-a-time -mlong-calls -Wundef -finline-limit=100000 -mabi=32
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
ifeq (2.0,$(WRS_LINUX_VERSION))
|
||||
|
||||
ifeq (,$(KFLAGS))
|
||||
KFLAGS := -D__KERNEL__ -nostdinc -isystem $(WRS_SYSROOT_PATH) -I$(LINUX_INCLUDE) -include $(LINUX_INCLUDE)/linux/autoconf.h -I$(KERNDIR)/arch/mips/mach-bcm56218 -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -mabi=32 -G 0 -mno-abicalls -fno-pic -pipe -msoft-float -ffreestanding -march=mips32 -Wa,-mips32 -Wa,--trap -Iinclude/asm-mips/mach-bcm56218 -Iinclude/asm-mips/mach-generic -fomit-frame-pointer -g -fno-stack-protector -Wdeclaration-after-statement -Wno-pointer-sign -mlong-calls
|
||||
endif
|
||||
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq (ELDK,$(BUILD_PLATFORM))
|
||||
|
||||
ifeq (,$(KFLAGS))
|
||||
KFLAGS := -D__KERNEL__ -nostdinc -isystem $(KFLAG_INCLD) -I$(LINUX_INCLUDE) -include $(LINUX_INCLUDE)/linux/autoconf.h -I$(KERNDIR)/arch/mips/mach-bcm56218 -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -mabi=32 -G 0 -mno-abicalls -fno-pic -pipe -msoft-float -ffreestanding -march=mips32 -Wa,-mips32 -Wa,--trap -Iinclude/asm-mips/mach-bcm56218 -Iinclude/asm-mips/mach-generic -fomit-frame-pointer -g -Wdeclaration-after-statement -mlong-calls
|
||||
endif
|
||||
|
||||
|
||||
endif
|
||||
|
||||
|
||||
|
||||
ifneq ($(targetplat),user)
|
||||
include ${SDK}/make/Makefile.linux-kernel-2_6
|
||||
endif
|
||||
|
||||
ifneq (,$(findstring TCL,$(FEATURE_LIST)))
|
||||
LINK_STATIC=0
|
||||
export LINK_STATIC
|
||||
endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,18 +1,17 @@
|
||||
#
|
||||
# Unless you and Broadcom execute a separate written software license
|
||||
# agreement governing use of this software, this software is licensed to
|
||||
# you under the terms of the GNU General Public License version 2 (the
|
||||
# "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
|
||||
# with the following added to such license:
|
||||
# Copyright 2017 Broadcom
|
||||
#
|
||||
# As a special exception, the copyright holders of this software give
|
||||
# you permission to link this software with independent modules, and to
|
||||
# copy and distribute the resulting executable under terms of your
|
||||
# choice, provided that you also meet, for each linked independent
|
||||
# module, the terms and conditions of the license of that module. An
|
||||
# independent module is a module which is not derived from this
|
||||
# software. The special exception does not apply to any modifications
|
||||
# of the software.
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License, version 2, as
|
||||
# published by the Free Software Foundation (the "GPL").
|
||||
#
|
||||
# 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 version 2 (GPLv2) for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# version 2 (GPLv2) along with this source code.
|
||||
#
|
||||
# $Id: Makefile.linux-x86-common-2_6,v 1.13 Broadcom SDK $
|
||||
# $Copyright: (c) 2005 Broadcom Corp.
|
||||
|
@ -1,18 +1,17 @@
|
||||
#
|
||||
# Unless you and Broadcom execute a separate written software license
|
||||
# agreement governing use of this software, this software is licensed to
|
||||
# you under the terms of the GNU General Public License version 2 (the
|
||||
# "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
|
||||
# with the following added to such license:
|
||||
# Copyright 2017 Broadcom
|
||||
#
|
||||
# As a special exception, the copyright holders of this software give
|
||||
# you permission to link this software with independent modules, and to
|
||||
# copy and distribute the resulting executable under terms of your
|
||||
# choice, provided that you also meet, for each linked independent
|
||||
# module, the terms and conditions of the license of that module. An
|
||||
# independent module is a module which is not derived from this
|
||||
# software. The special exception does not apply to any modifications
|
||||
# of the software.
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License, version 2, as
|
||||
# published by the Free Software Foundation (the "GPL").
|
||||
#
|
||||
# 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 version 2 (GPLv2) for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# version 2 (GPLv2) along with this source code.
|
||||
#
|
||||
# $Id: Makefile.linux-x86-generic-common-2_6,v 1.2 Broadcom SDK $
|
||||
# $Copyright: (c) 2008 Broadcom Corp.
|
||||
|
@ -1,18 +1,17 @@
|
||||
#
|
||||
# Unless you and Broadcom execute a separate written software license
|
||||
# agreement governing use of this software, this software is licensed to
|
||||
# you under the terms of the GNU General Public License version 2 (the
|
||||
# "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
|
||||
# with the following added to such license:
|
||||
# Copyright 2017 Broadcom
|
||||
#
|
||||
# As a special exception, the copyright holders of this software give
|
||||
# you permission to link this software with independent modules, and to
|
||||
# copy and distribute the resulting executable under terms of your
|
||||
# choice, provided that you also meet, for each linked independent
|
||||
# module, the terms and conditions of the license of that module. An
|
||||
# independent module is a module which is not derived from this
|
||||
# software. The special exception does not apply to any modifications
|
||||
# of the software.
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License, version 2, as
|
||||
# published by the Free Software Foundation (the "GPL").
|
||||
#
|
||||
# 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 version 2 (GPLv2) for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# version 2 (GPLv2) along with this source code.
|
||||
#
|
||||
# $Id: Makefile.linux-x86-smp_generic_64-2_6,v 1.5 Broadcom SDK $
|
||||
# $Copyright: (c) 2008 Broadcom Corp.
|
||||
@ -29,17 +28,10 @@ ifeq (,$(KFLAGS))
|
||||
KFLAGS := -nostdinc -isystem $(SYSINC) -I$(KERNDIR)/include -I$(KERNDIR)/arch/x86/include -include $(AUTOCONF) -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -Os -m64 -mtune=generic -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -fno-stack-protector -fomit-frame-pointer -g -Wdeclaration-after-statement -Wno-pointer-sign
|
||||
endif
|
||||
|
||||
|
||||
LINUX_UAPI = $(LINUX_INCLUDE)/uapi
|
||||
ifneq (,$(shell ls $(LINUX_UAPI) 2>/dev/null))
|
||||
KFLAGS += -I$(LINUX_INCLUDE)/uapi -I$(LINUX_INCLUDE)/generated/uapi -I$(KERNDIR)/arch/x86/include/generated -I$(KERNDIR)/arch/x86/include/uapi -I$(KERNDIR)/arch/x86/include/generated/uapi
|
||||
|
||||
ifeq ($(LINUX_MAKE_SHARED_LIB),1)
|
||||
KFLAGS += -fPIC -mcmodel=small
|
||||
else
|
||||
KFLAGS += -mcmodel=kernel -fno-pie
|
||||
endif
|
||||
|
||||
ifeq (1,$(DEBIAN_LINUX_HEADER))
|
||||
KERNDIR_COMMON := $(subst amd64,common,$(KERNDIR))
|
||||
KFLAGS += -I$(KERNDIR_COMMON)/include -I$(KERNDIR_COMMON)/include/uapi -I$(KERNDIR_COMMON)/arch/x86/include -I$(KERNDIR_COMMON)/arch/x86/include/uapi
|
||||
endif
|
||||
|
||||
include ${SDK}/make/Makefile.linux-x86-common-2_6
|
||||
|
@ -1,18 +1,17 @@
|
||||
/*
|
||||
* Unless you and Broadcom execute a separate written software license
|
||||
* agreement governing use of this software, this software is licensed to
|
||||
* you under the terms of the GNU General Public License version 2 (the
|
||||
* "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
|
||||
* with the following added to such license:
|
||||
* Copyright 2017 Broadcom
|
||||
*
|
||||
* As a special exception, the copyright holders of this software give
|
||||
* you permission to link this software with independent modules, and to
|
||||
* copy and distribute the resulting executable under terms of your
|
||||
* choice, provided that you also meet, for each linked independent
|
||||
* module, the terms and conditions of the license of that module. An
|
||||
* independent module is a module which is not derived from this
|
||||
* software. The special exception does not apply to any modifications
|
||||
* of the software.
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License, version 2, as
|
||||
* published by the Free Software Foundation (the "GPL").
|
||||
*
|
||||
* 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 version 2 (GPLv2) for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* version 2 (GPLv2) along with this source code.
|
||||
*/
|
||||
/***********************************************************************
|
||||
*
|
||||
@ -198,6 +197,11 @@ extern void *lkbde_get_dma_dev(int d);
|
||||
*/
|
||||
extern void *lkbde_get_hw_dev(int d);
|
||||
|
||||
/*
|
||||
* Backdoor to retrieve number of switch devices probed.
|
||||
*/
|
||||
extern int lkbde_get_num_devices(int type);
|
||||
|
||||
/*
|
||||
* Retrive the device state from Kernel BDE.
|
||||
* Used for KNET and User BDE for pci hot swap case.
|
||||
@ -230,6 +234,12 @@ extern int lkbde_cpu_pci_register(int d);
|
||||
* a secondary device driver.
|
||||
*/
|
||||
#define LKBDE_ISR2_DEV 0x8000
|
||||
/*
|
||||
* This flag should be OR'ed onto the device number when calling
|
||||
* irq_mask_set functions from a secondary device driver if the
|
||||
* mask register is iProc register.
|
||||
*/
|
||||
#define LKBDE_IPROC_REG 0x4000
|
||||
|
||||
#if defined(BCM_PETRA_SUPPORT) || defined(BCM_DFE_SUPPORT)
|
||||
#include <linux/version.h>
|
||||
|
@ -1,18 +1,17 @@
|
||||
/*
|
||||
* Unless you and Broadcom execute a separate written software license
|
||||
* agreement governing use of this software, this software is licensed to
|
||||
* you under the terms of the GNU General Public License version 2 (the
|
||||
* "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
|
||||
* with the following added to such license:
|
||||
* Copyright 2017 Broadcom
|
||||
*
|
||||
* As a special exception, the copyright holders of this software give
|
||||
* you permission to link this software with independent modules, and to
|
||||
* copy and distribute the resulting executable under terms of your
|
||||
* choice, provided that you also meet, for each linked independent
|
||||
* module, the terms and conditions of the license of that module. An
|
||||
* independent module is a module which is not derived from this
|
||||
* software. The special exception does not apply to any modifications
|
||||
* of the software.
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License, version 2, as
|
||||
* published by the Free Software Foundation (the "GPL").
|
||||
*
|
||||
* 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 version 2 (GPLv2) for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* version 2 (GPLv2) along with this source code.
|
||||
*/
|
||||
/***********************************************************************
|
||||
*
|
||||
|
@ -1,18 +1,17 @@
|
||||
/*
|
||||
* Unless you and Broadcom execute a separate written software license
|
||||
* agreement governing use of this software, this software is licensed to
|
||||
* you under the terms of the GNU General Public License version 2 (the
|
||||
* "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
|
||||
* with the following added to such license:
|
||||
* Copyright 2017 Broadcom
|
||||
*
|
||||
* As a special exception, the copyright holders of this software give
|
||||
* you permission to link this software with independent modules, and to
|
||||
* copy and distribute the resulting executable under terms of your
|
||||
* choice, provided that you also meet, for each linked independent
|
||||
* module, the terms and conditions of the license of that module. An
|
||||
* independent module is a module which is not derived from this
|
||||
* software. The special exception does not apply to any modifications
|
||||
* of the software.
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License, version 2, as
|
||||
* published by the Free Software Foundation (the "GPL").
|
||||
*
|
||||
* 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 version 2 (GPLv2) for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* version 2 (GPLv2) along with this source code.
|
||||
*/
|
||||
/*
|
||||
* $Id: mpool.h,v 1.2 Broadcom SDK $
|
||||
|
@ -1,18 +1,17 @@
|
||||
#
|
||||
# Unless you and Broadcom execute a separate written software license
|
||||
# agreement governing use of this software, this software is licensed to
|
||||
# you under the terms of the GNU General Public License version 2 (the
|
||||
# "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
|
||||
# with the following added to such license:
|
||||
# Copyright 2017 Broadcom
|
||||
#
|
||||
# As a special exception, the copyright holders of this software give
|
||||
# you permission to link this software with independent modules, and to
|
||||
# copy and distribute the resulting executable under terms of your
|
||||
# choice, provided that you also meet, for each linked independent
|
||||
# module, the terms and conditions of the license of that module. An
|
||||
# independent module is a module which is not derived from this
|
||||
# software. The special exception does not apply to any modifications
|
||||
# of the software.
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License, version 2, as
|
||||
# published by the Free Software Foundation (the "GPL").
|
||||
#
|
||||
# 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 version 2 (GPLv2) for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# version 2 (GPLv2) along with this source code.
|
||||
#
|
||||
# -*- Makefile -*-
|
||||
# $Id: Makefile,v 1.18 Broadcom SDK $
|
||||
|
@ -1,18 +1,17 @@
|
||||
/*
|
||||
* Unless you and Broadcom execute a separate written software license
|
||||
* agreement governing use of this software, this software is licensed to
|
||||
* you under the terms of the GNU General Public License version 2 (the
|
||||
* "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
|
||||
* with the following added to such license:
|
||||
* Copyright 2017 Broadcom
|
||||
*
|
||||
* As a special exception, the copyright holders of this software give
|
||||
* you permission to link this software with independent modules, and to
|
||||
* copy and distribute the resulting executable under terms of your
|
||||
* choice, provided that you also meet, for each linked independent
|
||||
* module, the terms and conditions of the license of that module. An
|
||||
* independent module is a module which is not derived from this
|
||||
* software. The special exception does not apply to any modifications
|
||||
* of the software.
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License, version 2, as
|
||||
* published by the Free Software Foundation (the "GPL").
|
||||
*
|
||||
* 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 version 2 (GPLv2) for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* version 2 (GPLv2) along with this source code.
|
||||
*/
|
||||
/*
|
||||
* $Id: linux-kernel-bde.c,v 1.414 Broadcom SDK $
|
||||
@ -482,7 +481,7 @@ robo_spi_write(void *cookie, uint16_t reg, uint8_t *buf, int len);
|
||||
/* PLX PCI-E Switch */
|
||||
#define PLX_PEX8608_DEV_ID 0x8608
|
||||
#define PLX_PEX8617_DEV_ID 0x8617
|
||||
#define PLX_PEX86XX_DEV_CTRL_REG 0x70
|
||||
#define PLX_PEX86XX_DEV_CTRL_REG 0x70
|
||||
|
||||
/* Broadcom BCM58525 */
|
||||
#define BCM58525_PCI_VENDOR_ID 0x14E4
|
||||
@ -721,7 +720,7 @@ iproc_cmicd_probe(struct platform_device *pldev)
|
||||
#endif
|
||||
{
|
||||
/* Assign locally if not available from device node */
|
||||
iproc_cmicd_get_irqres(ctrl->bde_dev, &pldev->resource[0]);
|
||||
iproc_cmicd_get_irqres(ctrl->bde_dev, &pldev->resource[0]);
|
||||
}
|
||||
irqres = iproc_platform_get_resource(pldev, IORESOURCE_IRQ, 0);
|
||||
|
||||
@ -1007,7 +1006,7 @@ extern struct pci_bus *pci_find_bus(int domain, int busnr);
|
||||
* Populated from the include/soc/devids.h file.
|
||||
*/
|
||||
|
||||
static struct pci_device_id _id_table[] = {
|
||||
static const struct pci_device_id _id_table[] = {
|
||||
{ BROADCOM_VENDOR_ID, BCM5675_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID },
|
||||
{ BROADCOM_VENDOR_ID, BCM5676_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID },
|
||||
{ BROADCOM_VENDOR_ID, BCM56218X_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID },
|
||||
@ -1327,6 +1326,7 @@ static struct pci_device_id _id_table[] = {
|
||||
{ BROADCOM_VENDOR_ID, BCM56971_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID },
|
||||
{ BROADCOM_VENDOR_ID, BCM56972_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID },
|
||||
{ BROADCOM_VENDOR_ID, BCM56974_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID },
|
||||
{ BROADCOM_VENDOR_ID, BCM56975_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID },
|
||||
{ BROADCOM_VENDOR_ID, BCM56168_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID },
|
||||
{ BROADCOM_VENDOR_ID, BCM56169_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID },
|
||||
{ BROADCOM_VENDOR_ID, BCM56560_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID },
|
||||
@ -1335,8 +1335,13 @@ static struct pci_device_id _id_table[] = {
|
||||
{ BROADCOM_VENDOR_ID, BCM56565_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID },
|
||||
{ BROADCOM_VENDOR_ID, BCM56566_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID },
|
||||
{ BROADCOM_VENDOR_ID, BCM56567_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID },
|
||||
{ BROADCOM_VENDOR_ID, BCM56670_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID },
|
||||
{ BROADCOM_VENDOR_ID, BCM56671_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID },
|
||||
{ BROADCOM_VENDOR_ID, BCM56672_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID },
|
||||
{ BROADCOM_VENDOR_ID, BCM56675_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID },
|
||||
{ BROADCOM_VENDOR_ID, BCM56568_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID },
|
||||
{ BROADCOM_VENDOR_ID, BCM56760_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID },
|
||||
{ BROADCOM_VENDOR_ID, BCM56761_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID },
|
||||
{ BROADCOM_VENDOR_ID, BCM56762_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID },
|
||||
{ BROADCOM_VENDOR_ID, BCM56764_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID },
|
||||
{ BROADCOM_VENDOR_ID, BCM56765_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID },
|
||||
@ -1419,6 +1424,7 @@ static struct pci_device_id _id_table[] = {
|
||||
{ BROADCOM_VENDOR_ID, BCM88272_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID },
|
||||
{ BROADCOM_VENDOR_ID, BCM88273_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID },
|
||||
{ BROADCOM_VENDOR_ID, BCM88278_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID },
|
||||
{ BROADCOM_VENDOR_ID, BCM88279_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID },
|
||||
|
||||
{ BROADCOM_VENDOR_ID, BCM8206_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID },
|
||||
|
||||
@ -1471,6 +1477,20 @@ static struct pci_device_id _id_table[] = {
|
||||
#endif
|
||||
#ifdef BCM_DNXF_SUPPORT
|
||||
{ BROADCOM_VENDOR_ID, BCM88790_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID },
|
||||
{ BROADCOM_VENDOR_ID, BCM88791_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID },
|
||||
{ BROADCOM_VENDOR_ID, BCM88792_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID },
|
||||
{ BROADCOM_VENDOR_ID, BCM88793_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID },
|
||||
{ BROADCOM_VENDOR_ID, BCM88794_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID },
|
||||
{ BROADCOM_VENDOR_ID, BCM88795_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID },
|
||||
{ BROADCOM_VENDOR_ID, BCM88796_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID },
|
||||
{ BROADCOM_VENDOR_ID, BCM88797_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID },
|
||||
{ BROADCOM_VENDOR_ID, BCM88798_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID },
|
||||
{ BROADCOM_VENDOR_ID, BCM88799_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID },
|
||||
{ BROADCOM_VENDOR_ID, BCM8879A_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID },
|
||||
{ BROADCOM_VENDOR_ID, BCM8879B_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID },
|
||||
{ BROADCOM_VENDOR_ID, BCM8879C_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID },
|
||||
{ BROADCOM_VENDOR_ID, BCM8879D_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID },
|
||||
{ BROADCOM_VENDOR_ID, BCM8879F_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID },
|
||||
#endif
|
||||
{ BROADCOM_VENDOR_ID, BCM56860_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID },
|
||||
{ BROADCOM_VENDOR_ID, BCM56861_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID },
|
||||
@ -1484,10 +1504,17 @@ static struct pci_device_id _id_table[] = {
|
||||
{ BROADCOM_VENDOR_ID, BCM56832_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID },
|
||||
{ BROADCOM_VENDOR_ID, BCM56836_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID },
|
||||
{ BROADCOM_VENDOR_ID, BCM56870_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID },
|
||||
{ BROADCOM_VENDOR_ID, BCM56980_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID },
|
||||
{ BROADCOM_VENDOR_ID, BCM56873_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID },
|
||||
{ BROADCOM_VENDOR_ID, BCM53540_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID },
|
||||
{ BROADCOM_VENDOR_ID, BCM53547_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID },
|
||||
{ BROADCOM_VENDOR_ID, BCM53548_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID },
|
||||
{ BROADCOM_VENDOR_ID, BCM53549_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID },
|
||||
{ 0, 0, 0, 0 }
|
||||
};;
|
||||
|
||||
MODULE_DEVICE_TABLE(pci, _id_table);
|
||||
|
||||
#define pci_bus_b(n) list_entry(n, struct pci_bus, node)
|
||||
#define pci_dev_b(n) list_entry(n, struct pci_dev, bus_list)
|
||||
#define MAX_RC_NUM 4
|
||||
@ -2403,18 +2430,15 @@ _pci_probe(struct pci_dev *dev, const struct pci_device_id *ent)
|
||||
#endif /* BCM_DFE_SUPPORT */
|
||||
|
||||
#if defined(BCM_DNXF_SUPPORT)
|
||||
switch (dev->device) {
|
||||
case BCM88790_DEVICE_ID:
|
||||
|
||||
/*All Ramon devices from 0x8790 to 0x879F*/
|
||||
if ((dev->device & BCM_DNXF_DEVID_MASK) == BCM88790_DEVICE_ID) {
|
||||
/*
|
||||
* For DMA transactions - set Max_Payload_Size and
|
||||
* Max_Read_Request_Size to 128 bytes.
|
||||
*/
|
||||
pci_write_config_byte(dev, 0xb5, 0x0c);
|
||||
pci_write_config_byte(dev, 0xb4, 0x0);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -2539,24 +2563,6 @@ _pci_probe(struct pci_dev *dev, const struct pci_device_id *ent)
|
||||
/* Save shared BDE HAL in device structure */
|
||||
memcpy(&ctrl->shbde, shbde, sizeof(ctrl->shbde));
|
||||
|
||||
#if defined(VENDOR_BROADCOM)
|
||||
#if defined(BCM_PLX9656_LOCAL_BUS) && defined(SHADOW_SVK)
|
||||
if (num_plx) {
|
||||
sal_vaddr_t base_address;
|
||||
uint32 intr_enable;
|
||||
|
||||
paddr = pci_resource_start(dev, 0);
|
||||
bar_len = pci_resource_len(dev, 0);
|
||||
base_address = (sal_vaddr_t)IOREMAP(paddr, bar_len);
|
||||
|
||||
intr_enable = readl((uint32 *)(base_address + 0x68));
|
||||
gprintk("PLX Interrupt ENABLE: %x\n", intr_enable);
|
||||
intr_enable |= 0x00080000;
|
||||
writel(intr_enable, (uint32 *)(base_address + 0x68));
|
||||
gprintk("PLX Interrupt ENABLE: %x\n", intr_enable);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Since the GMAC driver of Robo chips needs access to the
|
||||
@ -2604,9 +2610,12 @@ _pci_probe(struct pci_dev *dev, const struct pci_device_id *ent)
|
||||
|
||||
/* Check if we need 256 KB memory window (default is 64 KB) */
|
||||
bar_len = pci_resource_len(dev, baroff);
|
||||
if ((bar_len == 0x40000) || (bar_len == 0x800000)) {
|
||||
if (bar_len == 0x40000) {
|
||||
ctrl->dev_type |= BDE_256K_REG_SPACE;
|
||||
if (debug >= 1) gprintk("PCI resource len 256K\n");
|
||||
} else if (bar_len == 0x800000) {
|
||||
ctrl->dev_type |= BDE_256K_REG_SPACE | BDE_8MB_REG_SPACE;
|
||||
if (debug >= 1) gprintk("PCI resource len 8MB\n");
|
||||
}
|
||||
|
||||
#if defined (BCM_ROBO_SUPPORT) && !defined(ALTA_ROBO_SPI)
|
||||
@ -2684,17 +2693,17 @@ _pci_remove(struct pci_dev* dev)
|
||||
else
|
||||
#endif
|
||||
{
|
||||
free_irq(ctrl->iLine, ctrl);
|
||||
free_irq(ctrl->iLine, ctrl);
|
||||
}
|
||||
}
|
||||
#ifdef CONFIG_PCI_MSI
|
||||
_msi_disconnect(ctrl);
|
||||
#endif
|
||||
ctrl->isr = NULL;
|
||||
ctrl->isr_data = NULL;
|
||||
ctrl->isr2 = NULL;
|
||||
ctrl->isr2_data = NULL;
|
||||
}
|
||||
ctrl->isr = NULL;
|
||||
ctrl->isr_data = NULL;
|
||||
ctrl->isr2 = NULL;
|
||||
ctrl->isr2_data = NULL;
|
||||
}
|
||||
|
||||
static struct pci_driver _device_driver = {
|
||||
probe: _pci_probe,
|
||||
@ -3590,8 +3599,8 @@ _init(void)
|
||||
#endif
|
||||
{
|
||||
/* Register platform device if no device node in dtb */
|
||||
iproc_platform_device_register(&iproc_cmicd_pdev);
|
||||
}
|
||||
iproc_platform_device_register(&iproc_cmicd_pdev);
|
||||
}
|
||||
}
|
||||
#endif /* IPROC_CMICD */
|
||||
|
||||
@ -3629,14 +3638,14 @@ _init(void)
|
||||
}
|
||||
#else
|
||||
if (use_msi > PCI_USE_INT_INTX) {
|
||||
/* Warn if invalid configuration */
|
||||
gprintk("MSI interrupts not supported by kernel\n");
|
||||
}
|
||||
/* Warn if invalid configuration */
|
||||
gprintk("MSI interrupts not supported by kernel\n");
|
||||
}
|
||||
use_msi = PCI_USE_INT_INTX;
|
||||
#endif /* CONFIG_PCI_MSI */
|
||||
|
||||
if (unlikely(debug >= 1))
|
||||
gprintk("%s(%d):use_mse = %d\n", __func__, __LINE__, use_msi);
|
||||
gprintk("%s(%d):use_msi = %d\n", __func__, __LINE__, use_msi);
|
||||
if (spi_devid) {
|
||||
_spi_device_setup();
|
||||
} else {
|
||||
@ -3688,7 +3697,7 @@ _init(void)
|
||||
tok = strtok(NULL,",");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
_dma_init(robo_switch);
|
||||
|
||||
/*
|
||||
@ -4246,8 +4255,7 @@ _interrupt_connect(int d,
|
||||
goto err_disable_msi;
|
||||
|
||||
if (unlikely(debug >= 1))
|
||||
gprintk("%s(%d):device# = %d, \
|
||||
irq_flags = %lu, irq = %d\n",
|
||||
gprintk("%s(%d):device# = %d, irq_flags = %lu, irq = %d\n",
|
||||
__func__, __LINE__, d,
|
||||
irq_flags, ctrl->pci_device ? ctrl->pci_device->irq : ctrl->iLine);
|
||||
}
|
||||
@ -4261,13 +4269,13 @@ err_disable_msi:
|
||||
msi_exit:
|
||||
#endif
|
||||
gprintk("could not request IRQ\n");
|
||||
ctrl->isr = NULL;
|
||||
ctrl->isr_data = NULL;
|
||||
ctrl->isr2 = NULL;
|
||||
ctrl->isr2_data = NULL;
|
||||
ctrl->isr = NULL;
|
||||
ctrl->isr_data = NULL;
|
||||
ctrl->isr2 = NULL;
|
||||
ctrl->isr2_data = NULL;
|
||||
|
||||
return -1;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
static int
|
||||
_interrupt_disconnect(int d)
|
||||
@ -4334,7 +4342,7 @@ _interrupt_disconnect(int d)
|
||||
else
|
||||
#endif
|
||||
{
|
||||
free_irq(ctrl->iLine, ctrl);
|
||||
free_irq(ctrl->iLine, ctrl);
|
||||
}
|
||||
#ifdef CONFIG_PCI_MSI
|
||||
if (ctrl->use_msi >= PCI_USE_INT_MSI) {
|
||||
@ -5082,11 +5090,12 @@ int
|
||||
lkbde_irq_mask_set(int d, uint32_t addr, uint32_t mask, uint32_t fmask)
|
||||
{
|
||||
bde_ctrl_t *ctrl;
|
||||
int isr2_dev;
|
||||
int isr2_dev, iproc_reg;
|
||||
unsigned long flags;
|
||||
|
||||
isr2_dev = d & LKBDE_ISR2_DEV;
|
||||
d &= ~LKBDE_ISR2_DEV;
|
||||
iproc_reg = d & LKBDE_IPROC_REG;
|
||||
d &= ~(LKBDE_ISR2_DEV | LKBDE_IPROC_REG);
|
||||
|
||||
if (!VALID_DEVICE(d)) {
|
||||
return -1;
|
||||
@ -5105,7 +5114,12 @@ lkbde_irq_mask_set(int d, uint32_t addr, uint32_t mask, uint32_t fmask)
|
||||
/* This is the primary interrupt handler */
|
||||
ctrl->imask = mask & ~ctrl->fmask;
|
||||
}
|
||||
_write(d, addr, ctrl->imask | ctrl->imask2);
|
||||
|
||||
if (iproc_reg) {
|
||||
_iproc_write(d, addr, ctrl->imask | ctrl->imask2);
|
||||
} else {
|
||||
_write(d, addr, ctrl->imask | ctrl->imask2);
|
||||
}
|
||||
|
||||
spin_unlock_irqrestore(&ctrl->lock, flags);
|
||||
|
||||
@ -5130,13 +5144,13 @@ lkbde_irq_mask_get(int d, uint32_t *mask, uint32_t *fmask)
|
||||
{
|
||||
bde_ctrl_t *ctrl;
|
||||
|
||||
d &= ~LKBDE_ISR2_DEV;
|
||||
d &= ~(LKBDE_ISR2_DEV | LKBDE_IPROC_REG);
|
||||
|
||||
if (!VALID_DEVICE(d)) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (mask == NULL) {
|
||||
if (mask == NULL || fmask == NULL) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -5144,10 +5158,15 @@ lkbde_irq_mask_get(int d, uint32_t *mask, uint32_t *fmask)
|
||||
|
||||
*fmask = ctrl->fmask;
|
||||
*mask = ctrl->imask | ctrl->imask2;
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
lkbde_get_num_devices(int type)
|
||||
{
|
||||
return _num_devices(type);
|
||||
}
|
||||
|
||||
/*
|
||||
* Export functions
|
||||
|
@ -1,18 +1,17 @@
|
||||
/*
|
||||
* Unless you and Broadcom execute a separate written software license
|
||||
* agreement governing use of this software, this software is licensed to
|
||||
* you under the terms of the GNU General Public License version 2 (the
|
||||
* "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
|
||||
* with the following added to such license:
|
||||
* Copyright 2017 Broadcom
|
||||
*
|
||||
* As a special exception, the copyright holders of this software give
|
||||
* you permission to link this software with independent modules, and to
|
||||
* copy and distribute the resulting executable under terms of your
|
||||
* choice, provided that you also meet, for each linked independent
|
||||
* module, the terms and conditions of the license of that module. An
|
||||
* independent module is a module which is not derived from this
|
||||
* software. The special exception does not apply to any modifications
|
||||
* of the software.
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License, version 2, as
|
||||
* published by the Free Software Foundation (the "GPL").
|
||||
*
|
||||
* 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 version 2 (GPLv2) for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* version 2 (GPLv2) along with this source code.
|
||||
*/
|
||||
/*
|
||||
* $Id: linux_dma.c,v 1.414 Broadcom SDK $
|
||||
@ -102,6 +101,10 @@
|
||||
#define VIRT_TO_PAGE(p) virt_to_page((p))
|
||||
#endif
|
||||
|
||||
#ifndef KMALLOC_MAX_SIZE
|
||||
#define KMALLOC_MAX_SIZE (1UL << (MAX_ORDER - 1 + PAGE_SHIFT))
|
||||
#endif
|
||||
|
||||
/* Compatibility */
|
||||
#ifdef LKM_2_4
|
||||
#define MEM_MAP_RESERVE mem_map_reserve
|
||||
@ -149,10 +152,17 @@ LKM_MOD_PARAM(himem, "s", charp, 0);
|
||||
MODULE_PARM_DESC(himem,
|
||||
"Use high memory for DMA (default no)");
|
||||
|
||||
/* Physical high memory address to use for DMA */
|
||||
static char *himemaddr = 0;
|
||||
LKM_MOD_PARAM(himemaddr, "s", charp, 0);
|
||||
MODULE_PARM_DESC(himemaddr,
|
||||
"Physical address to use for high memory DMA");
|
||||
|
||||
/* DMA memory allocation */
|
||||
|
||||
#define ONE_KB 1024
|
||||
#define ONE_MB (1024*1024)
|
||||
#define ONE_GB (1024*1024*1024)
|
||||
|
||||
/* Default DMA memory size */
|
||||
#ifdef SAL_BDE_DMA_MEM_DEFAULT
|
||||
@ -189,10 +199,12 @@ static phys_addr_t _cpu_pbase = 0;
|
||||
*/
|
||||
static phys_addr_t _dma_pbase = 0;
|
||||
static int _use_himem = 0;
|
||||
static unsigned long _himemaddr = 0;
|
||||
static int _use_dma_mapping = 0;
|
||||
static LIST_HEAD(_dma_seg);
|
||||
|
||||
#define DMA_DEV(n) lkbde_get_dma_dev(n)
|
||||
#define DMA_DEV(n) lkbde_get_dma_dev(n)
|
||||
#define BDE_NUM_DEVICES(t) lkbde_get_num_devices(t)
|
||||
|
||||
/*
|
||||
* Function: _find_largest_segment
|
||||
@ -304,8 +316,7 @@ _alloc_dma_blocks(dma_segment_t *dseg, int blks)
|
||||
return -1;
|
||||
}
|
||||
start = dseg->blk_cnt;
|
||||
dseg->blk_cnt += blks;
|
||||
for (i = start; i < dseg->blk_cnt; i++) {
|
||||
for (i = 0; i < blks; i++) {
|
||||
/*
|
||||
* Note that we cannot use pci_alloc_consistent when we
|
||||
* want to be able to map DMA memory to user space.
|
||||
@ -317,9 +328,11 @@ _alloc_dma_blocks(dma_segment_t *dseg, int blks)
|
||||
*/
|
||||
addr = __get_free_pages(mem_flags, dseg->blk_order);
|
||||
if (addr) {
|
||||
dseg->blk_ptr[i] = addr;
|
||||
dseg->blk_ptr[start + i] = addr;
|
||||
++dseg->blk_cnt;
|
||||
} else {
|
||||
gprintk("DMA allocation failed\n");
|
||||
gprintk("DMA allocation failed: allocated %d of %d "
|
||||
"requested blocks\n", i, blks);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
@ -375,6 +388,10 @@ _dma_segment_alloc(size_t size, size_t blk_size)
|
||||
si_meminfo(&si);
|
||||
dseg->blk_cnt_max = (si.totalram << PAGE_SHIFT) / dseg->blk_size;
|
||||
blk_ptr_size = dseg->blk_cnt_max * sizeof(unsigned long);
|
||||
if (blk_ptr_size > KMALLOC_MAX_SIZE) {
|
||||
blk_ptr_size = KMALLOC_MAX_SIZE;
|
||||
dseg->blk_cnt_max = KMALLOC_MAX_SIZE / sizeof(unsigned long);
|
||||
}
|
||||
/* Allocate an initialize DMA block pool */
|
||||
dseg->blk_ptr = KMALLOC(blk_ptr_size, GFP_KERNEL);
|
||||
if (dseg->blk_ptr == NULL) {
|
||||
@ -383,7 +400,15 @@ _dma_segment_alloc(size_t size, size_t blk_size)
|
||||
}
|
||||
memset(dseg->blk_ptr, 0, blk_ptr_size);
|
||||
/* Allocate minimum number of blocks */
|
||||
_alloc_dma_blocks(dseg, dseg->req_size / dseg->blk_size);
|
||||
if (_alloc_dma_blocks(dseg, dseg->req_size / dseg->blk_size) != 0) {
|
||||
gprintk("Failed to allocate minimum number of DMA blocks\n");
|
||||
/*
|
||||
* _alloc_dma_blocks() returns -1 if it fails to allocate the requested
|
||||
* number of blocks, but it may still have allocated something. Fall
|
||||
* through and return dseg filled in with as much memory as we could
|
||||
* allocate.
|
||||
*/
|
||||
}
|
||||
/* Allocate more blocks until we have a complete segment */
|
||||
do {
|
||||
_find_largest_segment(dseg);
|
||||
@ -467,6 +492,9 @@ _pgalloc(size_t size)
|
||||
}
|
||||
if (dseg->seg_size < size) {
|
||||
/* If we didn't get the full size then forget it */
|
||||
gprintk("_pgalloc() failed to get requested size %zu: "
|
||||
"only got %lu contiguous across %d blocks\n",
|
||||
size, dseg->seg_size, dseg->blk_cnt);
|
||||
_dma_segment_free(dseg);
|
||||
return NULL;
|
||||
}
|
||||
@ -524,8 +552,12 @@ _pgcleanup(void)
|
||||
|
||||
case ALLOC_TYPE_CHUNK: {
|
||||
struct list_head *pos, *tmp;
|
||||
int i, ndevices;
|
||||
if (_use_dma_mapping) {
|
||||
dma_unmap_single(DMA_DEV(0), (dma_addr_t)_dma_pbase, _dma_mem_size, DMA_BIDIRECTIONAL);
|
||||
ndevices = BDE_NUM_DEVICES(BDE_ALL_DEVICES);
|
||||
for (i = 0; i < ndevices && DMA_DEV(i); i ++) {
|
||||
dma_unmap_single(DMA_DEV(i), (dma_addr_t)_dma_pbase, _dma_mem_size, DMA_BIDIRECTIONAL);
|
||||
}
|
||||
_use_dma_mapping = 0;
|
||||
}
|
||||
list_for_each_safe(pos, tmp, &_dma_seg) {
|
||||
@ -558,7 +590,9 @@ _pgcleanup(void)
|
||||
static void
|
||||
_alloc_mpool(size_t size)
|
||||
{
|
||||
unsigned long pbase = 0;
|
||||
int i, ndevices;
|
||||
unsigned long pbase = 0;
|
||||
unsigned long orig_pbase = 0;
|
||||
|
||||
#if defined(__arm__) && !defined(CONFIG_HIGHMEM)
|
||||
if (_use_himem) {
|
||||
@ -569,7 +603,11 @@ _alloc_mpool(size_t size)
|
||||
|
||||
if (_use_himem) {
|
||||
/* Use high memory for DMA */
|
||||
pbase = virt_to_bus(high_memory);
|
||||
if (_himemaddr) {
|
||||
pbase = _himemaddr;
|
||||
} else {
|
||||
pbase = virt_to_bus(high_memory);
|
||||
}
|
||||
if (((pbase + (size - 1)) >> 16) > DMA_BIT_MASK(16)) {
|
||||
gprintk("DMA in high memory at 0x%lx size 0x%lx is beyond the 4GB limit and not supported.\n", pbase, (unsigned long)size);
|
||||
return;
|
||||
@ -589,14 +627,14 @@ _alloc_mpool(size_t size)
|
||||
{
|
||||
dma_addr_t dma_handle;
|
||||
if (!(_dma_vbase = dma_alloc_coherent(DMA_DEV(0), alloc_size, &dma_handle, GFP_KERNEL)) || !dma_handle) {
|
||||
gprintk("_alloc_mpool: Kernel failed to allocate the memory pool of size 0x%lx\n", (unsigned long)alloc_size);
|
||||
gprintk("failed to allocate the memory pool of size 0x%lx\n", (unsigned long)alloc_size);
|
||||
return;
|
||||
}
|
||||
pbase = dma_handle;
|
||||
_cpu_pbase = pbase = dma_handle;
|
||||
}
|
||||
|
||||
if (alloc_size != size) {
|
||||
gprintk("_alloc_mpool: allocated 0x%lx bytes instead of 0x%lx bytes.\n",
|
||||
gprintk("allocated 0x%lx bytes instead of 0x%lx bytes.\n",
|
||||
(unsigned long)alloc_size, (unsigned long)size);
|
||||
}
|
||||
size = _dma_mem_size = alloc_size;
|
||||
@ -606,27 +644,40 @@ _alloc_mpool(size_t size)
|
||||
|
||||
case ALLOC_TYPE_CHUNK:
|
||||
_dma_vbase = _pgalloc(size);
|
||||
if (DMA_DEV(0)) {
|
||||
/*
|
||||
* Use dma_map_single to obtain dma bus address or IOVA if iommu is present.
|
||||
*/
|
||||
pbase = dma_map_single(DMA_DEV(0), _dma_vbase, size, DMA_BIDIRECTIONAL);
|
||||
if (!_dma_vbase) {
|
||||
gprintk("failed to allocate the memory pool of size 0x%lx\n", (unsigned long)size);
|
||||
return;
|
||||
}
|
||||
_cpu_pbase = virt_to_bus(_dma_vbase);
|
||||
ndevices = BDE_NUM_DEVICES(BDE_ALL_DEVICES);
|
||||
for (i = 0; i < ndevices && DMA_DEV(i); i ++) {
|
||||
/* Use dma_map_single to obtain DMA bus address or IOVA if iommu is present. */
|
||||
pbase = dma_map_single(DMA_DEV(i), _dma_vbase, size, DMA_BIDIRECTIONAL);
|
||||
if (_use_dma_mapping && (orig_pbase != pbase)) {
|
||||
/* Bus address/IOVA must be identical for all devices. */
|
||||
gprintk("deivce %d has different pbase: %lx (should be %lx)\n",
|
||||
i, pbase, orig_pbase);
|
||||
dma_unmap_single(DMA_DEV(i), (dma_addr_t)pbase, size, DMA_BIDIRECTIONAL);
|
||||
while (--i >= 0 && DMA_DEV(i)) {
|
||||
dma_unmap_single(DMA_DEV(i), (dma_addr_t)orig_pbase, size, DMA_BIDIRECTIONAL);
|
||||
}
|
||||
_use_dma_mapping = 0;
|
||||
_pgcleanup();
|
||||
_dma_vbase = NULL;
|
||||
return;
|
||||
}
|
||||
orig_pbase = pbase;
|
||||
_use_dma_mapping = 1;
|
||||
} else {
|
||||
pbase = virt_to_bus(_dma_vbase);
|
||||
}
|
||||
if (!_use_dma_mapping) {
|
||||
/* Device has not been probed. */
|
||||
pbase = _cpu_pbase;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
_dma_vbase = NULL;
|
||||
pbase = 0;
|
||||
gprintk("DMA memory allocation method dmaalloc=%d is not supported\n", dmaalloc);
|
||||
}
|
||||
|
||||
_dma_pbase = pbase;
|
||||
|
||||
if (dma_debug >= 1) {
|
||||
gprintk("_alloc_mpool:%s _dma_vbase:%p pbase:%lx allocated:%lx dmaalloc:%d\n",
|
||||
DMA_DEV(0)?"dma_dev":"", _dma_vbase, pbase, (unsigned long)size, dmaalloc);
|
||||
return;
|
||||
}
|
||||
|
||||
if (((pbase + (size - 1)) >> 16) > DMA_BIT_MASK(16)) {
|
||||
@ -637,14 +688,15 @@ _alloc_mpool(size_t size)
|
||||
return;
|
||||
}
|
||||
|
||||
if (_dma_vbase) {
|
||||
_cpu_pbase = virt_to_bus(_dma_vbase);
|
||||
if (dma_debug >= 1) gprintk("_cpu_pbase at %lx\n", (unsigned long)_cpu_pbase);
|
||||
}
|
||||
_dma_pbase = pbase;
|
||||
#ifdef REMAP_DMA_NONCACHED
|
||||
_dma_vbase = IOREMAP(_dma_pbase, size);
|
||||
#endif
|
||||
|
||||
if (dma_debug >= 1) {
|
||||
gprintk("_use_dma_mapping:%d _dma_vbase:%p _dma_pbase:%lx _cpu_pbase:%lx allocated:%lx dmaalloc:%d\n",
|
||||
_use_dma_mapping, _dma_vbase, (unsigned long)_dma_pbase,
|
||||
(unsigned long)_cpu_pbase, (unsigned long)size, dmaalloc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -706,6 +758,18 @@ void _dma_init(int robo_switch)
|
||||
}
|
||||
}
|
||||
|
||||
if (himemaddr && strlen(himemaddr) > 0) {
|
||||
char suffix = (himemaddr[strlen(himemaddr)-1] & ~0x20);
|
||||
_himemaddr = simple_strtoul(himemaddr, NULL, 0);
|
||||
if (suffix == 'M') {
|
||||
_himemaddr *= ONE_MB;
|
||||
} else if (suffix == 'G') {
|
||||
_himemaddr *= ONE_GB;
|
||||
} else {
|
||||
gprintk("DMA high memory address must be specified as e.g. himemaddr=8[MG]\n");
|
||||
}
|
||||
}
|
||||
|
||||
if (_dma_mem_size) {
|
||||
_alloc_mpool(_dma_mem_size);
|
||||
if (_dma_vbase == NULL) {
|
||||
|
@ -1,18 +1,17 @@
|
||||
/*
|
||||
* Unless you and Broadcom execute a separate written software license
|
||||
* agreement governing use of this software, this software is licensed to
|
||||
* you under the terms of the GNU General Public License version 2 (the
|
||||
* "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
|
||||
* with the following added to such license:
|
||||
* Copyright 2017 Broadcom
|
||||
*
|
||||
* As a special exception, the copyright holders of this software give
|
||||
* you permission to link this software with independent modules, and to
|
||||
* copy and distribute the resulting executable under terms of your
|
||||
* choice, provided that you also meet, for each linked independent
|
||||
* module, the terms and conditions of the license of that module. An
|
||||
* independent module is a module which is not derived from this
|
||||
* software. The special exception does not apply to any modifications
|
||||
* of the software.
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License, version 2, as
|
||||
* published by the Free Software Foundation (the "GPL").
|
||||
*
|
||||
* 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 version 2 (GPLv2) for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* version 2 (GPLv2) along with this source code.
|
||||
*/
|
||||
/*
|
||||
* $Id: $
|
||||
|
@ -1,18 +1,17 @@
|
||||
/*
|
||||
* Unless you and Broadcom execute a separate written software license
|
||||
* agreement governing use of this software, this software is licensed to
|
||||
* you under the terms of the GNU General Public License version 2 (the
|
||||
* "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
|
||||
* with the following added to such license:
|
||||
* Copyright 2017 Broadcom
|
||||
*
|
||||
* As a special exception, the copyright holders of this software give
|
||||
* you permission to link this software with independent modules, and to
|
||||
* copy and distribute the resulting executable under terms of your
|
||||
* choice, provided that you also meet, for each linked independent
|
||||
* module, the terms and conditions of the license of that module. An
|
||||
* independent module is a module which is not derived from this
|
||||
* software. The special exception does not apply to any modifications
|
||||
* of the software.
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License, version 2, as
|
||||
* published by the Free Software Foundation (the "GPL").
|
||||
*
|
||||
* 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 version 2 (GPLv2) for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* version 2 (GPLv2) along with this source code.
|
||||
*/
|
||||
/*
|
||||
* $Id: $
|
||||
|
@ -1,18 +1,17 @@
|
||||
/*
|
||||
* Unless you and Broadcom execute a separate written software license
|
||||
* agreement governing use of this software, this software is licensed to
|
||||
* you under the terms of the GNU General Public License version 2 (the
|
||||
* "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
|
||||
* with the following added to such license:
|
||||
* Copyright 2017 Broadcom
|
||||
*
|
||||
* As a special exception, the copyright holders of this software give
|
||||
* you permission to link this software with independent modules, and to
|
||||
* copy and distribute the resulting executable under terms of your
|
||||
* choice, provided that you also meet, for each linked independent
|
||||
* module, the terms and conditions of the license of that module. An
|
||||
* independent module is a module which is not derived from this
|
||||
* software. The special exception does not apply to any modifications
|
||||
* of the software.
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License, version 2, as
|
||||
* published by the Free Software Foundation (the "GPL").
|
||||
*
|
||||
* 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 version 2 (GPLv2) for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* version 2 (GPLv2) along with this source code.
|
||||
*/
|
||||
/*
|
||||
* $Id: mpool.c,v 1.18 Broadcom SDK $
|
||||
|
@ -1,18 +1,17 @@
|
||||
#
|
||||
# Unless you and Broadcom execute a separate written software license
|
||||
# agreement governing use of this software, this software is licensed to
|
||||
# you under the terms of the GNU General Public License version 2 (the
|
||||
# "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
|
||||
# with the following added to such license:
|
||||
# Copyright 2017 Broadcom
|
||||
#
|
||||
# As a special exception, the copyright holders of this software give
|
||||
# you permission to link this software with independent modules, and to
|
||||
# copy and distribute the resulting executable under terms of your
|
||||
# choice, provided that you also meet, for each linked independent
|
||||
# module, the terms and conditions of the license of that module. An
|
||||
# independent module is a module which is not derived from this
|
||||
# software. The special exception does not apply to any modifications
|
||||
# of the software.
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License, version 2, as
|
||||
# published by the Free Software Foundation (the "GPL").
|
||||
#
|
||||
# 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 version 2 (GPLv2) for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# version 2 (GPLv2) along with this source code.
|
||||
#
|
||||
# -*- Makefile -*-
|
||||
# $Id: Makefile,v 1.1 Broadcom SDK $
|
||||
|
@ -1,18 +1,17 @@
|
||||
/*
|
||||
* Unless you and Broadcom execute a separate written software license
|
||||
* agreement governing use of this software, this software is licensed to
|
||||
* you under the terms of the GNU General Public License version 2 (the
|
||||
* "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
|
||||
* with the following added to such license:
|
||||
* Copyright 2017 Broadcom
|
||||
*
|
||||
* As a special exception, the copyright holders of this software give
|
||||
* you permission to link this software with independent modules, and to
|
||||
* copy and distribute the resulting executable under terms of your
|
||||
* choice, provided that you also meet, for each linked independent
|
||||
* module, the terms and conditions of the license of that module. An
|
||||
* independent module is a module which is not derived from this
|
||||
* software. The special exception does not apply to any modifications
|
||||
* of the software.
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License, version 2, as
|
||||
* published by the Free Software Foundation (the "GPL").
|
||||
*
|
||||
* 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 version 2 (GPLv2) for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* version 2 (GPLv2) along with this source code.
|
||||
*/
|
||||
/*
|
||||
* $Id: linux-user-bde.c,v 1.80 Broadcom SDK $
|
||||
@ -64,6 +63,8 @@ MODULE_LICENSE("GPL");
|
||||
#define CMIC_CMCx_IRQ_STAT6_OFFSET(x) (0x314b4 + (0x1000 * x))
|
||||
#define CMIC_CMCx_PCIE_IRQ_MASK5_OFFSET(x) (0x314b8 + (0x1000 * x))
|
||||
#define CMIC_CMCx_PCIE_IRQ_MASK6_OFFSET(x) (0x314bc + (0x1000 * x))
|
||||
#define CMIC_CMCx_UC0_IRQ_MASK5_OFFSET(x) (0x314c0 + (0x1000 * x))
|
||||
#define CMIC_CMCx_UC0_IRQ_MASK6_OFFSET(x) (0x314c4 + (0x1000 * x))
|
||||
|
||||
#define CMIC_CMCx_UC0_IRQ_MASK0_OFFSET(x) (0x31428 + (0x1000 * x))
|
||||
#define CMIC_CMCx_UC0_IRQ_MASK1_OFFSET(x) (0x3142c + (0x1000 * x))
|
||||
@ -72,16 +73,17 @@ MODULE_LICENSE("GPL");
|
||||
#define CMIC_CMCx_UC0_IRQ_MASK4_OFFSET(x) (0x31438 + (0x1000 * x))
|
||||
|
||||
/* CMICX defines */
|
||||
#define INTC_INTR_REG_NUM (8)
|
||||
#define INTC_INTR_REG_NUM (8)
|
||||
|
||||
#define INTC_INTR_ENABLE_REG0 (0x180130f0)
|
||||
#define INTC_INTR_STATUS_REG0 (0x18013190)
|
||||
#define INTC_INTR_RAW_STATUS_REG0 (0x18013140)
|
||||
#define INTC_INTR_ENABLE_REG0 (0x180130f0)
|
||||
#define INTC_INTR_STATUS_REG0 (0x18013190)
|
||||
#define INTC_INTR_RAW_STATUS_REG0 (0x18013140)
|
||||
|
||||
#define INTC_INTR_ENABLE_BASE (INTC_INTR_ENABLE_REG0)
|
||||
#define INTC_INTR_STATUS_BASE (INTC_INTR_STATUS_REG0)
|
||||
#define INTC_INTR_RAW_STATUS_BASE (INTC_INTR_RAW_STATUS_REG0)
|
||||
#define INTC_INTR_ENABLE_BASE (INTC_INTR_ENABLE_REG0)
|
||||
#define INTC_INTR_STATUS_BASE (INTC_INTR_STATUS_REG0)
|
||||
#define INTC_INTR_RAW_STATUS_BASE (INTC_INTR_RAW_STATUS_REG0)
|
||||
|
||||
#define INTC_PDMA_INTR_REG_IND 4
|
||||
|
||||
#define READ_INTC_INTR(d, reg, v) \
|
||||
(v = user_bde->iproc_read(d, reg))
|
||||
@ -220,18 +222,45 @@ _cmic_interrupt(bde_ctrl_t *ctrl)
|
||||
static void
|
||||
_cmicx_interrupt(bde_ctrl_t *ctrl)
|
||||
{
|
||||
int d, i;
|
||||
int d, ind;
|
||||
uint32 stat, iena, mask, fmask;
|
||||
bde_inst_resource_t *res;
|
||||
|
||||
d = (((uint8 *)ctrl - (uint8 *)_devices) / sizeof (bde_ctrl_t));
|
||||
res = &_bde_inst_resource[ctrl->inst];
|
||||
|
||||
lkbde_irq_mask_get(d, &mask, &fmask);
|
||||
|
||||
if (fmask) {
|
||||
READ_INTC_INTR(d, INTC_INTR_STATUS_BASE + 4 * INTC_PDMA_INTR_REG_IND, stat);
|
||||
READ_INTC_INTR(d, INTC_INTR_ENABLE_BASE + 4 * INTC_PDMA_INTR_REG_IND, iena);
|
||||
if (stat & iena) {
|
||||
WRITE_INTC_INTR(d, INTC_INTR_ENABLE_BASE + 4 * INTC_PDMA_INTR_REG_IND, 0);
|
||||
for (ind = 0; ind < INTC_INTR_REG_NUM; ind++) {
|
||||
if (ind == INTC_PDMA_INTR_REG_IND) {
|
||||
continue;
|
||||
}
|
||||
READ_INTC_INTR(d, INTC_INTR_STATUS_BASE + 4 * ind, stat);
|
||||
READ_INTC_INTR(d, INTC_INTR_ENABLE_BASE + 4 * ind, iena);
|
||||
if (stat & iena) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (ind >= INTC_INTR_REG_NUM) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Disable all interrupts.. Re-enable unserviced interrupts later
|
||||
* So as to avoid getting new interrupts until the user level driver
|
||||
* enumerates the interrupts to be serviced
|
||||
*/
|
||||
for (i = 0 ; i < INTC_INTR_REG_NUM ; i++) {
|
||||
WRITE_INTC_INTR(d, (INTC_INTR_ENABLE_BASE + 4*i), 0);
|
||||
for (ind = 0; ind < INTC_INTR_REG_NUM; ind++) {
|
||||
if (fmask && ind == INTC_PDMA_INTR_REG_IND) {
|
||||
continue;
|
||||
}
|
||||
WRITE_INTC_INTR(d, INTC_INTR_ENABLE_BASE + 4 * ind, 0);
|
||||
}
|
||||
|
||||
/* Notify */
|
||||
@ -327,8 +356,108 @@ _cmicm_interrupt(bde_ctrl_t *ctrl)
|
||||
#endif
|
||||
}
|
||||
|
||||
/* some device has cmc0 only */
|
||||
static void
|
||||
_cmicd_cmc0_interrupt(bde_ctrl_t *ctrl)
|
||||
{
|
||||
int d;
|
||||
int cmc = 0;
|
||||
uint32 stat, mask = 0, fmask = 0, imask = 0;
|
||||
bde_inst_resource_t *res;
|
||||
|
||||
static void
|
||||
d = (((uint8 *)ctrl - (uint8 *)_devices) / sizeof (bde_ctrl_t));
|
||||
res = &_bde_inst_resource[ctrl->inst];
|
||||
lkbde_irq_mask_get(d, &mask, &fmask);
|
||||
|
||||
while (fmask) {
|
||||
stat = user_bde->read(d, CMIC_CMCx_IRQ_STAT0_OFFSET(cmc));
|
||||
imask = mask & ~fmask;
|
||||
if (stat & imask) {
|
||||
break;
|
||||
}
|
||||
stat = user_bde->read(d, CMIC_CMCx_IRQ_STAT1_OFFSET(cmc));
|
||||
if (ctrl->dev_type & BDE_AXI_DEV_TYPE) {
|
||||
mask = user_bde->read(d, CMIC_CMCx_UC0_IRQ_MASK1_OFFSET(cmc));
|
||||
} else {
|
||||
mask = user_bde->read(d, CMIC_CMCx_PCIE_IRQ_MASK1_OFFSET(cmc));
|
||||
}
|
||||
if (stat & mask) {
|
||||
break;
|
||||
}
|
||||
stat = user_bde->read(d, CMIC_CMCx_IRQ_STAT2_OFFSET(cmc));
|
||||
if (ctrl->dev_type & BDE_AXI_DEV_TYPE) {
|
||||
mask = user_bde->read(d, CMIC_CMCx_UC0_IRQ_MASK2_OFFSET(cmc));
|
||||
} else {
|
||||
mask = user_bde->read(d, CMIC_CMCx_PCIE_IRQ_MASK2_OFFSET(cmc));
|
||||
}
|
||||
if (stat & mask) {
|
||||
break;
|
||||
}
|
||||
stat = user_bde->read(d, CMIC_CMCx_IRQ_STAT3_OFFSET(cmc));
|
||||
if (ctrl->dev_type & BDE_AXI_DEV_TYPE) {
|
||||
mask = user_bde->read(d, CMIC_CMCx_UC0_IRQ_MASK3_OFFSET(cmc));
|
||||
} else {
|
||||
mask = user_bde->read(d, CMIC_CMCx_PCIE_IRQ_MASK3_OFFSET(cmc));
|
||||
}
|
||||
if (stat & mask) {
|
||||
break;
|
||||
}
|
||||
stat = user_bde->read(d, CMIC_CMCx_IRQ_STAT4_OFFSET(cmc));
|
||||
if (ctrl->dev_type & BDE_AXI_DEV_TYPE) {
|
||||
mask = user_bde->read(d, CMIC_CMCx_UC0_IRQ_MASK4_OFFSET(cmc));
|
||||
} else {
|
||||
mask = user_bde->read(d, CMIC_CMCx_PCIE_IRQ_MASK4_OFFSET(cmc));
|
||||
}
|
||||
if (stat & mask) {
|
||||
break;
|
||||
}
|
||||
stat = user_bde->read(d, CMIC_CMCx_IRQ_STAT5_OFFSET(cmc));
|
||||
if (ctrl->dev_type & BDE_AXI_DEV_TYPE) {
|
||||
mask = user_bde->read(d, CMIC_CMCx_UC0_IRQ_MASK5_OFFSET(cmc));
|
||||
} else {
|
||||
mask = user_bde->read(d, CMIC_CMCx_PCIE_IRQ_MASK5_OFFSET(cmc));
|
||||
}
|
||||
if (stat & mask) {
|
||||
break;
|
||||
}
|
||||
stat = user_bde->read(d, CMIC_CMCx_IRQ_STAT6_OFFSET(cmc));
|
||||
if (ctrl->dev_type & BDE_AXI_DEV_TYPE) {
|
||||
mask = user_bde->read(d, CMIC_CMCx_UC0_IRQ_MASK6_OFFSET(cmc));
|
||||
} else {
|
||||
mask = user_bde->read(d, CMIC_CMCx_PCIE_IRQ_MASK6_OFFSET(cmc));
|
||||
}
|
||||
if (stat & mask) {
|
||||
break;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (ctrl->dev_type & BDE_AXI_DEV_TYPE) {
|
||||
lkbde_irq_mask_set(d, CMIC_CMCx_UC0_IRQ_MASK0_OFFSET(cmc), 0, 0);
|
||||
user_bde->write(d, CMIC_CMCx_UC0_IRQ_MASK1_OFFSET(cmc), 0);
|
||||
user_bde->write(d, CMIC_CMCx_UC0_IRQ_MASK2_OFFSET(cmc), 0);
|
||||
user_bde->write(d, CMIC_CMCx_UC0_IRQ_MASK3_OFFSET(cmc), 0);
|
||||
user_bde->write(d, CMIC_CMCx_UC0_IRQ_MASK4_OFFSET(cmc), 0);
|
||||
user_bde->write(d, CMIC_CMCx_UC0_IRQ_MASK5_OFFSET(cmc), 0);
|
||||
user_bde->write(d, CMIC_CMCx_UC0_IRQ_MASK6_OFFSET(cmc), 0);
|
||||
} else {
|
||||
lkbde_irq_mask_set(d, CMIC_CMCx_PCIE_IRQ_MASK0_OFFSET(cmc), 0, 0);
|
||||
user_bde->write(d, CMIC_CMCx_PCIE_IRQ_MASK1_OFFSET(cmc), 0);
|
||||
user_bde->write(d, CMIC_CMCx_PCIE_IRQ_MASK2_OFFSET(cmc), 0);
|
||||
user_bde->write(d, CMIC_CMCx_PCIE_IRQ_MASK3_OFFSET(cmc), 0);
|
||||
user_bde->write(d, CMIC_CMCx_PCIE_IRQ_MASK4_OFFSET(cmc), 0);
|
||||
user_bde->write(d, CMIC_CMCx_PCIE_IRQ_MASK5_OFFSET(cmc), 0);
|
||||
user_bde->write(d, CMIC_CMCx_PCIE_IRQ_MASK6_OFFSET(cmc), 0);
|
||||
}
|
||||
atomic_set(&res->intr, 1);
|
||||
#ifdef BDE_LINUX_NON_INTERRUPTIBLE
|
||||
wake_up(&res->intr_wq);
|
||||
#else
|
||||
wake_up_interruptible(&res->intr_wq);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void
|
||||
_cmicd_interrupt(bde_ctrl_t *ctrl)
|
||||
{
|
||||
int d;
|
||||
@ -347,46 +476,83 @@ _cmicd_interrupt(bde_ctrl_t *ctrl)
|
||||
break;
|
||||
}
|
||||
stat = user_bde->read(d, CMIC_CMCx_IRQ_STAT1_OFFSET(cmc));
|
||||
mask = user_bde->read(d, CMIC_CMCx_PCIE_IRQ_MASK1_OFFSET(cmc));
|
||||
if (ctrl->dev_type & BDE_AXI_DEV_TYPE) {
|
||||
mask = user_bde->read(d, CMIC_CMCx_UC0_IRQ_MASK1_OFFSET(cmc));
|
||||
} else {
|
||||
mask = user_bde->read(d, CMIC_CMCx_PCIE_IRQ_MASK1_OFFSET(cmc));
|
||||
}
|
||||
if (stat & mask) {
|
||||
break;
|
||||
}
|
||||
stat = user_bde->read(d, CMIC_CMCx_IRQ_STAT2_OFFSET(cmc));
|
||||
mask = user_bde->read(d, CMIC_CMCx_PCIE_IRQ_MASK2_OFFSET(cmc));
|
||||
if (ctrl->dev_type & BDE_AXI_DEV_TYPE) {
|
||||
mask = user_bde->read(d, CMIC_CMCx_UC0_IRQ_MASK2_OFFSET(cmc));
|
||||
} else {
|
||||
mask = user_bde->read(d, CMIC_CMCx_PCIE_IRQ_MASK2_OFFSET(cmc));
|
||||
}
|
||||
if (stat & mask) {
|
||||
break;
|
||||
}
|
||||
stat = user_bde->read(d, CMIC_CMCx_IRQ_STAT3_OFFSET(cmc));
|
||||
mask = user_bde->read(d, CMIC_CMCx_PCIE_IRQ_MASK3_OFFSET(cmc));
|
||||
if (ctrl->dev_type & BDE_AXI_DEV_TYPE) {
|
||||
mask = user_bde->read(d, CMIC_CMCx_UC0_IRQ_MASK3_OFFSET(cmc));
|
||||
} else {
|
||||
mask = user_bde->read(d, CMIC_CMCx_PCIE_IRQ_MASK3_OFFSET(cmc));
|
||||
}
|
||||
if (stat & mask) {
|
||||
break;
|
||||
}
|
||||
stat = user_bde->read(d, CMIC_CMCx_IRQ_STAT4_OFFSET(cmc));
|
||||
mask = user_bde->read(d, CMIC_CMCx_PCIE_IRQ_MASK4_OFFSET(cmc));
|
||||
if (ctrl->dev_type & BDE_AXI_DEV_TYPE) {
|
||||
mask = user_bde->read(d, CMIC_CMCx_UC0_IRQ_MASK4_OFFSET(cmc));
|
||||
} else {
|
||||
mask = user_bde->read(d, CMIC_CMCx_PCIE_IRQ_MASK4_OFFSET(cmc));
|
||||
}
|
||||
if (stat & mask) {
|
||||
break;
|
||||
}
|
||||
stat = user_bde->read(d, CMIC_CMCx_IRQ_STAT5_OFFSET(cmc));
|
||||
mask = user_bde->read(d, CMIC_CMCx_PCIE_IRQ_MASK5_OFFSET(cmc));
|
||||
if (ctrl->dev_type & BDE_AXI_DEV_TYPE) {
|
||||
mask = user_bde->read(d, CMIC_CMCx_UC0_IRQ_MASK5_OFFSET(cmc));
|
||||
} else {
|
||||
mask = user_bde->read(d, CMIC_CMCx_PCIE_IRQ_MASK5_OFFSET(cmc));
|
||||
}
|
||||
if (stat & mask) {
|
||||
break;
|
||||
}
|
||||
stat = user_bde->read(d, CMIC_CMCx_IRQ_STAT6_OFFSET(cmc));
|
||||
mask = user_bde->read(d, CMIC_CMCx_PCIE_IRQ_MASK6_OFFSET(cmc));
|
||||
if (ctrl->dev_type & BDE_AXI_DEV_TYPE) {
|
||||
mask = user_bde->read(d, CMIC_CMCx_UC0_IRQ_MASK6_OFFSET(cmc));
|
||||
} else {
|
||||
mask = user_bde->read(d, CMIC_CMCx_PCIE_IRQ_MASK6_OFFSET(cmc));
|
||||
}
|
||||
if (stat & mask) {
|
||||
break;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
lkbde_irq_mask_set(d, CMIC_CMCx_PCIE_IRQ_MASK0_OFFSET(cmc), 0, 0);
|
||||
user_bde->write(d, CMIC_CMCx_PCIE_IRQ_MASK1_OFFSET(cmc), 0);
|
||||
user_bde->write(d, CMIC_CMCx_PCIE_IRQ_MASK2_OFFSET(cmc), 0);
|
||||
user_bde->write(d, CMIC_CMCx_PCIE_IRQ_MASK3_OFFSET(cmc), 0);
|
||||
user_bde->write(d, CMIC_CMCx_PCIE_IRQ_MASK4_OFFSET(cmc), 0);
|
||||
user_bde->write(d, CMIC_CMCx_PCIE_IRQ_MASK5_OFFSET(cmc), 0);
|
||||
user_bde->write(d, CMIC_CMCx_PCIE_IRQ_MASK6_OFFSET(cmc), 0);
|
||||
|
||||
if (ctrl->dev_type & BDE_AXI_DEV_TYPE) {
|
||||
lkbde_irq_mask_set(d, CMIC_CMCx_UC0_IRQ_MASK0_OFFSET(cmc), 0, 0);
|
||||
user_bde->write(d, CMIC_CMCx_UC0_IRQ_MASK1_OFFSET(cmc), 0);
|
||||
user_bde->write(d, CMIC_CMCx_UC0_IRQ_MASK2_OFFSET(cmc), 0);
|
||||
user_bde->write(d, CMIC_CMCx_UC0_IRQ_MASK3_OFFSET(cmc), 0);
|
||||
user_bde->write(d, CMIC_CMCx_UC0_IRQ_MASK4_OFFSET(cmc), 0);
|
||||
user_bde->write(d, CMIC_CMCx_UC0_IRQ_MASK5_OFFSET(cmc), 0);
|
||||
user_bde->write(d, CMIC_CMCx_UC0_IRQ_MASK6_OFFSET(cmc), 0);
|
||||
user_bde->write(d, CMIC_CMCx_UC0_IRQ_MASK0_OFFSET(1), 0);
|
||||
user_bde->write(d, CMIC_CMCx_UC0_IRQ_MASK0_OFFSET(2), 0);
|
||||
} else {
|
||||
lkbde_irq_mask_set(d, CMIC_CMCx_PCIE_IRQ_MASK0_OFFSET(cmc), 0, 0);
|
||||
user_bde->write(d, CMIC_CMCx_PCIE_IRQ_MASK1_OFFSET(cmc), 0);
|
||||
user_bde->write(d, CMIC_CMCx_PCIE_IRQ_MASK2_OFFSET(cmc), 0);
|
||||
user_bde->write(d, CMIC_CMCx_PCIE_IRQ_MASK3_OFFSET(cmc), 0);
|
||||
user_bde->write(d, CMIC_CMCx_PCIE_IRQ_MASK4_OFFSET(cmc), 0);
|
||||
user_bde->write(d, CMIC_CMCx_PCIE_IRQ_MASK5_OFFSET(cmc), 0);
|
||||
user_bde->write(d, CMIC_CMCx_PCIE_IRQ_MASK6_OFFSET(cmc), 0);
|
||||
user_bde->write(d, CMIC_CMCx_PCIE_IRQ_MASK0_OFFSET(1), 0);
|
||||
user_bde->write(d, CMIC_CMCx_PCIE_IRQ_MASK0_OFFSET(2), 0);
|
||||
}
|
||||
atomic_set(&res->intr, 1);
|
||||
#ifdef BDE_LINUX_NON_INTERRUPTIBLE
|
||||
wake_up(&res->intr_wq);
|
||||
@ -551,6 +717,7 @@ static struct _intr_mode_s {
|
||||
{ (isr_f)_cmic_interrupt, "CMIC/CMICe" },
|
||||
{ (isr_f)_cmicm_interrupt, "CMICm" },
|
||||
{ (isr_f)_cmicd_interrupt, "CMICd" },
|
||||
{ (isr_f)_cmicd_cmc0_interrupt, "CMICd CMC0" },
|
||||
{ (isr_f)_qe2k_interrupt, "QE2K" },
|
||||
{ (isr_f)_fe2k_interrupt, "FE2K" },
|
||||
{ (isr_f)_fe2kxt_interrupt, "FE2KXT" },
|
||||
@ -580,7 +747,9 @@ static void
|
||||
_devices_init(int d)
|
||||
{
|
||||
bde_ctrl_t *ctrl;
|
||||
uint32 ver;
|
||||
uint32 ver;
|
||||
uint16 device_id_mask = 0xFFF0;
|
||||
uint16 device_id;
|
||||
|
||||
ctrl = &_devices[d];
|
||||
/* Initialize our control info */
|
||||
@ -616,7 +785,10 @@ _devices_init(int d)
|
||||
case BCM88752_DEVICE_ID:
|
||||
ctrl->isr = (isr_f)_bcm88750_interrupt;
|
||||
break;
|
||||
/* FIXME: might use _devices[i].dev_type & BDE_AXI_DEV_TYPE*/
|
||||
case BCM53540_DEVICE_ID:
|
||||
case BCM53547_DEVICE_ID:
|
||||
case BCM53548_DEVICE_ID:
|
||||
case BCM53549_DEVICE_ID:
|
||||
case BCM88670_DEVICE_ID:
|
||||
case BCM88671_DEVICE_ID:
|
||||
case BCM88671M_DEVICE_ID:
|
||||
@ -662,29 +834,35 @@ _devices_init(int d)
|
||||
case BCM88474H_DEVICE_ID:
|
||||
case BCM88476_DEVICE_ID:
|
||||
case BCM88477_DEVICE_ID:
|
||||
|
||||
case BCM88270_DEVICE_ID:
|
||||
case BCM88272_DEVICE_ID:
|
||||
case BCM88273_DEVICE_ID:
|
||||
case BCM88278_DEVICE_ID:
|
||||
case BCM88279_DEVICE_ID:
|
||||
case BCM8206_DEVICE_ID:
|
||||
case BCM88950_DEVICE_ID:
|
||||
case BCM88953_DEVICE_ID:
|
||||
case BCM88954_DEVICE_ID:
|
||||
case BCM88955_DEVICE_ID:
|
||||
case BCM88956_DEVICE_ID:
|
||||
case BCM88790_DEVICE_ID:
|
||||
case BCM88772_DEVICE_ID:
|
||||
case BCM88952_DEVICE_ID:
|
||||
ctrl->isr = (isr_f)_cmicd_interrupt;
|
||||
ctrl->isr = (isr_f)_cmicd_cmc0_interrupt;
|
||||
break;
|
||||
default:
|
||||
/* Get CMIC version */
|
||||
if (user_bde->get_cmic_ver(d, &ver) != 0) {
|
||||
ver = -1;
|
||||
}
|
||||
device_id = ctrl->devid & device_id_mask;
|
||||
/* TH/TH+/TH2 should use cmicd interrupt handler */
|
||||
if (BCM56960_DEVICE_ID == device_id ||
|
||||
BCM56930_DEVICE_ID == device_id ||
|
||||
BCM56970_DEVICE_ID == device_id) {
|
||||
ctrl->isr = (isr_f)_cmicd_interrupt;
|
||||
}
|
||||
/* check if version is CMICX */
|
||||
if (ver == 0x04) {
|
||||
else if (ver == 0x04) {
|
||||
ctrl->isr = (isr_f)_cmicx_interrupt;
|
||||
} else {
|
||||
ctrl->isr = (isr_f)_cmic_interrupt;
|
||||
@ -698,6 +876,10 @@ _devices_init(int d)
|
||||
}
|
||||
break;
|
||||
}
|
||||
/*All Ramon devices from 0x8790 to 0x879F*/
|
||||
if ((user_bde->get_dev(d)->device & BCM88790_DEVICE_ID) == BCM88790_DEVICE_ID) {
|
||||
ctrl->isr = (isr_f)_cmicx_interrupt;
|
||||
}
|
||||
if (_intr_mode_str(ctrl->isr) == NULL) {
|
||||
gprintk("Warning: Unknown interrupt mode\n");
|
||||
}
|
||||
@ -1002,7 +1184,7 @@ _ioctl(unsigned int cmd, unsigned long arg)
|
||||
break;
|
||||
case LUBDE_GET_DEVICE:
|
||||
if (!VALID_DEVICE(io.dev)) {
|
||||
return -EINVAL;
|
||||
return -EINVAL;
|
||||
}
|
||||
bde_dev = user_bde->get_dev(io.dev);
|
||||
if (bde_dev) {
|
||||
@ -1019,7 +1201,7 @@ _ioctl(unsigned int cmd, unsigned long arg)
|
||||
break;
|
||||
case LUBDE_GET_DEVICE_TYPE:
|
||||
if (!VALID_DEVICE(io.dev)) {
|
||||
return -EINVAL;
|
||||
return -EINVAL;
|
||||
}
|
||||
io.d0 = _devices[io.dev].dev_type;
|
||||
break;
|
||||
@ -1029,7 +1211,7 @@ _ioctl(unsigned int cmd, unsigned long arg)
|
||||
break;
|
||||
case LUBDE_PCI_CONFIG_PUT32:
|
||||
if (!VALID_DEVICE(io.dev)) {
|
||||
return -EINVAL;
|
||||
return -EINVAL;
|
||||
}
|
||||
if (_devices[io.dev].dev_type & BDE_PCI_DEV_TYPE) {
|
||||
user_bde->pci_conf_write(io.dev, io.d0, io.d1);
|
||||
@ -1039,7 +1221,7 @@ _ioctl(unsigned int cmd, unsigned long arg)
|
||||
break;
|
||||
case LUBDE_PCI_CONFIG_GET32:
|
||||
if (!VALID_DEVICE(io.dev)) {
|
||||
return -EINVAL;
|
||||
return -EINVAL;
|
||||
}
|
||||
if (_devices[io.dev].dev_type & BDE_PCI_DEV_TYPE) {
|
||||
io.d0 = user_bde->pci_conf_read(io.dev, io.d0);
|
||||
@ -1068,7 +1250,7 @@ _ioctl(unsigned int cmd, unsigned long arg)
|
||||
break;
|
||||
case LUBDE_ENABLE_INTERRUPTS:
|
||||
if (!VALID_DEVICE(io.dev)) {
|
||||
return -EINVAL;
|
||||
return -EINVAL;
|
||||
}
|
||||
if (_devices[io.dev].dev_type & BDE_SWITCH_DEV_TYPE) {
|
||||
if (_devices[io.dev].isr && !_devices[io.dev].enabled) {
|
||||
@ -1090,7 +1272,7 @@ _ioctl(unsigned int cmd, unsigned long arg)
|
||||
break;
|
||||
case LUBDE_DISABLE_INTERRUPTS:
|
||||
if (!VALID_DEVICE(io.dev)) {
|
||||
return -EINVAL;
|
||||
return -EINVAL;
|
||||
}
|
||||
if (_devices[io.dev].enabled) {
|
||||
user_bde->interrupt_disconnect(io.dev);
|
||||
@ -1099,7 +1281,7 @@ _ioctl(unsigned int cmd, unsigned long arg)
|
||||
break;
|
||||
case LUBDE_WAIT_FOR_INTERRUPT:
|
||||
if (!VALID_DEVICE(io.dev)) {
|
||||
return -EINVAL;
|
||||
return -EINVAL;
|
||||
}
|
||||
if (_devices[io.dev].dev_type & BDE_SWITCH_DEV_TYPE) {
|
||||
res = &_bde_inst_resource[_devices[io.dev].inst];
|
||||
@ -1200,7 +1382,7 @@ _ioctl(unsigned int cmd, unsigned long arg)
|
||||
#endif
|
||||
case LUBDE_DEV_RESOURCE:
|
||||
if (!VALID_DEVICE(io.dev)) {
|
||||
return -EINVAL;
|
||||
return -EINVAL;
|
||||
}
|
||||
bde_dev = user_bde->get_dev(io.dev);
|
||||
if (bde_dev) {
|
||||
@ -1235,7 +1417,7 @@ _ioctl(unsigned int cmd, unsigned long arg)
|
||||
io.rc = LUBDE_FAIL;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
if (copy_to_user((void *)arg, &io, sizeof(io))) {
|
||||
return -EFAULT;
|
||||
}
|
||||
|
@ -1,18 +1,17 @@
|
||||
/*
|
||||
* Unless you and Broadcom execute a separate written software license
|
||||
* agreement governing use of this software, this software is licensed to
|
||||
* you under the terms of the GNU General Public License version 2 (the
|
||||
* "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
|
||||
* with the following added to such license:
|
||||
* Copyright 2017 Broadcom
|
||||
*
|
||||
* As a special exception, the copyright holders of this software give
|
||||
* you permission to link this software with independent modules, and to
|
||||
* copy and distribute the resulting executable under terms of your
|
||||
* choice, provided that you also meet, for each linked independent
|
||||
* module, the terms and conditions of the license of that module. An
|
||||
* independent module is a module which is not derived from this
|
||||
* software. The special exception does not apply to any modifications
|
||||
* of the software.
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License, version 2, as
|
||||
* published by the Free Software Foundation (the "GPL").
|
||||
*
|
||||
* 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 version 2 (GPLv2) for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* version 2 (GPLv2) along with this source code.
|
||||
*/
|
||||
/*
|
||||
* $Id: linux-user-bde.h,v 1.23 Broadcom SDK $
|
||||
|
@ -1,18 +1,17 @@
|
||||
/*
|
||||
* Unless you and Broadcom execute a separate written software license
|
||||
* agreement governing use of this software, this software is licensed to
|
||||
* you under the terms of the GNU General Public License version 2 (the
|
||||
* "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
|
||||
* with the following added to such license:
|
||||
* Copyright 2017 Broadcom
|
||||
*
|
||||
* As a special exception, the copyright holders of this software give
|
||||
* you permission to link this software with independent modules, and to
|
||||
* copy and distribute the resulting executable under terms of your
|
||||
* choice, provided that you also meet, for each linked independent
|
||||
* module, the terms and conditions of the license of that module. An
|
||||
* independent module is a module which is not derived from this
|
||||
* software. The special exception does not apply to any modifications
|
||||
* of the software.
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License, version 2, as
|
||||
* published by the Free Software Foundation (the "GPL").
|
||||
*
|
||||
* 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 version 2 (GPLv2) for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* version 2 (GPLv2) along with this source code.
|
||||
*/
|
||||
/*
|
||||
* $Id: $
|
||||
|
@ -1,18 +1,17 @@
|
||||
/*
|
||||
* Unless you and Broadcom execute a separate written software license
|
||||
* agreement governing use of this software, this software is licensed to
|
||||
* you under the terms of the GNU General Public License version 2 (the
|
||||
* "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
|
||||
* with the following added to such license:
|
||||
* Copyright 2017 Broadcom
|
||||
*
|
||||
* As a special exception, the copyright holders of this software give
|
||||
* you permission to link this software with independent modules, and to
|
||||
* copy and distribute the resulting executable under terms of your
|
||||
* choice, provided that you also meet, for each linked independent
|
||||
* module, the terms and conditions of the license of that module. An
|
||||
* independent module is a module which is not derived from this
|
||||
* software. The special exception does not apply to any modifications
|
||||
* of the software.
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License, version 2, as
|
||||
* published by the Free Software Foundation (the "GPL").
|
||||
*
|
||||
* 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 version 2 (GPLv2) for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* version 2 (GPLv2) along with this source code.
|
||||
*/
|
||||
/*
|
||||
* $Id: $
|
||||
|
@ -1,18 +1,17 @@
|
||||
/*
|
||||
* Unless you and Broadcom execute a separate written software license
|
||||
* agreement governing use of this software, this software is licensed to
|
||||
* you under the terms of the GNU General Public License version 2 (the
|
||||
* "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
|
||||
* with the following added to such license:
|
||||
* Copyright 2017 Broadcom
|
||||
*
|
||||
* As a special exception, the copyright holders of this software give
|
||||
* you permission to link this software with independent modules, and to
|
||||
* copy and distribute the resulting executable under terms of your
|
||||
* choice, provided that you also meet, for each linked independent
|
||||
* module, the terms and conditions of the license of that module. An
|
||||
* independent module is a module which is not derived from this
|
||||
* software. The special exception does not apply to any modifications
|
||||
* of the software.
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License, version 2, as
|
||||
* published by the Free Software Foundation (the "GPL").
|
||||
*
|
||||
* 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 version 2 (GPLv2) for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* version 2 (GPLv2) along with this source code.
|
||||
*/
|
||||
/*
|
||||
* $Id: $
|
||||
|
@ -1,18 +1,17 @@
|
||||
/*
|
||||
* Unless you and Broadcom execute a separate written software license
|
||||
* agreement governing use of this software, this software is licensed to
|
||||
* you under the terms of the GNU General Public License version 2 (the
|
||||
* "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
|
||||
* with the following added to such license:
|
||||
* Copyright 2017 Broadcom
|
||||
*
|
||||
* As a special exception, the copyright holders of this software give
|
||||
* you permission to link this software with independent modules, and to
|
||||
* copy and distribute the resulting executable under terms of your
|
||||
* choice, provided that you also meet, for each linked independent
|
||||
* module, the terms and conditions of the license of that module. An
|
||||
* independent module is a module which is not derived from this
|
||||
* software. The special exception does not apply to any modifications
|
||||
* of the software.
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License, version 2, as
|
||||
* published by the Free Software Foundation (the "GPL").
|
||||
*
|
||||
* 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 version 2 (GPLv2) for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* version 2 (GPLv2) along with this source code.
|
||||
*/
|
||||
/*
|
||||
* $Id: $
|
||||
|
@ -1,18 +1,17 @@
|
||||
/*
|
||||
* Unless you and Broadcom execute a separate written software license
|
||||
* agreement governing use of this software, this software is licensed to
|
||||
* you under the terms of the GNU General Public License version 2 (the
|
||||
* "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
|
||||
* with the following added to such license:
|
||||
* Copyright 2017 Broadcom
|
||||
*
|
||||
* As a special exception, the copyright holders of this software give
|
||||
* you permission to link this software with independent modules, and to
|
||||
* copy and distribute the resulting executable under terms of your
|
||||
* choice, provided that you also meet, for each linked independent
|
||||
* module, the terms and conditions of the license of that module. An
|
||||
* independent module is a module which is not derived from this
|
||||
* software. The special exception does not apply to any modifications
|
||||
* of the software.
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License, version 2, as
|
||||
* published by the Free Software Foundation (the "GPL").
|
||||
*
|
||||
* 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 version 2 (GPLv2) for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* version 2 (GPLv2) along with this source code.
|
||||
*/
|
||||
/*
|
||||
* $Id: $
|
||||
@ -145,12 +144,14 @@ shbde_iproc_config_init(shbde_iproc_config_t *icfg,
|
||||
icfg->dma_hi_bits = 0x2;
|
||||
break;
|
||||
case 0xb560: /* Apache */
|
||||
case 0xb670: /* MO */
|
||||
case 0xb760: /* Maverick */
|
||||
icfg->iproc_ver = 0xB;
|
||||
break;
|
||||
case 0xb160: /* Hurricane3 */
|
||||
case 0x8440: /* Wolfhound2 */
|
||||
case 0x8440: /* Buckhound2 */
|
||||
case 0x8430: /* Foxhound2 */
|
||||
case 0x8540: /* Wolfhound2 */
|
||||
icfg->iproc_ver = 10;
|
||||
icfg->dma_hi_bits = 0x2;
|
||||
break;
|
||||
@ -272,17 +273,17 @@ shbde_iproc_paxb_init(shbde_hal_t *shbde, void *iproc_regs,
|
||||
reg = ROFFS(iproc_regs, BAR0_PAXB_PCIE_EP_AXI_CONFIG);
|
||||
iproc32_write(shbde, reg, 0x0);
|
||||
if(icfg->cmic_ver < 4) { /* Non-CMICX */
|
||||
reg = ROFFS(iproc_regs, BAR0_PAXB_OARR_2);
|
||||
iproc32_write(shbde, reg, 0x1);
|
||||
reg = ROFFS(iproc_regs, BAR0_PAXB_OARR_2_UPPER);
|
||||
iproc32_write(shbde, reg, icfg->dma_hi_bits);
|
||||
reg = ROFFS(iproc_regs, BAR0_PAXB_OARR_2);
|
||||
iproc32_write(shbde, reg, 0x1);
|
||||
reg = ROFFS(iproc_regs, BAR0_PAXB_OARR_2_UPPER);
|
||||
iproc32_write(shbde, reg, icfg->dma_hi_bits);
|
||||
|
||||
/* Configure MSI interrupt page */
|
||||
if (icfg->use_msi) {
|
||||
reg = ROFFS(iproc_regs, BAR0_PAXB_OARR_FUNC0_MSI_PAGE);
|
||||
data = iproc32_read(shbde, reg);
|
||||
iproc32_write(shbde, reg, data | 0x1);
|
||||
}
|
||||
/* Configure MSI interrupt page */
|
||||
if (icfg->use_msi) {
|
||||
reg = ROFFS(iproc_regs, BAR0_PAXB_OARR_FUNC0_MSI_PAGE);
|
||||
data = iproc32_read(shbde, reg);
|
||||
iproc32_write(shbde, reg, data | 0x1);
|
||||
}
|
||||
}
|
||||
return pci_num;
|
||||
}
|
||||
@ -318,15 +319,15 @@ shbde_iproc_pci_read(shbde_hal_t *shbde, void *iproc_regs,
|
||||
/* Route the INTC block access through IMAP0_6 */
|
||||
reg = ROFFS(iproc_regs, 0x6000 + (addr & 0xfff));
|
||||
} else {
|
||||
/* Update base address for sub-window 7 */
|
||||
/* Update base address for sub-window 7 */
|
||||
subwin_base |= 1; /* Valid bit */
|
||||
reg = ROFFS(iproc_regs, BAR0_PAXB_IMAP0_7);
|
||||
iproc32_write(shbde, reg, subwin_base);
|
||||
reg = ROFFS(iproc_regs, BAR0_PAXB_IMAP0_7);
|
||||
iproc32_write(shbde, reg, subwin_base);
|
||||
/* Read it to make sure the write actually goes through */
|
||||
subwin_base = iproc32_read(shbde, reg);
|
||||
|
||||
/* Read register through sub-window 7 */
|
||||
reg = ROFFS(iproc_regs, 0x7000 + (addr & 0xfff));
|
||||
/* Read register through sub-window 7 */
|
||||
reg = ROFFS(iproc_regs, 0x7000 + (addr & 0xfff));
|
||||
}
|
||||
|
||||
return iproc32_read(shbde, reg);
|
||||
@ -364,15 +365,15 @@ shbde_iproc_pci_write(shbde_hal_t *shbde, void *iproc_regs,
|
||||
/* Route the INTC block access through IMAP0_6 */
|
||||
reg = ROFFS(iproc_regs, 0x6000 + (addr & 0xfff));
|
||||
} else {
|
||||
/* Update base address for sub-window 7 */
|
||||
/* Update base address for sub-window 7 */
|
||||
subwin_base |= 1; /* Valid bit */
|
||||
reg = ROFFS(iproc_regs, BAR0_PAXB_IMAP0_7);
|
||||
iproc32_write(shbde, reg, subwin_base);
|
||||
reg = ROFFS(iproc_regs, BAR0_PAXB_IMAP0_7);
|
||||
iproc32_write(shbde, reg, subwin_base);
|
||||
/* Read it to make sure the write actually goes through */
|
||||
subwin_base = iproc32_read(shbde, reg);
|
||||
|
||||
/* Read register through sub-window 7 */
|
||||
reg = ROFFS(iproc_regs, 0x7000 + (addr & 0xfff));
|
||||
reg = ROFFS(iproc_regs, 0x7000 + (addr & 0xfff));
|
||||
}
|
||||
|
||||
iproc32_write(shbde, reg, data);
|
||||
|
@ -1,18 +1,17 @@
|
||||
/*
|
||||
* Unless you and Broadcom execute a separate written software license
|
||||
* agreement governing use of this software, this software is licensed to
|
||||
* you under the terms of the GNU General Public License version 2 (the
|
||||
* "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
|
||||
* with the following added to such license:
|
||||
* Copyright 2017 Broadcom
|
||||
*
|
||||
* As a special exception, the copyright holders of this software give
|
||||
* you permission to link this software with independent modules, and to
|
||||
* copy and distribute the resulting executable under terms of your
|
||||
* choice, provided that you also meet, for each linked independent
|
||||
* module, the terms and conditions of the license of that module. An
|
||||
* independent module is a module which is not derived from this
|
||||
* software. The special exception does not apply to any modifications
|
||||
* of the software.
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License, version 2, as
|
||||
* published by the Free Software Foundation (the "GPL").
|
||||
*
|
||||
* 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 version 2 (GPLv2) for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* version 2 (GPLv2) along with this source code.
|
||||
*/
|
||||
/*
|
||||
* $Id: $
|
||||
|
@ -1,18 +1,17 @@
|
||||
/*
|
||||
* Unless you and Broadcom execute a separate written software license
|
||||
* agreement governing use of this software, this software is licensed to
|
||||
* you under the terms of the GNU General Public License version 2 (the
|
||||
* "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
|
||||
* with the following added to such license:
|
||||
* Copyright 2017 Broadcom
|
||||
*
|
||||
* As a special exception, the copyright holders of this software give
|
||||
* you permission to link this software with independent modules, and to
|
||||
* copy and distribute the resulting executable under terms of your
|
||||
* choice, provided that you also meet, for each linked independent
|
||||
* module, the terms and conditions of the license of that module. An
|
||||
* independent module is a module which is not derived from this
|
||||
* software. The special exception does not apply to any modifications
|
||||
* of the software.
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License, version 2, as
|
||||
* published by the Free Software Foundation (the "GPL").
|
||||
*
|
||||
* 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 version 2 (GPLv2) for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* version 2 (GPLv2) along with this source code.
|
||||
*/
|
||||
/*
|
||||
* $Id: $
|
||||
|
@ -1,18 +1,17 @@
|
||||
#
|
||||
# Unless you and Broadcom execute a separate written software license
|
||||
# agreement governing use of this software, this software is licensed to
|
||||
# you under the terms of the GNU General Public License version 2 (the
|
||||
# "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
|
||||
# with the following added to such license:
|
||||
# Copyright 2017 Broadcom
|
||||
#
|
||||
# As a special exception, the copyright holders of this software give
|
||||
# you permission to link this software with independent modules, and to
|
||||
# copy and distribute the resulting executable under terms of your
|
||||
# choice, provided that you also meet, for each linked independent
|
||||
# module, the terms and conditions of the license of that module. An
|
||||
# independent module is a module which is not derived from this
|
||||
# software. The special exception does not apply to any modifications
|
||||
# of the software.
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License, version 2, as
|
||||
# published by the Free Software Foundation (the "GPL").
|
||||
#
|
||||
# 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 version 2 (GPLv2) for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# version 2 (GPLv2) along with this source code.
|
||||
#
|
||||
# -*- Makefile -*-
|
||||
# $Id: Makefile,v 1.10 Broadcom SDK $
|
||||
|
@ -1,18 +1,17 @@
|
||||
#
|
||||
# Unless you and Broadcom execute a separate written software license
|
||||
# agreement governing use of this software, this software is licensed to
|
||||
# you under the terms of the GNU General Public License version 2 (the
|
||||
# "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
|
||||
# with the following added to such license:
|
||||
# Copyright 2017 Broadcom
|
||||
#
|
||||
# As a special exception, the copyright holders of this software give
|
||||
# you permission to link this software with independent modules, and to
|
||||
# copy and distribute the resulting executable under terms of your
|
||||
# choice, provided that you also meet, for each linked independent
|
||||
# module, the terms and conditions of the license of that module. An
|
||||
# independent module is a module which is not derived from this
|
||||
# software. The special exception does not apply to any modifications
|
||||
# of the software.
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License, version 2, as
|
||||
# published by the Free Software Foundation (the "GPL").
|
||||
#
|
||||
# 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 version 2 (GPLv2) for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# version 2 (GPLv2) along with this source code.
|
||||
#
|
||||
# -*- Makefile -*-
|
||||
# $Id: Makefile,v 1.3 Broadcom SDK $
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,18 +1,17 @@
|
||||
/*
|
||||
* Unless you and Broadcom execute a separate written software license
|
||||
* agreement governing use of this software, this software is licensed to
|
||||
* you under the terms of the GNU General Public License version 2 (the
|
||||
* "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
|
||||
* with the following added to such license:
|
||||
* Copyright 2017 Broadcom
|
||||
*
|
||||
* As a special exception, the copyright holders of this software give
|
||||
* you permission to link this software with independent modules, and to
|
||||
* copy and distribute the resulting executable under terms of your
|
||||
* choice, provided that you also meet, for each linked independent
|
||||
* module, the terms and conditions of the license of that module. An
|
||||
* independent module is a module which is not derived from this
|
||||
* software. The special exception does not apply to any modifications
|
||||
* of the software.
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License, version 2, as
|
||||
* published by the Free Software Foundation (the "GPL").
|
||||
*
|
||||
* 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 version 2 (GPLv2) for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* version 2 (GPLv2) along with this source code.
|
||||
*/
|
||||
/*
|
||||
* $Id: bcm-knet.h,v 1.4 Broadcom SDK $
|
||||
|
@ -1,18 +1,17 @@
|
||||
/*
|
||||
* Unless you and Broadcom execute a separate written software license
|
||||
* agreement governing use of this software, this software is licensed to
|
||||
* you under the terms of the GNU General Public License version 2 (the
|
||||
* "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
|
||||
* with the following added to such license:
|
||||
* Copyright 2017 Broadcom
|
||||
*
|
||||
* As a special exception, the copyright holders of this software give
|
||||
* you permission to link this software with independent modules, and to
|
||||
* copy and distribute the resulting executable under terms of your
|
||||
* choice, provided that you also meet, for each linked independent
|
||||
* module, the terms and conditions of the license of that module. An
|
||||
* independent module is a module which is not derived from this
|
||||
* software. The special exception does not apply to any modifications
|
||||
* of the software.
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License, version 2, as
|
||||
* published by the Free Software Foundation (the "GPL").
|
||||
*
|
||||
* 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 version 2 (GPLv2) for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* version 2 (GPLv2) along with this source code.
|
||||
*/
|
||||
/*
|
||||
* $Id: gmodule.h,v 1.9 Broadcom SDK $
|
||||
|
@ -1,18 +1,17 @@
|
||||
/*
|
||||
* Unless you and Broadcom execute a separate written software license
|
||||
* agreement governing use of this software, this software is licensed to
|
||||
* you under the terms of the GNU General Public License version 2 (the
|
||||
* "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
|
||||
* with the following added to such license:
|
||||
* Copyright 2017 Broadcom
|
||||
*
|
||||
* As a special exception, the copyright holders of this software give
|
||||
* you permission to link this software with independent modules, and to
|
||||
* copy and distribute the resulting executable under terms of your
|
||||
* choice, provided that you also meet, for each linked independent
|
||||
* module, the terms and conditions of the license of that module. An
|
||||
* independent module is a module which is not derived from this
|
||||
* software. The special exception does not apply to any modifications
|
||||
* of the software.
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License, version 2, as
|
||||
* published by the Free Software Foundation (the "GPL").
|
||||
*
|
||||
* 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 version 2 (GPLv2) for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* version 2 (GPLv2) along with this source code.
|
||||
*/
|
||||
/*
|
||||
* $Id: lkm.h,v 1.22 Broadcom SDK $
|
||||
|
@ -1,22 +1,21 @@
|
||||
#
|
||||
# Unless you and Broadcom execute a separate written software license
|
||||
# agreement governing use of this software, this software is licensed to
|
||||
# you under the terms of the GNU General Public License version 2 (the
|
||||
# "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
|
||||
# with the following added to such license:
|
||||
# Copyright 2017 Broadcom
|
||||
#
|
||||
# As a special exception, the copyright holders of this software give
|
||||
# you permission to link this software with independent modules, and to
|
||||
# copy and distribute the resulting executable under terms of your
|
||||
# choice, provided that you also meet, for each linked independent
|
||||
# module, the terms and conditions of the license of that module. An
|
||||
# independent module is a module which is not derived from this
|
||||
# software. The special exception does not apply to any modifications
|
||||
# of the software.
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License, version 2, as
|
||||
# published by the Free Software Foundation (the "GPL").
|
||||
#
|
||||
# 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 version 2 (GPLv2) for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# version 2 (GPLv2) along with this source code.
|
||||
#
|
||||
# -*- Makefile -*-
|
||||
# $Id:
|
||||
# $Copyright: (c) 2017 Broadcom Corp.
|
||||
# $Id: Makefile,v 1.3 Broadcom SDK $
|
||||
# $Copyright: (c) 2005 Broadcom Corp.
|
||||
# All Rights Reserved.$
|
||||
#
|
||||
LOCALDIR = systems/linux/kernel/modules/knet-cb
|
||||
|
@ -1,50 +1,38 @@
|
||||
/*
|
||||
* Unless you and Broadcom execute a separate written software license
|
||||
* agreement governing use of this software, this software is licensed to
|
||||
* you under the terms of the GNU General Public License version 2 (the
|
||||
* "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
|
||||
* with the following added to such license:
|
||||
* Copyright 2017 Broadcom
|
||||
*
|
||||
* As a special exception, the copyright holders of this software give
|
||||
* you permission to link this software with independent modules, and to
|
||||
* copy and distribute the resulting executable under terms of your
|
||||
* choice, provided that you also meet, for each linked independent
|
||||
* module, the terms and conditions of the license of that module. An
|
||||
* independent module is a module which is not derived from this
|
||||
* software. The special exception does not apply to any modifications
|
||||
* of the software.
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License, version 2, as
|
||||
* published by the Free Software Foundation (the "GPL").
|
||||
*
|
||||
* 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 version 2 (GPLv2) for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* version 2 (GPLv2) along with this source code.
|
||||
*/
|
||||
/*
|
||||
* $Id:
|
||||
* $Copyright: (c) 2017 Broadcom Corp.
|
||||
* $Id: $
|
||||
* $Copyright: (c) 2014 Broadcom Corp.
|
||||
* All Rights Reserved.$
|
||||
*/
|
||||
|
||||
/*
|
||||
* Driver for call-back functions for Linux KNET driver.
|
||||
*
|
||||
* This is sample code that demonstrates how to selectively strip VLAN tags
|
||||
* from an incoming packet based on tag information in the DMA control block
|
||||
* (DCB). The switch will automatically add a VLAN tag to packets that ingress
|
||||
* without an outer VLAN tag. Outer tagged and double tagged packets are
|
||||
* not modified. The call back defined here determines which packets have
|
||||
* had tags added by those and strips only those tags from the packet.
|
||||
*
|
||||
* This is sample code, the customer is responsible for maintaining and
|
||||
* modifying this code as necessary.
|
||||
* Test driver for call-back functions in Linux KNET driver.
|
||||
*
|
||||
* The module can be built from the standard Linux user mode target
|
||||
* directories using the following command (assuming bash), e.g.
|
||||
*
|
||||
* cd $SDK/systems/linux/user/<target>
|
||||
* make BUILD_KNET_CB=1
|
||||
* cd $SDK/systems/linux/user/gto-2_6
|
||||
* BUILD_KNET_CB=1 make -s mod
|
||||
*
|
||||
*/
|
||||
|
||||
#include <gmodule.h> /* Must be included first */
|
||||
#include <kcom.h>
|
||||
#include <bcm-knet.h>
|
||||
#include <linux/if_vlan.h>
|
||||
|
||||
MODULE_AUTHOR("Broadcom Corporation");
|
||||
MODULE_DESCRIPTION("Broadcom Linux KNET Call-Back Driver");
|
||||
@ -54,185 +42,60 @@ MODULE_LICENSE("GPL");
|
||||
#define MODULE_MAJOR 121
|
||||
#define MODULE_NAME "linux-knet-cb"
|
||||
|
||||
/* set KNET_CB_DEBUG for debug info */
|
||||
#define KNET_CB_DEBUG
|
||||
|
||||
/* Maintain tag strip statistics */
|
||||
struct strip_stats_s {
|
||||
unsigned long stripped; /* Number of packets that have been stripped */
|
||||
unsigned long checked;
|
||||
unsigned long skipped;
|
||||
};
|
||||
|
||||
static struct strip_stats_s strip_stats;
|
||||
|
||||
/* Local function prototypes */
|
||||
static void strip_vlan_tag(struct sk_buff *skb);
|
||||
static int get_tag_status(int dcb_type, void *meta);
|
||||
static struct sk_buff *strip_tag_rx_cb(struct sk_buff *skb, int dev_no, void *meta);
|
||||
static struct sk_buff *strip_tag_tx_cb(struct sk_buff *skb, int dev_no, void *meta);
|
||||
static int strip_tag_filter_cb(uint8_t * pkt, int size, int dev_no, void *meta,
|
||||
int chan, kcom_filter_t * kf);
|
||||
static int _pprint(void);
|
||||
static int _cleanup(void);
|
||||
static int _init(void);
|
||||
|
||||
/* Remove VLAN tag for select TPIDs */
|
||||
static void
|
||||
strip_vlan_tag(struct sk_buff *skb)
|
||||
show_mac(struct sk_buff *skb)
|
||||
{
|
||||
uint16_t vlan_proto = (uint16_t) ((skb->data[12] << 8) | skb->data[13]);
|
||||
if ((vlan_proto == 0x8100) || (vlan_proto == 0x88a8) || (vlan_proto == 0x9100)) {
|
||||
/* Move first 12 bytes of packet back by 4 */
|
||||
((u32 *) skb->data)[3] = ((u32 *) skb->data)[2];
|
||||
((u32 *) skb->data)[2] = ((u32 *) skb->data)[1];
|
||||
((u32 *) skb->data)[1] = ((u32 *) skb->data)[0];
|
||||
skb_pull(skb, 4); /* Remove 4 bytes from start of buffer */
|
||||
}
|
||||
printk("DMAC=%02X:%02X:%02X:%02X:%02X:%02X\n",
|
||||
skb->data[0], skb->data[1], skb->data[2],
|
||||
skb->data[3], skb->data[4], skb->data[5]);
|
||||
}
|
||||
|
||||
/*
|
||||
* Location of tagging status in select DCB types found below:
|
||||
*
|
||||
* DCB type 14: word 12, bits 10.11
|
||||
* DCB type 19, 20, 21, 22, 30: word 12, bits 10..11
|
||||
* DCB type 23, 29: word 13, bits 0..1
|
||||
* DCB type 31, 34, 37: word 13, bits 0..1
|
||||
* DCB type 26, 32, 33, 35: word 13, bits 0..1
|
||||
*
|
||||
* The function get_tag_status() returns the tag status for known DCB types.
|
||||
* 0 = Untagged
|
||||
* 1 = Single inner-tag
|
||||
* 2 = Single outer-tag
|
||||
* 3 = Double tagged.
|
||||
* -1 = Unsupported DCB type
|
||||
*/
|
||||
static int
|
||||
get_tag_status(int dcb_type, void *meta)
|
||||
{
|
||||
uint32 *dcb = (uint32 *) meta;
|
||||
int tag_status;
|
||||
switch (dcb_type) {
|
||||
case 14:
|
||||
case 19:
|
||||
case 20:
|
||||
case 21:
|
||||
case 22:
|
||||
case 30:
|
||||
tag_status = (dcb[12] > 10) & 0x3;
|
||||
break;
|
||||
case 23:
|
||||
case 29:
|
||||
case 31:
|
||||
case 34:
|
||||
case 37:
|
||||
case 26:
|
||||
case 32:
|
||||
case 33:
|
||||
case 35:
|
||||
tag_status = dcb[13] & 0x3;
|
||||
break;
|
||||
default:
|
||||
tag_status = -1;
|
||||
break;
|
||||
}
|
||||
return tag_status;
|
||||
}
|
||||
|
||||
/*
|
||||
* SDK-134189 added the ability to pass two 4 byte unsigned values to the
|
||||
* KNET callback function, one from the matching filter and one from the
|
||||
* network interface. The usage of this data is completely defined by the
|
||||
* user. In this case, if bit 0 of the interface value is set, tag stripping
|
||||
* is enabled for that interface. When creating the interface and filter,
|
||||
* something like the following is necessary: "netif.cb_user_data = uflags".
|
||||
*/
|
||||
#define NETIF_UNTAGGED_STRIP (1 << 0)
|
||||
|
||||
/* Rx packet callback function */
|
||||
static struct sk_buff *
|
||||
strip_tag_rx_cb(struct sk_buff *skb, int dev_no, void *meta)
|
||||
test_rx_cb(struct sk_buff *skb, int dev_no, void *meta)
|
||||
{
|
||||
unsigned netif_flags = KNET_SKB_CB(skb)->netif_user_data;
|
||||
unsigned dcb_type;
|
||||
int tag_status;
|
||||
/* Currently not using filter flags:
|
||||
* unsigned filter_flags = KNET_SKB_CB(skb)->filter_user_data;
|
||||
*/
|
||||
|
||||
#ifdef KNET_CB_DEBUG
|
||||
gprintk("%s Enter; Flags: %08X\n", __func__, netif_flags);
|
||||
#endif
|
||||
|
||||
if ((netif_flags & NETIF_UNTAGGED_STRIP) == 0) {
|
||||
/* Untagged stripping not enabled on this netif */
|
||||
strip_stats.skipped++;
|
||||
return skb;
|
||||
printk("rx_cb for dev %d\n", dev_no);
|
||||
printk("netif user data 0x%x\n", KNET_SKB_CB(skb)->netif_user_data);
|
||||
printk("filter user data 0x%x\n", KNET_SKB_CB(skb)->filter_user_data);
|
||||
printk("dcb type 0x%x\n", KNET_SKB_CB(skb)->dcb_type);
|
||||
if (skb->data[5] == 0x03) {
|
||||
dev_kfree_skb(skb);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Get DCB type for this packet, passed by KNET driver */
|
||||
dcb_type = KNET_SKB_CB(skb)->dcb_type;
|
||||
|
||||
/* Get tag status from DCB */
|
||||
tag_status = get_tag_status(dcb_type, meta);
|
||||
|
||||
#ifdef KNET_CB_DEBUG
|
||||
gprintk("%s; DCB Type: %d; tag status: %d\n", __func__, dcb_type, tag_status);
|
||||
#endif
|
||||
|
||||
if (tag_status < 0) {
|
||||
/* Unsupported DCB type */
|
||||
return skb;
|
||||
}
|
||||
|
||||
strip_stats.checked++;
|
||||
/*
|
||||
* Untagged and inner tagged packet will get a new tag from the switch
|
||||
* device, we need to strip this off.
|
||||
*/
|
||||
if (tag_status < 2) {
|
||||
#ifdef KNET_CB_DEBUG
|
||||
gprintk("%s; Stripping VLAN\n", __func__);
|
||||
#endif
|
||||
strip_stats.stripped++;
|
||||
strip_vlan_tag(skb);
|
||||
}
|
||||
#ifdef KNET_CB_DEBUG
|
||||
else {
|
||||
gprintk("%s; Preserve VLAN\n", __func__);
|
||||
}
|
||||
#endif
|
||||
show_mac(skb);
|
||||
return skb;
|
||||
}
|
||||
|
||||
/* Tx callback not used */
|
||||
static struct sk_buff *
|
||||
strip_tag_tx_cb(struct sk_buff *skb, int dev_no, void *meta)
|
||||
test_tx_cb(struct sk_buff *skb, int dev_no, void *meta)
|
||||
{
|
||||
/* Pass through for now */
|
||||
printk("tx_cb for dev %d\n", dev_no);
|
||||
show_mac(skb);
|
||||
skb->data[5] += 1;
|
||||
return skb;
|
||||
}
|
||||
|
||||
/* Filter callback not used */
|
||||
static int
|
||||
strip_tag_filter_cb(uint8_t * pkt, int size, int dev_no, void *meta,
|
||||
test_filter_cb(uint8_t *pkt, int size, int dev_no, void *meta,
|
||||
int chan, kcom_filter_t *kf)
|
||||
{
|
||||
/* Pass through for now */
|
||||
printk("filter_cb (%d) for dev %d\n", kf->dest_id, dev_no);
|
||||
if (pkt[12] == 0x81 && pkt[13] == 0x00) {
|
||||
printk(" VTAG %d\n", pkt[15]);
|
||||
kf->dest_type = KCOM_DEST_T_NETIF;
|
||||
kf->dest_id = pkt[15];
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Get statistics.
|
||||
* % cat /proc/linux-knet-cb
|
||||
* Generic module functions
|
||||
*/
|
||||
|
||||
static int
|
||||
_pprint(void)
|
||||
{
|
||||
pprintf("Broadcom Linux KNET Call-Back: Untagged VLAN Stripper\n");
|
||||
pprintf(" %lu stripped packets\n", strip_stats.stripped);
|
||||
pprintf(" %lu packets checked\n", strip_stats.checked);
|
||||
pprintf(" %lu packets skipped\n", strip_stats.skipped);
|
||||
pprintf("Broadcom Linux KNET Call-Back Driver\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -240,9 +103,9 @@ _pprint(void)
|
||||
static int
|
||||
_cleanup(void)
|
||||
{
|
||||
bkn_rx_skb_cb_unregister(strip_tag_rx_cb);
|
||||
bkn_tx_skb_cb_unregister(strip_tag_tx_cb);
|
||||
bkn_filter_cb_unregister(strip_tag_filter_cb);
|
||||
bkn_rx_skb_cb_unregister(test_rx_cb);
|
||||
bkn_tx_skb_cb_unregister(test_tx_cb);
|
||||
bkn_filter_cb_unregister(test_filter_cb);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -250,9 +113,9 @@ _cleanup(void)
|
||||
static int
|
||||
_init(void)
|
||||
{
|
||||
bkn_rx_skb_cb_register(strip_tag_rx_cb);
|
||||
bkn_tx_skb_cb_register(strip_tag_tx_cb);
|
||||
bkn_filter_cb_register(strip_tag_filter_cb);
|
||||
bkn_rx_skb_cb_register(test_rx_cb);
|
||||
bkn_tx_skb_cb_register(test_tx_cb);
|
||||
bkn_filter_cb_register(test_filter_cb);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -1,18 +1,17 @@
|
||||
#
|
||||
# Unless you and Broadcom execute a separate written software license
|
||||
# agreement governing use of this software, this software is licensed to
|
||||
# you under the terms of the GNU General Public License version 2 (the
|
||||
# "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
|
||||
# with the following added to such license:
|
||||
# Copyright 2017 Broadcom
|
||||
#
|
||||
# As a special exception, the copyright holders of this software give
|
||||
# you permission to link this software with independent modules, and to
|
||||
# copy and distribute the resulting executable under terms of your
|
||||
# choice, provided that you also meet, for each linked independent
|
||||
# module, the terms and conditions of the license of that module. An
|
||||
# independent module is a module which is not derived from this
|
||||
# software. The special exception does not apply to any modifications
|
||||
# of the software.
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License, version 2, as
|
||||
# published by the Free Software Foundation (the "GPL").
|
||||
#
|
||||
# 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 version 2 (GPLv2) for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# version 2 (GPLv2) along with this source code.
|
||||
#
|
||||
# -*- Makefile -*-
|
||||
# $Id: Makefile,v 1.2 Broadcom SDK $
|
||||
|
@ -1,18 +1,17 @@
|
||||
/*
|
||||
* Unless you and Broadcom execute a separate written software license
|
||||
* agreement governing use of this software, this software is licensed to
|
||||
* you under the terms of the GNU General Public License version 2 (the
|
||||
* "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
|
||||
* with the following added to such license:
|
||||
* Copyright 2017 Broadcom
|
||||
*
|
||||
* As a special exception, the copyright holders of this software give
|
||||
* you permission to link this software with independent modules, and to
|
||||
* copy and distribute the resulting executable under terms of your
|
||||
* choice, provided that you also meet, for each linked independent
|
||||
* module, the terms and conditions of the license of that module. An
|
||||
* independent module is a module which is not derived from this
|
||||
* software. The special exception does not apply to any modifications
|
||||
* of the software.
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License, version 2, as
|
||||
* published by the Free Software Foundation (the "GPL").
|
||||
*
|
||||
* 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 version 2 (GPLv2) for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* version 2 (GPLv2) along with this source code.
|
||||
*/
|
||||
/*
|
||||
* $Id: gmodule.c,v 1.20 Broadcom SDK $
|
||||
|
@ -1,18 +1,17 @@
|
||||
/*
|
||||
* Unless you and Broadcom execute a separate written software license
|
||||
* agreement governing use of this software, this software is licensed to
|
||||
* you under the terms of the GNU General Public License version 2 (the
|
||||
* "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
|
||||
* with the following added to such license:
|
||||
* Copyright 2017 Broadcom
|
||||
*
|
||||
* As a special exception, the copyright holders of this software give
|
||||
* you permission to link this software with independent modules, and to
|
||||
* copy and distribute the resulting executable under terms of your
|
||||
* choice, provided that you also meet, for each linked independent
|
||||
* module, the terms and conditions of the license of that module. An
|
||||
* independent module is a module which is not derived from this
|
||||
* software. The special exception does not apply to any modifications
|
||||
* of the software.
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License, version 2, as
|
||||
* published by the Free Software Foundation (the "GPL").
|
||||
*
|
||||
* 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 version 2 (GPLv2) for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* version 2 (GPLv2) along with this source code.
|
||||
*/
|
||||
/*
|
||||
* $Id: ksal.c,v 1.1 Broadcom SDK $
|
||||
|
@ -0,0 +1,63 @@
|
||||
#
|
||||
# Copyright 2017 Broadcom
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License, version 2, as
|
||||
# published by the Free Software Foundation (the "GPL").
|
||||
#
|
||||
# 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 version 2 (GPLv2) for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# version 2 (GPLv2) along with this source code.
|
||||
#
|
||||
# -*- Makefile -*-
|
||||
# $Id: Makefile,v 1.4 Broadcom SDK $
|
||||
# $Copyright: (c) 2005 Broadcom Corp.
|
||||
# All Rights Reserved.$
|
||||
|
||||
#
|
||||
# This make job requires the following environment variables to be set:
|
||||
#
|
||||
# SDK - path to StrataXGS SDK root directory
|
||||
#
|
||||
# Optionally the following environment variables can be set to
|
||||
# override the default build server configuration:
|
||||
#
|
||||
# PPC_TOOLS_DIR - path to build tools (if not in PATH already)
|
||||
# PPC_CROSS_COMPILE - cross compile tools prefix
|
||||
# LINUX_INCLUDE - path to Linux kernel include directory
|
||||
#
|
||||
|
||||
SDK :=$(shell if [ -n "$$SDK" ] ; then\
|
||||
echo $$SDK;\
|
||||
else\
|
||||
cd $(dir $(lastword $(MAKEFILE_LIST))); while /usr/bin/test ! -e RELEASE ; do \
|
||||
dir=`cd ../;pwd`; \
|
||||
if [ "$$dir" = "/" ] ; then \
|
||||
echo Cannot find SDK in $(lastword $(MAKEFILE_LIST)) 1>&2; \
|
||||
exit 1; \
|
||||
fi ; \
|
||||
cd $$dir; \
|
||||
done ; \
|
||||
pwd; \
|
||||
fi)
|
||||
|
||||
ifeq ($(SDK),)
|
||||
$(error Please run this in a tree)
|
||||
endif
|
||||
|
||||
export SDK
|
||||
|
||||
override kernel_version=2_6
|
||||
platform=bmw-$(kernel_version)
|
||||
|
||||
# Windriver linux version
|
||||
#WRS_LINUX_VERSION=1.4
|
||||
#WRS_LINUX_VERSION=2.0
|
||||
|
||||
LINUX_MAKE_USER=1
|
||||
include ${SDK}/make/Make.linux
|
||||
|
@ -1,18 +1,17 @@
|
||||
#
|
||||
# Unless you and Broadcom execute a separate written software license
|
||||
# agreement governing use of this software, this software is licensed to
|
||||
# you under the terms of the GNU General Public License version 2 (the
|
||||
# "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
|
||||
# with the following added to such license:
|
||||
# Copyright 2017 Broadcom
|
||||
#
|
||||
# As a special exception, the copyright holders of this software give
|
||||
# you permission to link this software with independent modules, and to
|
||||
# copy and distribute the resulting executable under terms of your
|
||||
# choice, provided that you also meet, for each linked independent
|
||||
# module, the terms and conditions of the license of that module. An
|
||||
# independent module is a module which is not derived from this
|
||||
# software. The special exception does not apply to any modifications
|
||||
# of the software.
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License, version 2, as
|
||||
# published by the Free Software Foundation (the "GPL").
|
||||
#
|
||||
# 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 version 2 (GPLv2) for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# version 2 (GPLv2) along with this source code.
|
||||
#
|
||||
# -*- Makefile -*-
|
||||
# $Id: Makefile,v 1.4 Broadcom SDK $
|
||||
@ -86,12 +85,12 @@ KERNEL_BDE :=$(DEST_DIR)/$(KERNEL_BDE_LOCAL)
|
||||
USER_BDE_LOCAL :=linux-user-bde.$(KOBJ)
|
||||
USER_BDE=$(DEST_DIR)/$(USER_BDE_LOCAL)
|
||||
|
||||
BCM_KNET_LOCAL :=linux-bcm-knet.$(KOBJ)
|
||||
BCM_KNET=$(DEST_DIR)/$(BCM_KNET_LOCAL)
|
||||
|
||||
KNET_CB_LOCAL := linux-knet-cb.$(KOBJ)
|
||||
KNET_CB := $(DEST_DIR)/$(KNET_CB_LOCAL)
|
||||
|
||||
BCM_KNET_LOCAL :=linux-bcm-knet.$(KOBJ)
|
||||
BCM_KNET=$(DEST_DIR)/$(BCM_KNET_LOCAL)
|
||||
|
||||
ifeq (,$(findstring DELIVER,$(MAKECMDGOALS)))
|
||||
.DEFAULT_GOAL := all
|
||||
all_targets := kernel_modules $(KERNEL_BDE) $(USER_BDE)
|
||||
@ -118,11 +117,7 @@ LOCAL_TARGETS +=$(patsubst %,../$(platform)/%,$(BCM_KNET_LOCAL))
|
||||
all_targets +=$(LOCAL_TARGETS)
|
||||
endif
|
||||
|
||||
ADD_TO_CFLAGS += -I$(SDK)/systems/linux/kernel/modules/include
|
||||
COND_KNET_LIBS = libuser.$(libext)
|
||||
|
||||
ifeq ($(BUILD_KNET_CB),1)
|
||||
# KNET callback module support
|
||||
ifdef BUILD_KNET_CB
|
||||
all_targets += $(KNET_CB)
|
||||
|
||||
ifeq ($(NO_LOCAL_TARGETS),)
|
||||
@ -131,11 +126,10 @@ all_targets +=$(LOCAL_TARGETS)
|
||||
endif
|
||||
endif
|
||||
|
||||
ADD_TO_CFLAGS += -I$(SDK)/systems/linux/kernel/modules/include
|
||||
COND_KNET_LIBS = libuser.$(libext)
|
||||
endif
|
||||
|
||||
#OPENNSL_FIXUP
|
||||
.NOTPARALLEL:
|
||||
|
||||
all: $(BLDDIR)/.tree $(all_targets)
|
||||
|
||||
ifeq ($(NO_LOCAL_TARGETS),)
|
||||
@ -153,23 +147,16 @@ ADD_TO_CFLAGS += -DPROXY_SUPPORT=0
|
||||
|
||||
CFLAGS += $(ADD_TO_CFLAGS)
|
||||
|
||||
# Kernel network support
|
||||
ifdef BUILD_KNET
|
||||
|
||||
knet_subdirs = shared bcm-knet
|
||||
|
||||
ifdef BUILD_KNET_CB
|
||||
knet_subdirs += knet-cb
|
||||
endif
|
||||
|
||||
endif # BUILD_KNET
|
||||
|
||||
kernel_modules:
|
||||
$(MAKE) -C $(SDK)/systems/bde/linux/kernel kernel_version=$(kernel_version)
|
||||
$(MAKE) -C $(SDK)/systems/bde/linux/user/kernel kernel_version=$(kernel_version)
|
||||
ifeq ($(BUILD_KNET),1)
|
||||
$(MAKE) -j1 -C $(SDK)/systems/linux/kernel/modules kernel_version=$(kernel_version) \
|
||||
subdirs="$(knet_subdirs)" override-target=linux-$(platform) CFLAGS="$(CFLAGS)"
|
||||
$(MAKE) -C $(SDK)/systems/linux/kernel/modules kernel_version=$(kernel_version) \
|
||||
subdirs="shared bcm-knet" override-target=linux-$(platform) CFLAGS="$(CFLAGS)"
|
||||
ifdef BUILD_KNET_CB
|
||||
$(MAKE) -C $(SDK)/systems/linux/kernel/modules kernel_version=$(kernel_version) \
|
||||
subdirs="knet-cb" override-target=linux-$(platform) CFLAGS="$(CFLAGS)"
|
||||
endif
|
||||
endif
|
||||
|
||||
$(KERNEL_BDE): $(KERN_BLDROOT)/linux-kernel-bde.$(KOBJ)
|
||||
@ -193,14 +180,14 @@ clean::
|
||||
$(MAKE) -C $(SDK)/systems/bde/linux/kernel $@
|
||||
$(MAKE) -C $(SDK)/systems/bde/linux/user/kernel $@
|
||||
$(MAKE) -C $(SDK)/systems/linux/kernel/modules \
|
||||
subdirs="$(knet_subdirs)" \
|
||||
subdirs="shared bcm-knet knet-cb" \
|
||||
override-target=linux-$(platform) $@
|
||||
$(RM) $(KERNEL_BDE) $(USER_BDE)
|
||||
$(RM) $(BCM_KNET)
|
||||
$(RM) $(KNET_CB)
|
||||
$(RM) $(BCM_KNET) $(KNET_CB)
|
||||
$(RM) $(KERN_BLDROOT)/linux-kernel-bde.$(KOBJ)
|
||||
$(RM) $(KERN_BLDROOT)/linux-user-bde.$(KOBJ)
|
||||
$(RM) $(KERN_BLDROOT)/linux-bcm-knet.$(KOBJ)
|
||||
$(RM) $(KERN_BLDROOT)/linux-knet-cb.$(KOBJ)
|
||||
$(RM) $(LOCAL_TARGETS)
|
||||
|
||||
distclean:: clean
|
||||
|
@ -1,18 +1,17 @@
|
||||
#
|
||||
# Unless you and Broadcom execute a separate written software license
|
||||
# agreement governing use of this software, this software is licensed to
|
||||
# you under the terms of the GNU General Public License version 2 (the
|
||||
# "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
|
||||
# with the following added to such license:
|
||||
# Copyright 2017 Broadcom
|
||||
#
|
||||
# As a special exception, the copyright holders of this software give
|
||||
# you permission to link this software with independent modules, and to
|
||||
# copy and distribute the resulting executable under terms of your
|
||||
# choice, provided that you also meet, for each linked independent
|
||||
# module, the terms and conditions of the license of that module. An
|
||||
# independent module is a module which is not derived from this
|
||||
# software. The special exception does not apply to any modifications
|
||||
# of the software.
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License, version 2, as
|
||||
# published by the Free Software Foundation (the "GPL").
|
||||
#
|
||||
# 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 version 2 (GPLv2) for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# version 2 (GPLv2) along with this source code.
|
||||
#
|
||||
# -*- Makefile -*-
|
||||
# $Id: Makefile,v 1.9 Broadcom SDK $
|
||||
|
@ -1,18 +1,17 @@
|
||||
#
|
||||
# Unless you and Broadcom execute a separate written software license
|
||||
# agreement governing use of this software, this software is licensed to
|
||||
# you under the terms of the GNU General Public License version 2 (the
|
||||
# "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
|
||||
# with the following added to such license:
|
||||
# Copyright 2017 Broadcom
|
||||
#
|
||||
# As a special exception, the copyright holders of this software give
|
||||
# you permission to link this software with independent modules, and to
|
||||
# copy and distribute the resulting executable under terms of your
|
||||
# choice, provided that you also meet, for each linked independent
|
||||
# module, the terms and conditions of the license of that module. An
|
||||
# independent module is a module which is not derived from this
|
||||
# software. The special exception does not apply to any modifications
|
||||
# of the software.
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License, version 2, as
|
||||
# published by the Free Software Foundation (the "GPL").
|
||||
#
|
||||
# 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 version 2 (GPLv2) for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# version 2 (GPLv2) along with this source code.
|
||||
#
|
||||
# -*- Makefile -*-
|
||||
# $Id: Makefile,v 1.9 Broadcom SDK $
|
||||
|
@ -1,18 +1,17 @@
|
||||
#
|
||||
# Unless you and Broadcom execute a separate written software license
|
||||
# agreement governing use of this software, this software is licensed to
|
||||
# you under the terms of the GNU General Public License version 2 (the
|
||||
# "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
|
||||
# with the following added to such license:
|
||||
# Copyright 2017 Broadcom
|
||||
#
|
||||
# As a special exception, the copyright holders of this software give
|
||||
# you permission to link this software with independent modules, and to
|
||||
# copy and distribute the resulting executable under terms of your
|
||||
# choice, provided that you also meet, for each linked independent
|
||||
# module, the terms and conditions of the license of that module. An
|
||||
# independent module is a module which is not derived from this
|
||||
# software. The special exception does not apply to any modifications
|
||||
# of the software.
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License, version 2, as
|
||||
# published by the Free Software Foundation (the "GPL").
|
||||
#
|
||||
# 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 version 2 (GPLv2) for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# version 2 (GPLv2) along with this source code.
|
||||
#
|
||||
# -*- Makefile -*-
|
||||
# $Id: Makefile,v 1.7 Broadcom SDK $
|
||||
|
@ -1,18 +1,17 @@
|
||||
#
|
||||
# Unless you and Broadcom execute a separate written software license
|
||||
# agreement governing use of this software, this software is licensed to
|
||||
# you under the terms of the GNU General Public License version 2 (the
|
||||
# "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
|
||||
# with the following added to such license:
|
||||
# Copyright 2017 Broadcom
|
||||
#
|
||||
# As a special exception, the copyright holders of this software give
|
||||
# you permission to link this software with independent modules, and to
|
||||
# copy and distribute the resulting executable under terms of your
|
||||
# choice, provided that you also meet, for each linked independent
|
||||
# module, the terms and conditions of the license of that module. An
|
||||
# independent module is a module which is not derived from this
|
||||
# software. The special exception does not apply to any modifications
|
||||
# of the software.
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License, version 2, as
|
||||
# published by the Free Software Foundation (the "GPL").
|
||||
#
|
||||
# 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 version 2 (GPLv2) for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# version 2 (GPLv2) along with this source code.
|
||||
#
|
||||
# -*- Makefile -*-
|
||||
# $Id: Makefile,v 1.7 Broadcom SDK $
|
||||
|
@ -0,0 +1,79 @@
|
||||
#
|
||||
# Copyright 2017 Broadcom
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License, version 2, as
|
||||
# published by the Free Software Foundation (the "GPL").
|
||||
#
|
||||
# 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 version 2 (GPLv2) for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# version 2 (GPLv2) along with this source code.
|
||||
#
|
||||
# -*- Makefile -*-
|
||||
# $Id: Makefile,v 1.4 Broadcom SDK $
|
||||
# $Copyright: (c) 2005 Broadcom Corp.
|
||||
# All Rights Reserved.$
|
||||
|
||||
#
|
||||
# This make job requires the following environment variables to be set:
|
||||
#
|
||||
# SDK - path to StrataXGS SDK root directory
|
||||
#
|
||||
# Optionally the following environment variables can be set to
|
||||
# override the default build server configuration:
|
||||
#
|
||||
# MIPS_TOOLS_DIR - path to build tools (if not in PATH already)
|
||||
# MIPS_CROSS_COMPILE - cross compile tools prefix
|
||||
# LINUX_INCLUDE - path to Linux kernel include directory
|
||||
#
|
||||
|
||||
SDK :=$(shell if [ -n "$$SDK" ] ; then\
|
||||
echo $$SDK;\
|
||||
else\
|
||||
cd $(dir $(lastword $(MAKEFILE_LIST))); while /usr/bin/test ! -e RELEASE ; do \
|
||||
dir=`cd ../;pwd`; \
|
||||
if [ "$$dir" = "/" ] ; then \
|
||||
echo Cannot find SDK in $(lastword $(MAKEFILE_LIST)) 1>&2; \
|
||||
exit 1; \
|
||||
fi ; \
|
||||
cd $$dir; \
|
||||
done ; \
|
||||
pwd; \
|
||||
fi)
|
||||
|
||||
ifeq ($(SDK),)
|
||||
$(error Please run this in a tree)
|
||||
endif
|
||||
|
||||
export SDK
|
||||
|
||||
override kernel_version=2_6
|
||||
platform=jag-$(kernel_version)
|
||||
|
||||
# Select the build environment
|
||||
#BUILD_PLATFORM=ELDK
|
||||
#BUILD_PLATFORM=WR_LINUX
|
||||
|
||||
#Select the LINUX KERNEL VERSION
|
||||
#KERN_VER = 2.6.21.7
|
||||
|
||||
|
||||
# Select the ELDK version
|
||||
#ELDK_VERSION=4.1
|
||||
|
||||
# Windriver linux version
|
||||
#WRS_LINUX_VERSION=1.4
|
||||
#WRS_LINUX_VERSION=2.0
|
||||
|
||||
export KERN_VER
|
||||
export ELDK_VERSION
|
||||
export BUILD_PLATFORM
|
||||
export WRS_LINUX_VERSION
|
||||
|
||||
LINUX_MAKE_USER=1
|
||||
include ${SDK}/make/Make.linux
|
||||
|
@ -0,0 +1,58 @@
|
||||
#
|
||||
# Copyright 2017 Broadcom
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License, version 2, as
|
||||
# published by the Free Software Foundation (the "GPL").
|
||||
#
|
||||
# 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 version 2 (GPLv2) for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# version 2 (GPLv2) along with this source code.
|
||||
#
|
||||
# -*- Makefile -*-
|
||||
# $Id: Makefile,v 1.4 Broadcom SDK $
|
||||
# $Copyright: (c) 2005 Broadcom Corp.
|
||||
# All Rights Reserved.$
|
||||
|
||||
#
|
||||
# This make job requires the following environment variables to be set:
|
||||
#
|
||||
# SDK - path to StrataXGS SDK root directory
|
||||
#
|
||||
# Optionally the following environment variables can be set to
|
||||
# override the default build server configuration:
|
||||
#
|
||||
# MIPS_TOOLS_DIR - path to build tools (if not in PATH already)
|
||||
# MIPS_CROSS_COMPILE - cross compile tools prefix
|
||||
# LINUX_INCLUDE - path to Linux kernel include directory
|
||||
#
|
||||
|
||||
SDK :=$(shell if [ -n "$$SDK" ] ; then\
|
||||
echo $$SDK;\
|
||||
else\
|
||||
cd $(dir $(lastword $(MAKEFILE_LIST))); while /usr/bin/test ! -e RELEASE ; do \
|
||||
dir=`cd ../;pwd`; \
|
||||
if [ "$$dir" = "/" ] ; then \
|
||||
echo Cannot find SDK in $(lastword $(MAKEFILE_LIST)) 1>&2; \
|
||||
exit 1; \
|
||||
fi ; \
|
||||
cd $$dir; \
|
||||
done ; \
|
||||
pwd; \
|
||||
fi)
|
||||
|
||||
ifeq ($(SDK),)
|
||||
$(error Please run this in a tree)
|
||||
endif
|
||||
|
||||
export SDK
|
||||
|
||||
override kernel_version=2_6
|
||||
platform=nsx-$(kernel_version)
|
||||
LINUX_MAKE_USER=1
|
||||
include ${SDK}/make/Make.linux
|
||||
|
@ -0,0 +1,57 @@
|
||||
#
|
||||
# Copyright 2017 Broadcom
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License, version 2, as
|
||||
# published by the Free Software Foundation (the "GPL").
|
||||
#
|
||||
# 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 version 2 (GPLv2) for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# version 2 (GPLv2) along with this source code.
|
||||
#
|
||||
# -*- Makefile -*-
|
||||
# $Id: Makefile,v 1.3 Broadcom SDK $
|
||||
# $Copyright: (c) 2005 Broadcom Corp.
|
||||
# All Rights Reserved.$
|
||||
|
||||
#
|
||||
# This make job requires the following environment variables to be set:
|
||||
#
|
||||
# SDK - path to StrataXGS SDK root directory
|
||||
#
|
||||
# Optionally the following environment variables can be set to
|
||||
# override the default build server configuration:
|
||||
#
|
||||
# MIPS_TOOLS_DIR - path to build tools (if not in PATH already)
|
||||
# MIPS_CROSS_COMPILE - cross compile tools prefix
|
||||
# LINUX_INCLUDE - path to Linux kernel include directory
|
||||
#
|
||||
|
||||
SDK :=$(shell if [ -n "$$SDK" ] ; then\
|
||||
echo $$SDK;\
|
||||
else\
|
||||
cd $(dir $(lastword $(MAKEFILE_LIST))); while /usr/bin/test ! -e RELEASE ; do \
|
||||
dir=`cd ../;pwd`; \
|
||||
if [ "$$dir" = "/" ] ; then \
|
||||
echo Cannot find SDK in $(lastword $(MAKEFILE_LIST)) 1>&2; \
|
||||
exit 1; \
|
||||
fi ; \
|
||||
cd $$dir; \
|
||||
done ; \
|
||||
pwd; \
|
||||
fi)
|
||||
|
||||
ifeq ($(SDK),)
|
||||
$(error Please run this in a tree)
|
||||
endif
|
||||
|
||||
export SDK
|
||||
|
||||
platform=nsx64
|
||||
LINUX_MAKE_USER=1
|
||||
include ${SDK}/make/Make.linux
|
||||
|
@ -0,0 +1,65 @@
|
||||
#
|
||||
# Copyright 2017 Broadcom
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License, version 2, as
|
||||
# published by the Free Software Foundation (the "GPL").
|
||||
#
|
||||
# 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 version 2 (GPLv2) for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# version 2 (GPLv2) along with this source code.
|
||||
#
|
||||
# -*- Makefile -*-
|
||||
# $Id: Makefile,v 1.3 Broadcom SDK $
|
||||
# $Copyright: (c) 2005 Broadcom Corp.
|
||||
# All Rights Reserved.$
|
||||
|
||||
#
|
||||
# This make job requires the following environment variables to be set:
|
||||
#
|
||||
# SDK - path to StrataXGS SDK root directory
|
||||
#
|
||||
# Optionally the following environment variables can be set to
|
||||
# override the default build server configuration:
|
||||
#
|
||||
# MIPS_TOOLS_DIR - path to build tools (if not in PATH already)
|
||||
# MIPS_CROSS_COMPILE - cross compile tools prefix
|
||||
# LINUX_INCLUDE - path to Linux kernel include directory
|
||||
#
|
||||
|
||||
SDK :=$(shell if [ -n "$$SDK" ] ; then\
|
||||
echo $$SDK;\
|
||||
else\
|
||||
cd $(dir $(lastword $(MAKEFILE_LIST))); while /usr/bin/test ! -e RELEASE ; do \
|
||||
dir=`cd ../;pwd`; \
|
||||
if [ "$$dir" = "/" ] ; then \
|
||||
echo Cannot find SDK in $(lastword $(MAKEFILE_LIST)) 1>&2; \
|
||||
exit 1; \
|
||||
fi ; \
|
||||
cd $$dir; \
|
||||
done ; \
|
||||
pwd; \
|
||||
fi)
|
||||
|
||||
ifeq ($(SDK),)
|
||||
$(error Please run this in a tree)
|
||||
endif
|
||||
|
||||
export SDK
|
||||
|
||||
override kernel_version=2_6
|
||||
platform=nsx_wrl-$(kernel_version)
|
||||
|
||||
# Windriver linux version
|
||||
#WRS_LINUX_VERSION=1.4
|
||||
#WRS_LINUX_VERSION=2.0
|
||||
|
||||
export WRS_LINUX_VERSION
|
||||
|
||||
LINUX_MAKE_USER=1
|
||||
include ${SDK}/make/Make.linux
|
||||
|
@ -0,0 +1,79 @@
|
||||
#
|
||||
# Copyright 2017 Broadcom
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License, version 2, as
|
||||
# published by the Free Software Foundation (the "GPL").
|
||||
#
|
||||
# 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 version 2 (GPLv2) for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# version 2 (GPLv2) along with this source code.
|
||||
#
|
||||
# -*- Makefile -*-
|
||||
# $Id: Makefile,v 1.5 Broadcom SDK $
|
||||
# $Copyright: (c) 2007 Broadcom Corp.
|
||||
# All Rights Reserved.$
|
||||
|
||||
#
|
||||
# This make job requires the following environment variables to be set:
|
||||
#
|
||||
# SDK - path to StrataXGS SDK root directory
|
||||
#
|
||||
# Optionally the following environment variables can be set to
|
||||
# override the default build server configuration:
|
||||
#
|
||||
# MIPS_TOOLS_DIR - path to build tools (if not in PATH already)
|
||||
# MIPS_CROSS_COMPILE - cross compile tools prefix
|
||||
# LINUX_INCLUDE - path to Linux kernel include directory
|
||||
#
|
||||
|
||||
SDK :=$(shell if [ -n "$$SDK" ] ; then\
|
||||
echo $$SDK;\
|
||||
else\
|
||||
cd $(dir $(lastword $(MAKEFILE_LIST))); while /usr/bin/test ! -e RELEASE ; do \
|
||||
dir=`cd ../;pwd`; \
|
||||
if [ "$$dir" = "/" ] ; then \
|
||||
echo Cannot find SDK in $(lastword $(MAKEFILE_LIST)) 1>&2; \
|
||||
exit 1; \
|
||||
fi ; \
|
||||
cd $$dir; \
|
||||
done ; \
|
||||
pwd; \
|
||||
fi)
|
||||
|
||||
ifeq ($(SDK),)
|
||||
$(error Please run this in a tree)
|
||||
endif
|
||||
|
||||
export SDK
|
||||
|
||||
override kernel_version=2_6
|
||||
platform=raptor-$(kernel_version)
|
||||
|
||||
# Select the build environment
|
||||
#BUILD_PLATFORM=ELDK
|
||||
#BUILD_PLATFORM=WR_LINUX
|
||||
|
||||
#Select the LINUX KERNEL VERSION
|
||||
#KERN_VER = 2.6.21.7
|
||||
|
||||
|
||||
# Select the ELDK version
|
||||
#ELDK_VERSION=4.1
|
||||
|
||||
# Windriver linux version
|
||||
#WRS_LINUX_VERSION=1.4
|
||||
#WRS_LINUX_VERSION=2.0
|
||||
|
||||
export KERN_VER
|
||||
export ELDK_VERSION
|
||||
export BUILD_PLATFORM
|
||||
export WRS_LINUX_VERSION
|
||||
|
||||
LINUX_MAKE_USER=1
|
||||
include ${SDK}/make/Make.linux
|
||||
|
@ -0,0 +1,58 @@
|
||||
#
|
||||
# Copyright 2017 Broadcom
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License, version 2, as
|
||||
# published by the Free Software Foundation (the "GPL").
|
||||
#
|
||||
# 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 version 2 (GPLv2) for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# version 2 (GPLv2) along with this source code.
|
||||
#
|
||||
# -*- Makefile -*-
|
||||
# $Id: Makefile,v 1.1 Broadcom SDK $
|
||||
# $Copyright: (c) 2005 Broadcom Corp.
|
||||
# All Rights Reserved.$
|
||||
|
||||
#
|
||||
# This make job requires the following environment variables to be set:
|
||||
#
|
||||
# SDK - path to StrataXGS SDK root directory
|
||||
#
|
||||
# Optionally the following environment variables can be set to
|
||||
# override the default build server configuration:
|
||||
#
|
||||
# MIPS_TOOLS_DIR - path to build tools (if not in PATH already)
|
||||
# MIPS_CROSS_COMPILE - cross compile tools prefix
|
||||
# LINUX_INCLUDE - path to Linux kernel include directory
|
||||
#
|
||||
|
||||
SDK :=$(shell if [ -n "$$SDK" ] ; then\
|
||||
echo $$SDK;\
|
||||
else\
|
||||
cd $(dir $(lastword $(MAKEFILE_LIST))); while /usr/bin/test ! -e RELEASE ; do \
|
||||
dir=`cd ../;pwd`; \
|
||||
if [ "$$dir" = "/" ] ; then \
|
||||
echo Cannot find SDK in $(lastword $(MAKEFILE_LIST)) 1>&2; \
|
||||
exit 1; \
|
||||
fi ; \
|
||||
cd $$dir; \
|
||||
done ; \
|
||||
pwd; \
|
||||
fi)
|
||||
|
||||
ifeq ($(SDK),)
|
||||
$(error Please run this in a tree)
|
||||
endif
|
||||
|
||||
export SDK
|
||||
|
||||
platform=raptor
|
||||
LINUX_MAKE_USER=1
|
||||
CFGFLAGS += -DBCM_ICS
|
||||
include ${SDK}/make/Make.linux
|
||||
|
@ -1,18 +1,17 @@
|
||||
#
|
||||
# Unless you and Broadcom execute a separate written software license
|
||||
# agreement governing use of this software, this software is licensed to
|
||||
# you under the terms of the GNU General Public License version 2 (the
|
||||
# "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
|
||||
# with the following added to such license:
|
||||
# Copyright 2017 Broadcom
|
||||
#
|
||||
# As a special exception, the copyright holders of this software give
|
||||
# you permission to link this software with independent modules, and to
|
||||
# copy and distribute the resulting executable under terms of your
|
||||
# choice, provided that you also meet, for each linked independent
|
||||
# module, the terms and conditions of the license of that module. An
|
||||
# independent module is a module which is not derived from this
|
||||
# software. The special exception does not apply to any modifications
|
||||
# of the software.
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License, version 2, as
|
||||
# published by the Free Software Foundation (the "GPL").
|
||||
#
|
||||
# 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 version 2 (GPLv2) for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# version 2 (GPLv2) along with this source code.
|
||||
#
|
||||
# -*- Makefile -*-
|
||||
# $Id: Makefile,v 1.2 Broadcom SDK $
|
||||
|
@ -1,18 +1,17 @@
|
||||
#
|
||||
# Unless you and Broadcom execute a separate written software license
|
||||
# agreement governing use of this software, this software is licensed to
|
||||
# you under the terms of the GNU General Public License version 2 (the
|
||||
# "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
|
||||
# with the following added to such license:
|
||||
# Copyright 2017 Broadcom
|
||||
#
|
||||
# As a special exception, the copyright holders of this software give
|
||||
# you permission to link this software with independent modules, and to
|
||||
# copy and distribute the resulting executable under terms of your
|
||||
# choice, provided that you also meet, for each linked independent
|
||||
# module, the terms and conditions of the license of that module. An
|
||||
# independent module is a module which is not derived from this
|
||||
# software. The special exception does not apply to any modifications
|
||||
# of the software.
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License, version 2, as
|
||||
# published by the Free Software Foundation (the "GPL").
|
||||
#
|
||||
# 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 version 2 (GPLv2) for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# version 2 (GPLv2) along with this source code.
|
||||
#
|
||||
#
|
||||
# mktool.pl
|
||||
|
Loading…
Reference in New Issue
Block a user